Commit af4f09d9 authored by zhoutong's avatar zhoutong
parents c2b61bdc b1859e0b
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<el-button v-show="!readonly" type="primary" size="mini" @click="handleOpen">选择</el-button> <el-button v-show="!readonly" type="primary" size="mini" @click="handleOpen">选择</el-button>
<el-dialog <el-dialog
title="提示" title="储位"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="30%" width="30%"
append-to-body append-to-body
...@@ -188,8 +188,10 @@ export default { ...@@ -188,8 +188,10 @@ export default {
this.$emit('input', data) this.$emit('input', data)
this.dialogVisible = false this.dialogVisible = false
if (this.isEditing || this.orderItemId) { if (this.isEditing || this.warehouseInId) {
updateWarehouseInLocation(data) updateWarehouseInLocation(data).then(() => {
this.$message.success('储位修改成功')
})
} }
}) })
}, },
......
...@@ -81,14 +81,16 @@ ...@@ -81,14 +81,16 @@
</el-table-column> </el-table-column>
<el-table-column label="新的预计入公海时间"> <el-table-column label="新的预计入公海时间">
<template v-slot="{row}"> <template v-slot="{row}">
{{parseTime(row.newEstimateEnterOpenSeaTime)}} {{parseTime(row.newEstimateEnterOpenSeaTime) || '/'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="老的预计入公海时间" > <el-table-column label="老的预计入公海时间" >
<template v-slot="{row}"> <template v-slot="{row}">
{{parseTime(row.oldEstimateEnterOpenSeaTime)}} {{parseTime(row.oldEstimateEnterOpenSeaTime || '/')}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" prop="remark" >
</el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
<template v-slot="{row}"> <template v-slot="{row}">
<el-button type="text" @click="getCustomerLog(row.id)"> <el-button type="text" @click="getCustomerLog(row.id)">
...@@ -102,7 +104,7 @@ ...@@ -102,7 +104,7 @@
<el-dialog title="客户日志" :visible.sync="show"> <el-dialog title="客户日志" :visible.sync="show">
<el-form> <el-form>
<el-form-item label="订单编号:"> <el-form-item label="订单编号:">
{{dataLog.dataLog ? dataLog.dataLog :'/'}} {{dataLog.orderNo ? dataLog.orderNo :'/'}}
</el-form-item> </el-form-item>
<el-form-item label="客户编号:"> <el-form-item label="客户编号:">
{{dataLog.number}} {{dataLog.number}}
...@@ -111,10 +113,10 @@ ...@@ -111,10 +113,10 @@
{{dataLog.name}} {{dataLog.name}}
</el-form-item> </el-form-item>
<el-form-item label="新客户经理:"> <el-form-item label="新客户经理:">
{{dataLog.newEstimateEnterOpenSeaTime ? dataLog.newEstimateEnterOpenSeaTime : '/'}} {{dataLog.newCustomerService ? operatorFn(dataLog.newCustomerService) : '/'}}
</el-form-item> </el-form-item>
<el-form-item label="老客户经理:"> <el-form-item label="老客户经理:">
{{dataLog.oldEstimateEnterOpenSeaTime ? dataLog.oldEstimateEnterOpenSeaTime : '/'}} {{dataLog.oldCustomerService ? operatorFn(dataLog.oldCustomerService) : '/'}}
</el-form-item> </el-form-item>
<el-form-item label="操作类型:"> <el-form-item label="操作类型:">
<dict-tag :type="DICT_TYPE.CUSTOMER_OPERATE_TYPE" :value="dataLog.operateType"></dict-tag> <dict-tag :type="DICT_TYPE.CUSTOMER_OPERATE_TYPE" :value="dataLog.operateType"></dict-tag>
...@@ -123,17 +125,14 @@ ...@@ -123,17 +125,14 @@
{{operatorFn(dataLog.operator)}} {{operatorFn(dataLog.operator)}}
</el-form-item> </el-form-item>
<el-form-item label="新预计进入公海时间:"> <el-form-item label="新预计进入公海时间:">
{{parseTime(dataLog.newEstimateEnterOpenSeaTime)}} {{parseTime(dataLog.newEstimateEnterOpenSeaTime) || '/'}}
</el-form-item> </el-form-item>
<el-form-item label="老的预计进入公海时间:"> <el-form-item label="老的预计进入公海时间:">
{{parseTime(dataLog.oldEstimateEnterOpenSeaTime)}} {{parseTime(dataLog.oldEstimateEnterOpenSeaTime) || '/'}}
</el-form-item> </el-form-item>
<el-form-item label="备注:"> <el-form-item label="备注:">
{{dataLog.remark}} {{dataLog.remark}}
</el-form-item> </el-form-item>
<el-form-item label="更新json:">
{{dataLog.updateBody}}
</el-form-item>
</el-form> </el-form>
</el-dialog> </el-dialog>
</div> </div>
...@@ -160,7 +159,7 @@ export default { ...@@ -160,7 +159,7 @@ export default {
}, },
operatorFn(){ operatorFn(){
return (val)=>{ return (val)=>{
return this.allSimplList.find(item => item.id == val)?.nickname return this.allSimplList.find(item => item.id == val)?.nickname || '/'
} }
} }
}, },
......
...@@ -693,11 +693,7 @@ export default { ...@@ -693,11 +693,7 @@ export default {
methods: { methods: {
deleteBankData(index){ deleteBankData(index){
if(this.form.customerBanks.length === 1){
this.$message.warning('至少添加一条银行卡号信息');
}else {
this.form.customerBanks.splice(index, 1); this.form.customerBanks.splice(index, 1);
}
}, },
//添加银行卡 //添加银行卡
addBankData(){ addBankData(){
...@@ -903,7 +899,6 @@ export default { ...@@ -903,7 +899,6 @@ export default {
}; };
this.form.createTime = (new Date()).getTime() this.form.createTime = (new Date()).getTime()
this.resetForm("form"); this.resetForm("form");
this.addBankData()
}, },
getCustomer(id) { getCustomer(id) {
return getCustomer(id).then(response => { return getCustomer(id).then(response => {
......
...@@ -428,7 +428,7 @@ ...@@ -428,7 +428,7 @@
</el-table> </el-table>
<pagination @pagination="getCustomerGrade" :page.sync="getCustomerGradeFrom.pageNo" :limit.sync="getCustomerGradeFrom.pageSize" :total="getCustomerGradeFrom.total" ></pagination> <pagination @pagination="getCustomerGrade" :page.sync="getCustomerGradeFrom.pageNo" :limit.sync="getCustomerGradeFrom.pageSize" :total="getCustomerGradeFrom.total" ></pagination>
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="operationLog" v-if="permissions.includes('ecw:customer:operation-log')" :label="$t('操作日志')" > <el-tab-pane name="operationLog" v-show="checkPermi('ecw:customer:operation-log')" :label="$t('操作日志')" >
<customer-log :customerId="id" v-if="'operationLog' === activeName"></customer-log> <customer-log :customerId="id" v-if="'operationLog' === activeName"></customer-log>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
...@@ -490,6 +490,7 @@ import {getCreditRulePage} from "@/api/customer/creditRule"; ...@@ -490,6 +490,7 @@ import {getCreditRulePage} from "@/api/customer/creditRule";
import {getCountry} from "@/api/ecw/country" import {getCountry} from "@/api/ecw/country"
import {getCurrencyList} from "@/api/ecw/currency"; import {getCurrencyList} from "@/api/ecw/currency";
import customerLog from "@/views/ecw/customer/customerLog.vue"; import customerLog from "@/views/ecw/customer/customerLog.vue";
import {checkPermi} from "@/utils/permission";
export default { export default {
name: 'query', name: 'query',
...@@ -722,6 +723,7 @@ export default { ...@@ -722,6 +723,7 @@ export default {
} }
}, },
methods:{ methods:{
checkPermi,
userIdFormatter(row, column, cellValue){ userIdFormatter(row, column, cellValue){
const member = this.memberList.find(e => e.id === cellValue) const member = this.memberList.find(e => e.id === cellValue)
if (member) { if (member) {
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
:type="DICT_TYPE.ECW_PAYMENT_STATE" :type="DICT_TYPE.ECW_PAYMENT_STATE"
:value="scope.row.state" :value="scope.row.state"
/> />
<span v-if="scope.row.state == 2 " :title="scope.row.remark"><i class="el-icon-question"></i></span> <span v-if="[2,4,6].includes(scope.row.state) && scope.row.comment" :title="scope.row.comment"><i class="el-icon-question"></i></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')"> <el-table-column :label="$t('操作')">
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
label-width="0" label-width="0"
style="margin-bottom: 0" style="margin-bottom: 0"
prop="customerId" prop="customerId"
:rules="{ required: true, trigger: ['blur', 'change'] }" :rules="{ required: true, trigger: ['blur', 'change'],message:$t('客户不能为空')}"
:error="$t('客户不能为空')" :error="$t('客户不能为空')"
> >
<customer-selector v-model="form.customerId" @change="consignor = $event" /> <customer-selector v-model="form.customerId" @change="consignor = $event" />
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
label-width="0" label-width="0"
style="margin-bottom: 0" style="margin-bottom: 0"
prop="departmentId" prop="departmentId"
required :rules="{required:true,message:$t('部门不能为空')}"
:error="$t('部门不能为空')" :error="$t('部门不能为空')"
> >
<el-select <el-select
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
label-width="0" label-width="0"
style="margin-bottom: 0" style="margin-bottom: 0"
prop="salesmanName" prop="salesmanName"
required :rules="{required:true,message:$t('业务员不能为空')}"
:error="$t('业务员不能为空')" :error="$t('业务员不能为空')"
> >
<el-select v-model="form.salesmanName" :placeholder="$t('请选择业务员')"> <el-select v-model="form.salesmanName" :placeholder="$t('请选择业务员')">
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
label-width="0" label-width="0"
style="margin-bottom: 0" style="margin-bottom: 0"
prop="applicationAt" prop="applicationAt"
required :rules="{required:true,message:$t('申请日期不能为空')}"
:error="$t('申请日期不能为空')" :error="$t('申请日期不能为空')"
> >
<el-date-picker <el-date-picker
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
label-width="0" label-width="0"
style="margin-bottom: 0" style="margin-bottom: 0"
prop="latestPayAt" prop="latestPayAt"
required :rules="{required:true,message:$t('最后付款日期不能为空')}"
:error="$t('最后付款日期不能为空')" :error="$t('最后付款日期不能为空')"
:datafld="interdict" :datafld="interdict"
> >
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
label="" label=""
label-width="0" label-width="0"
style="margin-bottom: 0" style="margin-bottom: 0"
required :rules="{required:true,message:$t('结算方式不能为空')}"
:error="$t('选择结算方式')" :error="$t('选择结算方式')"
prop="settlementType" prop="settlementType"
> >
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
style="padding: 10px; margin-bottom: 10px" style="padding: 10px; margin-bottom: 10px"
>{{ $t('加未付客户款项') }} >{{ $t('加未付客户款项') }}
</el-button </el-button
> >
</el-col> </el-col>
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<el-descriptions-item label="创建时间">{{parseTime(record.createTime)}}</el-descriptions-item> <el-descriptions-item label="创建时间">{{parseTime(record.createTime)}}</el-descriptions-item>
<el-descriptions-item label="业务员">{{record.salesmanName}}</el-descriptions-item> <el-descriptions-item label="业务员">{{record.salesmanName}}</el-descriptions-item>
<el-descriptions-item label="付款金额">{{record.totalAmount}}rmb</el-descriptions-item> <el-descriptions-item label="付款金额">{{record.totalAmount}}rmb</el-descriptions-item>
<el-descriptions-item v-if="record.bmpStatus === 3" label="驳回原因">{{record.comment}}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<router-link :to="{path:'/financial/commission-requestFunds',query:{lookId: this.record.id}}"> <router-link :to="{path:'/financial/commission-requestFunds',query:{lookId: this.record.id}}">
<el-button type="primary">查看详情</el-button> <el-button type="primary">查看详情</el-button>
......
...@@ -375,7 +375,7 @@ ...@@ -375,7 +375,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.type !== 'total'">{{ scope.row.collectionAmount }}</span> <span v-if="scope.row.type !== 'total'">{{ scope.row.collectionAmount }}</span>
<div v-else> <div v-else>
<div v-for="itemAmount in scope.row.collectionAmount">{{$i18n.locale=='zh_CN'?itemAmount.currencyNameZh:itemAmount.currencyNameEn}}: {{ itemAmount.amount}}</div> <div v-for="itemAmount in scope.row.collectionAmount">{{$i18n.locale=='zh_CN'?(itemAmount?itemAmount.currencyNameZh:''):(itemAmount?itemAmount.currencyNameEn:'')}}: {{ itemAmount.amount}}</div>
<!-- <div v-if="scope.row.collectionAmount[1]">{{ $t('人民币') }}: {{ scope.row.collectionAmount[1].toFixed(6) }}</div> <!-- <div v-if="scope.row.collectionAmount[1]">{{ $t('人民币') }}: {{ scope.row.collectionAmount[1].toFixed(6) }}</div>
<div v-if="scope.row.collectionAmount[2]">{{ $t('奈拉') }}: {{ scope.row.collectionAmount[2].toFixed(6) }}</div> <div v-if="scope.row.collectionAmount[2]">{{ $t('奈拉') }}: {{ scope.row.collectionAmount[2].toFixed(6) }}</div>
<div v-if="scope.row.collectionAmount[3]">{{ $t('西非法郎') }}: {{ scope.row.collectionAmount[3].toFixed(6) }}</div> --> <div v-if="scope.row.collectionAmount[3]">{{ $t('西非法郎') }}: {{ scope.row.collectionAmount[3].toFixed(6) }}</div> -->
...@@ -810,8 +810,9 @@ export default { ...@@ -810,8 +810,9 @@ export default {
this.form.receiptAccountList.forEach((item, index) => { this.form.receiptAccountList.forEach((item, index) => {
this.rateChange(item, index) this.rateChange(item, index)
// this.calculation()
}); });
this.calculation()
}) })
}) })
} }
...@@ -917,7 +918,7 @@ export default { ...@@ -917,7 +918,7 @@ export default {
// if (row.currencyId == 3 && val == 2) row.collectionRate = this.RMBtoNAN() // if (row.currencyId == 3 && val == 2) row.collectionRate = this.RMBtoNAN()
// if (row.currencyId == 2 && val == 1) row.collectionRate = this.NANtoUS() // if (row.currencyId == 2 && val == 1) row.collectionRate = this.NANtoUS()
// if (row.currencyId == 2 && val == 3) row.collectionRate = this.NANtoRMB() // if (row.currencyId == 2 && val == 3) row.collectionRate = this.NANtoRMB()
row.collectionRate = NP.divide(this.currencyList.find(v => v.id === row.currencyId).huilv, this.currencyList.find(v => v.id === val).huilv).toFixed(6) row.collectionRate = NP.times(this.currencyList.find(v => v.id === row.currencyId).huilv/100, this.currencyList.find(v => v.id === val).exchangeToFc/100).toFixed(6)
} }
this.rateChange(row, index) this.rateChange(row, index)
...@@ -986,12 +987,13 @@ export default { ...@@ -986,12 +987,13 @@ export default {
dollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.taxAmount || 0), 0) dollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.taxAmount || 0), 0)
discountDollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0) discountDollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
var t = copyList.find(v => v.currencyId == item.id) var t = copyList.find(v => v.currencyId == item.id)
console.log(discountDollar)
this.form.receiptAccountList.push( this.form.receiptAccountList.push(
{ {
discountTotal: discountDollar, discountTotal: discountDollar,
currencyId: item.id, currencyId: item.id,
receivableAmount: dollar, receivableAmount: dollar,
writeOffRate: NP.divide(this.currencyList.find(v => v.id === item.id).huilv, this.currencyList.find(v => v.id === this.showCurrencyId).huilv).toFixed(6), writeOffRate: item.id==this.showCurrencyId?1: NP.times(this.currencyList.find(v => v.id === item.id).huilv/100, this.currencyList.find(v => v.id === this.showCurrencyId).exchangeToFc/100).toFixed(6),
platformAccountId: t?.platformAccountId || '', platformAccountId: t?.platformAccountId || '',
collectionCurrencyId: item.id, collectionCurrencyId: item.id,
collectionRate: 1 collectionRate: 1
...@@ -1206,12 +1208,14 @@ export default { ...@@ -1206,12 +1208,14 @@ export default {
// this.calculation() // this.calculation()
// }) // })
// }else{ // }else{
var discount = this.list[this.selectListIndex]
discount['discountTotal'] = this.discountForm.discountTotal
setTimeout(()=>{ setTimeout(()=>{
getReceivableInfoByIds({ id: this.selectListRow.id }).then(res => { // getReceivableInfoByIds({ id: this.selectListRow.id }).then(res => {
this.$set(this.list, this.selectListIndex, {...res.data}) this.$set(this.list, this.selectListIndex, {...discount})
this.cancelDiscount() this.cancelDiscount()
this.calculation() this.calculation()
}) // })
},1000) },1000)
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
label-width="0" label-width="0"
style="margin-bottom: 0" style="margin-bottom: 0"
prop="supplierId" prop="supplierId"
:rules="{ required: true, trigger: ['blur', 'change'] }" :rules="{ required: true, trigger: ['blur', 'change'],message:$t('供应商不能为空') }"
:error="$t('供应商不能为空')" :error="$t('供应商不能为空')"
> >
<!-- <customer-selector v-model="form.supplierId" @change="consignor = $event" /> --> <!-- <customer-selector v-model="form.supplierId" @change="consignor = $event" /> -->
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
label-width="0" label-width="0"
style="margin-bottom: 0" style="margin-bottom: 0"
prop="departmentId" prop="departmentId"
required :rules="{required:true,message:$t('部门不能为空')}"
:error="$t('部门不能为空')" :error="$t('部门不能为空')"
> >
<el-select <el-select
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
label-width="0" label-width="0"
style="margin-bottom: 0" style="margin-bottom: 0"
prop="salesmanName" prop="salesmanName"
required :rules="{required:true,message:$t('业务员不能为空')}"
:error="$t('业务员不能为空')" :error="$t('业务员不能为空')"
> >
<el-select v-model="form.salesmanName" :placeholder="$t('请选择业务员')"> <el-select v-model="form.salesmanName" :placeholder="$t('请选择业务员')">
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
label-width="0" label-width="0"
style="margin-bottom: 0" style="margin-bottom: 0"
prop="applicationAt" prop="applicationAt"
required :rules="{required:true,message:$t('申请日期不能为空')}"
:error="$t('申请日期不能为空')" :error="$t('申请日期不能为空')"
> >
<el-date-picker <el-date-picker
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
label-width="0" label-width="0"
style="margin-bottom: 0" style="margin-bottom: 0"
prop="latestPayAt" prop="latestPayAt"
required :rules="{required:true,message:$t('最后付款不能为空')}"
:error="$t('最后付款日期不能为空')" :error="$t('最后付款日期不能为空')"
> >
<el-date-picker <el-date-picker
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
label="" label=""
label-width="0" label-width="0"
style="margin-bottom: 0" style="margin-bottom: 0"
required :rules="{required:true,message:$t('结算方式不能为空')}"
:error="$t('选择结算方式')" :error="$t('选择结算方式')"
prop="settlementType" prop="settlementType"
> >
......
...@@ -134,6 +134,7 @@ ...@@ -134,6 +134,7 @@
:type="DICT_TYPE.ECW_PAYMENT_STATE" :type="DICT_TYPE.ECW_PAYMENT_STATE"
:value="scope.row.state" :value="scope.row.state"
/> />
<span v-if="[2,4,6].includes(scope.row.state) && scope.row.comment" :title="scope.row.comment"><i class="el-icon-question"></i></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
......
...@@ -885,7 +885,7 @@ export default { ...@@ -885,7 +885,7 @@ export default {
// else if (this.showCurrencyId === 3 && val === 2) rate = this.NANtoRMB() // else if (this.showCurrencyId === 3 && val === 2) rate = this.NANtoRMB()
// else if (this.showCurrencyId === 2 && val === 1) rate = this.UStoNAN() // else if (this.showCurrencyId === 2 && val === 1) rate = this.UStoNAN()
// else if (this.showCurrencyId === 2 && val === 3) rate = this.RMBtoNAN() // else if (this.showCurrencyId === 2 && val === 3) rate = this.RMBtoNAN()
rate = NP.divide(this.currencyList.find(v => v.id === val).huilv, this.currencyList.find(v => v.id === this.showCurrencyId).huilv).toFixed(6) rate = NP.times(this.currencyList.find(v => v.id === val).huilv/100, this.currencyList.find(v => v.id === this.showCurrencyId).exchangeToFc/100).toFixed(6)
} }
this.$set(this.addForm, 'rate', rate) this.$set(this.addForm, 'rate', rate)
}, },
......
...@@ -144,25 +144,25 @@ ...@@ -144,25 +144,25 @@
clearable clearable
></dict-selector> ></dict-selector>
</el-form-item> </el-form-item>
<el-form-item :label="$t('发货人')"> <!-- <el-form-item :label="$t('发货人')">
<customer-selector <customer-selector
v-model="queryParams.consignorNameOrPhone" v-model="queryParams.consignorNameOrPhone"
@change="consignor = $event" @change="consignor = $event"
clearable clearable
/> />
</el-form-item>
<!-- <el-form-item label="发货人:" >
<el-input style="max-width: 188px;" v-model="queryParams.orderNo" :placeholder="$t('请输入发货人')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> --> </el-form-item> -->
<el-form-item label="发货人:" >
<el-input style="max-width: 188px;" v-model="queryParams.consignorNameOrPhone" :placeholder="$t('请输入发货人')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
</el-row> </el-row>
<el-row> <el-row>
<el-form-item :label="$t('收货人')"> <el-form-item :label="$t('收货人')">
<!-- <el-input style="max-width: 188px;" v-model="queryParams.consigneeNameOrPhone" :placeholder="$t('请输入收货人')" clearable @keyup.enter.native="handleQuery"/> --> <el-input style="max-width: 188px;" v-model="queryParams.consigneeNameOrPhone" :placeholder="$t('请输入收货人')" clearable @keyup.enter.native="handleQuery"/>
<customer-selector <!-- <customer-selector
v-model="queryParams.consigneeNameOrPhone" v-model="queryParams.consigneeNameOrPhone"
@change="consignor = $event" @change="consignor = $event"
clearable clearable
/> /> -->
</el-form-item> </el-form-item>
<el-form-item :label="$t('创建时间')"> <el-form-item :label="$t('创建时间')">
<!-- <dict-selector :type="DICT_TYPE.BEGINTIME_TYPE_ENDTIME" v-model="queryParams.date"></dict-selector> --> <!-- <dict-selector :type="DICT_TYPE.BEGINTIME_TYPE_ENDTIME" v-model="queryParams.date"></dict-selector> -->
...@@ -328,7 +328,14 @@ export default { ...@@ -328,7 +328,14 @@ export default {
getList() { getList() {
this.loading = true; this.loading = true;
// 处理查询参数 // 处理查询参数
let params = { ...this.queryParams }; console.log(this.queryParams)
let params = {};
for(let key in this.queryParams){
if(this.queryParams[key]&&this.queryParams[key]!= undefined){
params[key] = this.queryParams[key]
}
}
this.addBeginAndEndTime(params, this.dateType, "createTime"); this.addBeginAndEndTime(params, this.dateType, "createTime");
// 执行查询 // 执行查询
getReceivableList(params).then((response) => { getReceivableList(params).then((response) => {
......
...@@ -292,6 +292,7 @@ ...@@ -292,6 +292,7 @@
<el-table-column :label="$t('操作人类型')" width="100"> <el-table-column :label="$t('操作人类型')" width="100">
<template slot-scope="{row}">{{ row.userType == 1 ? $t('会员') : $t('管理员') }}</template> <template slot-scope="{row}">{{ row.userType == 1 ? $t('会员') : $t('管理员') }}</template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作类型')" prop="type" width="150"></el-table-column>
<el-table-column :label="$t('操作描述')" prop="msg" width="300"></el-table-column> <el-table-column :label="$t('操作描述')" prop="msg" width="300"></el-table-column>
<el-table-column :label="$t('备注')" prop="note"> <el-table-column :label="$t('备注')" prop="note">
<template slot-scope="{row}"> <template slot-scope="{row}">
...@@ -497,8 +498,6 @@ export default { ...@@ -497,8 +498,6 @@ export default {
getCurrencyList().then(res => this.currencyList = res.data) getCurrencyList().then(res => this.currencyList = res.data)
getUnitList().then(res => this.unitList = res.data) getUnitList().then(res => this.unitList = res.data)
console.log('2023-01-14 23:23 看到此消息则表示代码最新')
}, },
methods: { methods: {
checkPermi, // 检查权限 checkPermi, // 检查权限
......
<template>
<div style="display: inline-block;margin-right: 10px">
<el-button size="mini" @click="visible = true" type="text">{{ title }}</el-button>
<el-dialog
:title="title + ' - ' + warehousing.orderNo"
:visible.sync="visible"
width="1280px"
>
<el-tabs v-model="activeName" type="card">
<el-tab-pane :label="edit ? $t('货物修改') : $t('货物入仓')" name="first">
<el-form ref="form" :model="form" :rules="formRules" label-width="80px">
<el-descriptions border :column="2">
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('中文品名') }}</template>
<product-selector v-if="!order.parentOrderId" v-model="form.prodId" @change="onProductChange"/>
<span v-else>{{ warehousing.prodTitleZh }}</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('英文品名') }}</template>
<product-selector v-if="!order.parentOrderId" lang="En" v-model="form.prodId" @change="onProductChange"/>
<span v-else>{{ warehousing.prodTitleEn }}</span>
</el-descriptions-item>
<el-descriptions-item :label="$t('品牌')">
<template slot="label"><span style="color: red">*</span>{{ $t('品牌') }}</template>
<el-form-item required label="" prop="brand" label-width="0">
<el-select
v-model="form.brand"
:placeholder="$t('可修改')"
filterable
remote
@change="handleBrandChange"
:remote-method="getProductBrandPage"
clearable>
<el-option
v-for="item in brandList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('是否备案')">
<template slot="label"><span style="color: red">*</span>{{ $t('是否备案') }}</template>
{{ isBeian }}
</el-descriptions-item>
<el-descriptions-item :label="$t('收费模式')">
<template slot="label"><span style="color: red">*</span>{{ $t('收费模式') }}</template>
{{ feeType }}
</el-descriptions-item>
<el-descriptions-item :label="$t('填单参数')">{{ $t('箱数:') }}<el-input size="mini" v-if="edit" v-model="warehousing.num" style="display: inline-block;width: 100px"></el-input>
<span v-else>{{ warehousing.num }}</span><br>{{ $t('体积:') }}<el-input size="mini" v-if="edit" v-model="warehousing.volume" style="display: inline-block;width: 100px"></el-input>
<span v-else>{{ warehousing.volume }}</span><br>{{ $t('重量:') }}<el-input size="mini" v-if="edit" v-model="warehousing.weight" style="display: inline-block;width: 100px"></el-input>
<span v-else>{{ warehousing.weight }}</span>Kg
</el-descriptions-item>
</el-descriptions>
<el-form-item :label="$t('材质')" style="margin-top: 20px">
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form.material" clearable></dict-selector>
</el-form-item>
<el-form-item :label="$t('入仓时间')" v-if="!edit">
<el-date-picker v-model="form.inTime" type="datetime" :placeholder="$t('请选择入仓时间')" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-form>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>{{ $t('入仓记录') }}</span>
<el-button style="float: right;margin-left: 15px" size="mini" type="primary" icon="el-icon-minus" circle @click="handleDelete"></el-button>
<el-button style="float: right" size="mini" type="primary" icon="el-icon-plus" circle @click="handleAdd()"></el-button>
</div>
<el-form ref="tableForm" :rules="tableFormRules" :model="form" size="mini">
<el-table
:data="form.table"
style="width: 100%">
<el-table-column :label="$t('箱数')" width="150px">
<template v-slot:header>
<span style="color: red">*</span>{{ $t('箱数') }}</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.cartonsNum">
<el-input v-model="form.table[$index].cartonsNum" placeholder="" @blur="handleVolume($index)">
<span slot="append">{{ getDictDataLabel(DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE, form.table[$index].specificationType) }}</span>
</el-input>
<dict-selector :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" v-model="form.table[$index].specificationType" @change="handleVolume($index)"></dict-selector>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('包装类型')" width="100px">
<template v-slot:header>
<span style="color: red">*</span>{{ $t('包装类型') }}</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<dict-selector :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="form.table[$index].unit"></dict-selector>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="长(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge1">
<el-input type="number" v-model="form.table[$index].boxGauge1" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="宽(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge2">
<el-input type="number" v-model="form.table[$index].boxGauge2" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="高(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge3">
<el-input type="number" v-model="form.table[$index].boxGauge3" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="体积(m³)">
<template v-slot:header>
<span style="color: red">*</span> <span>{{ $t('体积') }}</span>(m³)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.volume">
<el-input v-model="form.table[$index].volume" placeholder="" type="number"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="重量(Kg)">
<template v-slot:header>
<span style="color: red">*</span> <span>{{ $t('重量') }}</span>(Kg)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.weight">
<el-input v-model="form.table[$index].weight" placeholder="" type="number"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('数量')" width="130px">
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.quantityAll">
<el-input v-model.number="form.table[$index].quantityAll" placeholder="">
<template slot="append">{{ $t('') }}</template>
</el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('快递单号')">
<template v-slot="{r,c,$index}">
<el-form-item>
<el-input v-model="form.table[$index].expressNo" placeholder=""></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('储位')" prop="orderLocationBackVOList" width="150px">
<template v-slot="{ row, column, $index }">
<warehouse-area-select
v-if="visible"
v-model="form.table[$index].orderLocationBackVOList"
:order-id="orderId"
:order-item-id="warehousing.orderItemId"
:warehouse-in-id="form.table[$index].id"
:warehouse-id="warehouseId"
:is-editing="edit"></warehouse-area-select>
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
</el-tab-pane>
<el-tab-pane :label="$t('添加新品名')" name="second" v-if="!edit">
<el-form ref="form1" :model="form1" :rules="formRules" label-width="80px">
<el-descriptions border :column="2">
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('中文品名') }}</template>
<el-form-item required label="" prop="prodId" label-width="0">
<product-selector v-model="form1.prodId" @change="onProductChange1"/>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('英文品名') }}</template>
<el-form-item required label="" prop="prodId" label-width="0">
<product-selector lang="En" v-model="form1.prodId" @change="onProductChange1"/>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('品牌')">
<template slot="label"><span style="color: red">*</span>{{ $t('品牌') }}</template>
<el-form-item required label="" prop="brand" label-width="0">
<el-select
v-model="form1.brand"
:placeholder="$t('可修改')"
filterable
remote
@change="handleBrandChange"
:remote-method="getProductBrandPage"
clearable>
<el-option
v-for="item in brandList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('是否备案')">
<template slot="label"><span style="color: red">*</span>{{ $t('是否备案') }}</template>
{{ isBeian1 }}
</el-descriptions-item>
<el-descriptions-item :label="$t('收费模式')">
<template slot="label"><span style="color: red">*</span>{{ $t('收费模式') }}</template>
{{ feeType1 }}
</el-descriptions-item>
<el-descriptions-item :label="$t('填单参数')">{{ $t('非填单货物') }}</el-descriptions-item>
</el-descriptions>
<el-form-item :label="$t('材质')" style="margin-top: 20px">
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form1.material"></dict-selector>
</el-form-item>
<el-form-item :label="$t('入仓时间')">
<el-date-picker v-model="form1.inTime" type="datetime" :placeholder="$t('请选择入仓时间')" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-form>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>{{ $t('入仓记录') }}</span>
<el-button style="float: right;margin-left: 15px" size="mini" type="primary" icon="el-icon-minus" circle @click="handleDelete(1)"></el-button>
<el-button style="float: right" size="mini" type="primary" icon="el-icon-plus" circle @click="handleAdd(1)"></el-button>
</div>
<el-form ref="tableForm1" :model="form1" :rules="tableFormRules" size="mini">
<el-table
:data="form1.table"
style="width: 100%">
<el-table-column :label="$t('箱数')" width="150px">
<template v-slot:header>
<span style="color: red">*</span>{{ $t('箱数') }}</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">
{{ form1.table[$index].cartonsNum }}
{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, form1.table[$index].unit) }}
</span>
<el-input v-else v-model="form1.table[$index].cartonsNum" placeholder="">
<span slot="append">{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, form1.table[$index].unit) }}</span>
</el-input>
<dict-selector :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" v-model="form1.table[$index].specificationType" @change="handleVolume($index, 1)"></dict-selector>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('包装类型')" width="100px">
<template v-slot:header>
<span style="color: red">*</span>{{ $t('包装类型') }}</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, form1.table[$index].unit) }}</span>
<dict-selector v-else :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="form1.table[$index].unit"></dict-selector>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="长(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].boxGauge ? form1.table[$index].boxGauge.split('*')[0] : '' }}</span>
<el-input v-else type="number" v-model="form1.table[$index].boxGauge1" placeholder="" @blur="handleVolume($index, 1)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="宽(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].boxGauge ? form1.table[$index].boxGauge.split('*')[1] : '' }}</span>
<el-input v-else type="number" v-model="form1.table[$index].boxGauge2" placeholder="" @blur="handleVolume($index, 1)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="高(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].boxGauge ? form1.table[$index].boxGauge.split('*')[2] : '' }}</span>
<el-input v-else type="number" v-model="form1.table[$index].boxGauge3" placeholder="" @blur="handleVolume($index, 1)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="体积(m³)">
<template v-slot:header>
<span style="color: red">*</span> <span>{{ $t('体积') }}</span>(m³)
</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].volume }}</span>
<el-input v-else type="number" v-model="form1.table[$index].volume" placeholder=""></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="重量(Kg)">
<template v-slot:header>
<span style="color: red">*</span> <span>{{ $t('重量') }}</span>(Kg)
</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].weight }}</span>
<el-input v-else type="number" v-model="form1.table[$index].weight" placeholder=""></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('数量')" width="130px">
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].quantityAll }}</span>
<el-input v-else v-model.number="form1.table[$index].quantityAll" placeholder="">
<template slot="append">{{ $t('') }}</template>
</el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('快递单号')">
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].expressNo }}</span>
<el-input v-else v-model="form1.table[$index].expressNo" placeholder=""></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('储位')" prop="orderLocationBackVOList" width="150px">
<template v-slot="{ row, column, $index }">
<warehouse-area-select
v-model="form1.table[$index].orderLocationBackVOList"
:readonly="form1.table[$index].id && !edit"
:order-id="orderId"
:order-item-id="warehousing.orderItemId"
:warehouse-in-id="form1.table[$index].id"
:warehouse-id="warehouseId"
:is-editing="edit"></warehouse-area-select>
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
</el-tab-pane>
</el-tabs>
<div v-if="edit">
<h2>{{ $t('审批流程') }}</h2>
<work-flow xmlkey="free_apply" v-model="selectedUsers" />
<!-- <div>选择的用户:{{selectedUsers}}</div>-->
</div>
<span slot="footer">
<template v-if="!isEditing">
<el-button @click="handleClose">{{ $t('关 闭') }}</el-button>
<el-button type="primary" @click="handleSubmit()">{{ edit ? $t('确认修改') : $t('提 交') }}</el-button>
</template>
<template v-else>
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + formId)">{{ $t('审核中') }}</el-button>
<el-button type="primary" @click="handleCancelProcessInstance">{{ $t('取消审核') }}</el-button>
<el-button @click="handleClose">{{ $t('返回') }}</el-button>
</template>
<template v-else>
</template>
</span>
</el-dialog>
</div>
</template>
<script>
import ProductSelector from "@/components/ProductSelector"
import WarehouseAreaSelect from "@/components/WarehouseAreaSelect"
import {getFeeTypeByOrderProduct, getProductBrankPage} from "@/api/ecw/productBrank"
import {cancelProcessInstance} from "@/api/bpm/processInstance"
import WorkFlow from "@/components/WorkFlow"
import {DICT_TYPE, getDictDataLabel, getDictDatas} from "@/utils/dict"
import {orderWarehouseIn, orderWarehouseInUpdateApply} from "@/api/ecw/order"
export default {
name: "Warehouse",
components: {
ProductSelector,
WarehouseAreaSelect,
WorkFlow
},
props: {
title: {
type: String,
default: undefined
},
order: {
type: Object,
default: undefined
},
isJiyun: {
type: Boolean,
default: false
},
// 入仓修改
edit: {
type: Boolean,
default: false
},
warehousing: {
type: Object,
default: () => {
return {
material: undefined,
inTime: undefined,
orderWarehouseInBackItemDoList: []
}
}
}
},
computed: {
orderId(){
return this.order.orderId
},
brandObject(){
return this.brandList.find(e => e.id === this.form.brand) || ''
},
brandObject1(){
return this.brandList.find(e => e.id === this.form1.brand) || ''
},
isBeian(){
if (this.form.recordMode !== undefined){
return [this.$t('无备案'), this.$t('有备案'), this.$t('中性')][this.form.recordMode]
}
if (this.brandObject.filing){
return [this.$t('无备案'), this.$t('有备案'), this.$t('中性')][this.brandObject.filing]
} else {
return ''
}
},
isBeian1(){
if (this.form1.recordMode !== undefined){
return [this.$t('无备案'), this.$t('有备案'), this.$t('中性')][this.form1.recordMode]
}
if (this.brandObject1.filing){
return [this.$t('无备案'), this.$t('有备案'), this.$t('中性')][this.brandObject1.filing]
} else {
return ''
}
},
/**
* 收费模式
* @returns {string} 无牌价0,有牌价1,中性品牌价2
*/
feeType(){
const feeType = this.form.feeType
if (feeType >= 0 && feeType < 3) {
return [this.$t('无牌价'), this.$t('有牌价'), this.$t('中性品牌价')][feeType]
}
return ''
},
feeType1(){
const feeType = parseInt(this.form1.feeType)
if (feeType >= 0 && feeType < 3) {
return [this.$t('无牌价'), this.$t('有牌价'), this.$t('中性品牌价')][feeType]
}
return ''
},
warehouseId(){
return this.order?.logisticsInfoDto?.startWarehouseId
}
},
watch: {
visible(val){
if (val) {
this.getProductBrandPage(this.warehousing.brandName)
this.handleBrandChange(parseInt(this.form.brand))
}
}
},
data(){
return {
DICT_TYPE,
getDictDataLabel,
getDictDatas,
activeName: 'first',
visible: false,
form: {
table: [],
brandType: undefined,
orderId: undefined,
orderNo: undefined,
brand: undefined,
inTime: undefined,
material: undefined,
orderItemId: undefined,
prodAttrIds: undefined,
prodId: undefined,
prodTitleEn: undefined,
prodTitleZh: undefined,
prodType: undefined,
type: undefined,
feeType: undefined
},
form1: {
table: [],
brandType: undefined,
orderId: undefined,
orderNo: undefined,
brand: undefined,
inTime: undefined,
material: undefined,
orderItemId: undefined,
prodAttrIds: undefined,
prodId: undefined,
prodTitleEn: undefined,
prodTitleZh: undefined,
prodType: undefined,
type: 1,
feeType: undefined
},
brandList: [],
formRules: {
prodId: [{required: true, message: this.$t("请选择品名"), trigger: "change"}],
brand: [{required: true, message: this.$t("请选择品牌"), trigger: "change"}],
},
tableFormRules: {
// cartonsNum: [{required: true, message: this.$t("箱数不能为空"), trigger: "change"}],
// boxGauge1: [{required: true, message: this.$t("货物长不能为空"), trigger: "change"}],
// boxGauge2: [{required: true, message: this.$t("货物宽不能为空"), trigger: "change"}],
// boxGauge3: [{required: true, message: this.$t("货物高不能为空"), trigger: "change"}],
// volume: [{required: true, message: this.$t("体积不能为空"), trigger: "change"}],
// weight: [{required: true, message: this.$t("重量不能为空"), trigger: "change"}],
// // quantityAll: [{required: true, message: this.$t("数量不能为空"), trigger: "change"}]
},
selectedUsers: undefined,
// 入仓修改正在审核中
isEditing: false,
// 审批业务id
formId: ''
}
},
mounted() {
this.init()
},
methods: {
init(){
this.form.table = this.warehousing.orderWarehouseInBackItemDoList
this.form.brandType = this.warehousing.brandType
this.form.orderId = this.warehousing.orderId
this.form.orderItemId = this.warehousing.orderNo
this.form.orderNo = this.warehousing.orderNo
this.form.brand = this.warehousing.brand
this.form.brandType = this.warehousing.brandType
this.form.inTime = this.warehousing.inTime
this.form.material = this.warehousing.material
this.form.orderId = this.warehousing.orderId
this.form.orderItemId = this.warehousing.orderItemId
this.form.orderNo = this.warehousing.orderNo
this.form.prodAttrIds = this.warehousing.prodAttrIds
this.form.prodId = this.warehousing.prodId
this.form.prodTitleEn = this.warehousing.prodTitleEn
this.form.prodTitleZh = this.warehousing.prodTitleZh
this.form.prodType = this.warehousing.prodType
this.form.type = this.warehousing.type
this.form.feeType = this.warehousing.feeType
this.form.table.forEach(e => {
if (e.boxGauge) {
const boxGauge = e.boxGauge.split('*')
e.boxGauge1 = boxGauge[0]
e.boxGauge2 = boxGauge[1]
e.boxGauge3 = boxGauge[2]
}
})
if (!this.edit){
this.handleAdd()
this.handleAdd(1)
}
},
handleClose() {
this.$emit('close')
this.visible = false
},
handleVolume(index, val){
setTimeout(() => {
const {boxGauge1, boxGauge2, boxGauge3, specificationType, cartonsNum} = (val === 1 ? this.form1.table : this.form.table)[index]
let result = ''
if (boxGauge1 && boxGauge2 && boxGauge3 && specificationType && cartonsNum) {
result = (((specificationType === 1 || specificationType === '1') ? cartonsNum : 1) * (boxGauge1 * boxGauge2 * boxGauge3) / 1000000)?.toFixed(2) || ''
} else {
result = ''
}
if (result === '0.00') result = '0.01';
(val === 1 ? this.form1.table : this.form.table)[index].volume = result
}, 0)
},
handleSubmit() {
if (this.activeName !== "first"){
// 添加非填单货物
this.$refs['form1'].validate(valid => {
this.$refs['tableForm1'].validate(valid1 => {
if (!valid || !valid1) {
return
}
return orderWarehouseIn({
...this.form1,
brandType: this.warehousing.brandType,
orderId: this.warehousing.orderId,
orderItemId: undefined,
orderNo: this.warehousing.orderNo,
orderWarehouseInItemDoList: this.form1.table.map(e => {
return {
...e,
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3,
orderLocationCreateReqVOList: e.table
}
})
}).then(r => {
if (r.data) {
this.$message.success('新增入仓成功')
this.handleClose()
} else {
this.$message.success('新增入仓失败')
}
})
})
})
} else {
this.$refs['form'].validate(valid => {
this.$refs['tableForm'].validate(valid1 => {
if (!valid || !valid1) {
return
}
if (this.edit) {
// 入仓修改
return orderWarehouseInUpdateApply({
...this.form,
brandType: this.warehousing.brandType,
orderId: this.warehousing.orderId,
orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo,
num: this.warehousing.num,
volume: (+this.warehousing.volume)?.toFixed(2) || '',
weight: (+this.warehousing.weight)?.toFixed(2) || '',
prodId: this.form.prodId,
"orderWarehouseInUpdateItemDoList": this.form.table.map(e => {
return {
...e,
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3,
orderLocationCreateReqVOList: e.table
}
}),
copyUserId: this.selectedUsers
}).then(r => {
if (r.data) {
this.$message.success('入仓修改发起成功')
this.handleClose()
} else {
this.$message.success('入仓修改发起失败')
}
})
} else {
// 首次入仓、入仓补充
return orderWarehouseIn({
...this.form,
brandType: this.warehousing.brandType,
orderId: this.warehousing.orderId,
orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo,
orderWarehouseInItemDoList: this.form.table.map(e => {
return {
...e,
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3,
orderLocationCreateReqVOList: e.table
}
}),
}).then(r => {
if (r.data) {
this.$message.success('入仓成功')
this.handleClose()
} else {
this.$message.success('入仓失败')
}
})
}
})
})
}
},
handleCancelProcessInstance(){
this.$prompt('请输入取消原因?', this.$t("取消流程"), {
type: 'warning',
confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"),
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: this.$t("取消原因不能为空"),
}).then(({ value }) => {
cancelProcessInstance(this.formId, value).then(() => {
this.opened = false
this.$modal.msgSuccess("取消成功");
})
})
},
onProductChange(product){
this.form.prodTitleZh = product.titleZh
this.form.prodTitleEn = product.titleEn
this.handleBrandChange(parseInt(this.form.brand))
},
onProductChange1(product){
this.form1.prodTitleZh = product.titleZh
this.form1.prodTitleEn = product.titleEn
this.handleBrandChange(parseInt(this.form1.brand))
},
getProductBrandPage(titleZh = undefined) {
getProductBrankPage({pageSize: 20, titleZh}).then(r => {
this.brandList = r.data.list.map(e => {
// if(e.id){
// e.id = e.id.toString()
// }
return e
})
})
},
handleBrandChange(v){
getFeeTypeByOrderProduct({
brandId: parseInt(v),
productId: this.warehousing.prodId,
orderId: this.orderId
}).then(r => {
if(r.code === 0){
(this.activeName === "first" ? this.form : this.form1).feeType = parseInt(r.data.feeType);
(this.activeName === "first" ? this.form : this.form1).recordMode = parseInt(r.data.recordMode)
}
})
},
handleDelete(val) {
(val === 1 ? this.form1 : this.form).table.pop()
},
handleAdd(val = 0) {
let cartonsNum = ''
if (val !== 1) { // 货物入仓
let hasCartonsNum = 0
this.form.table.forEach(e => {
hasCartonsNum += e.cartonsNum
})
cartonsNum = this.warehousing.num - hasCartonsNum
}
const form = val === 1 ? this.form1 : this.form
form.table.push({
"boxGauge1": this.isJiyun ? 0 : '',
"boxGauge2": this.isJiyun ? 0 : '',
"boxGauge3": this.isJiyun ? 0 : '',
"cartonsNum": cartonsNum > 0 ? cartonsNum : '',
"expressNo": "",
"quantityAll": undefined,
"unit": "1",
"volume": '',
"weight": '',
specificationType: '1',
table: []
})
}
}
}
</script>
<style scoped>
</style>
...@@ -81,14 +81,17 @@ ...@@ -81,14 +81,17 @@
prop="address" prop="address"
:label="$t('操作')"> :label="$t('操作')">
<template v-slot="{ row, column, $index }"> <template v-slot="{ row, column, $index }">
<el-button v-if="isEdit" size="mini" type="text" @click="handleWarehousing(row)">{{$t('修改')}}</el-button> <warehouse v-if="isEdit" :warehousing="{...order.orderItemVOList[$index], ...orderItemList[$index]}" :title="$t('修改')" :order="order" @close="getList"></warehouse>
<!-- <el-button v-if="isEdit" size="mini" type="text" @click="handleWarehousing(row)">{{$t('修改')}}</el-button>-->
<template v-else-if="wareItem(row.orderItemId) && wareItem(row.orderItemId).orderWarehouseInBackItemDoList && wareItem(row.orderItemId).orderWarehouseInBackItemDoList.length > 0"> <template v-else-if="wareItem(row.orderItemId) && wareItem(row.orderItemId).orderWarehouseInBackItemDoList && wareItem(row.orderItemId).orderWarehouseInBackItemDoList.length > 0">
<!-- <template v-if="!order.parentOrderId">--> <!-- <template v-if="!order.parentOrderId">-->
<el-button size="mini" type="text" @click="handleWarehousing(row)">{{$t('追加')}}</el-button> <warehouse :warehousing="{...order.orderItemVOList[$index], ...orderItemList[$index]}" :title="$t('追加')" :order="order" @close="getList"></warehouse>
<!-- <el-button size="mini" type="text" @click="handleWarehousing(row)">{{$t('追加')}}</el-button>-->
<el-button size="mini" type="text" @click="handleWarehousingReturn(row)">{{$t('退仓')}}</el-button> <el-button size="mini" type="text" @click="handleWarehousingReturn(row)">{{$t('退仓')}}</el-button>
<!-- </template>--> <!-- </template>-->
</template> </template>
<el-button v-else size="mini" type="text" @click="handleWarehousing(row)">{{$t('入仓')}}</el-button> <warehouse v-else :warehousing="{...order.orderItemVOList[$index], ...orderItemList[$index]}" :title="$t('入仓')" :order="order" @close="getList"></warehouse>
<!-- <el-button v-else size="mini" type="text" @click="handleWarehousing(row)">{{$t('入仓')}}</el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -162,7 +165,7 @@ ...@@ -162,7 +165,7 @@
width="300px"> width="300px">
<div style="text-align: center">{{$t('在完成入仓前,您还可以')}}</div> <div style="text-align: center">{{$t('在完成入仓前,您还可以')}}</div>
<div style="text-align: center;padding: 15px 0"> <div style="text-align: center;padding: 15px 0">
<el-button type="info" @click="areaVisible = true">{{$t('选择储位')}}</el-button> <!-- <el-button type="info" @click="areaVisible = true">{{$t('选择储位')}}</el-button>-->
<el-button type="info" @click="isShowPrintTag = true">{{$t('打印标签')}}</el-button> <el-button type="info" @click="isShowPrintTag = true">{{$t('打印标签')}}</el-button>
</div> </div>
<div style="text-align: center"> <div style="text-align: center">
...@@ -212,6 +215,7 @@ import PrintWarehouseReceipt from "@/views/ecw/order/components/PrintWarehouseRe ...@@ -212,6 +215,7 @@ import PrintWarehouseReceipt from "@/views/ecw/order/components/PrintWarehouseRe
import imageUpload from "@/components/ImageUpload"; import imageUpload from "@/components/ImageUpload";
import {parseTime} from "@/utils/ruoyi" import {parseTime} from "@/utils/ruoyi"
import ImageAndVideoUpload from '@/components/ImageAndVideoUpload' import ImageAndVideoUpload from '@/components/ImageAndVideoUpload'
import Warehouse from "@/views/ecw/order/warehousing/components/Warehouse"
export default { export default {
name: "Warehousing", name: "Warehousing",
...@@ -223,12 +227,13 @@ export default { ...@@ -223,12 +227,13 @@ export default {
PrintWarehouseReceipt, PrintWarehouseReceipt,
imageUpload, imageUpload,
ImageAndVideoUpload, ImageAndVideoUpload,
Warehouse
}, },
mounted() { mounted() {
if(this.$route.query.id){ if(this.$route.query.id){
this.orderId = parseInt(this.$route.query.id || undefined) this.orderId = parseInt(this.$route.query.id || undefined)
getOrderWarehouseIn(this.orderId).then(r => this.orderItemList = r.data.reverse()) getOrderWarehouseIn(this.orderId).then(r => this.orderItemList = r.data)
getSpecialListByOrderId(this.orderId).then(r => this.specialList = r.data) getSpecialListByOrderId(this.orderId).then(r => this.specialList = r.data)
Promise.all([ Promise.all([
...@@ -286,6 +291,10 @@ export default { ...@@ -286,6 +291,10 @@ export default {
}, },
methods: { methods: {
getList(){
this.getOrder()
getOrderWarehouseIn(this.orderId).then(r => this.orderItemList = r.data)
},
getWarehousePictureList(){ getWarehousePictureList(){
return warehousePictureList({ return warehousePictureList({
bizId: this.order.orderId, bizId: this.order.orderId,
...@@ -439,7 +448,7 @@ export default { ...@@ -439,7 +448,7 @@ export default {
message: this.$t('货物退仓成功!') message: this.$t('货物退仓成功!')
}); });
getOrderWarehouseIn(this.orderId).then(r => this.orderItemList = r.data.reverse()) getOrderWarehouseIn(this.orderId).then(r => this.orderItemList = r.data)
this.getOrder() this.getOrder()
}) })
...@@ -452,7 +461,7 @@ export default { ...@@ -452,7 +461,7 @@ export default {
warehousingVisible(val) { warehousingVisible(val) {
if (!val){ if (!val){
this.getOrder() this.getOrder()
getOrderWarehouseIn(this.orderId).then(r => this.orderItemList = r.data.reverse()) getOrderWarehouseIn(this.orderId).then(r => this.orderItemList = r.data)
} }
}, },
orderSpecialNeeds(val){ orderSpecialNeeds(val){
......
...@@ -75,7 +75,11 @@ ...@@ -75,7 +75,11 @@
<el-table-column :label="$t('入库货物属性')"> <el-table-column :label="$t('入库货物属性')">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{$t('箱规')}}{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.boxGauge:0}}</p> <p>{{$t('箱规')}}{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.boxGauge:0}}</p>
<p>{{$t('品牌')}}<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.feeType" /></p> <p>{{$t('品牌')}}
<span v-if="row.brandName">{{row.brandName}}</span>
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.brandType" />
</p>
<!-- <p>{{$t('品牌')}}<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.feeType" /></p> -->
<p>{{$t('箱数')}}{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.cartonsNum:0}}&nbsp;&nbsp;</p> <p>{{$t('箱数')}}{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.cartonsNum:0}}&nbsp;&nbsp;</p>
<p>{{$t('体积')}}{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.volume:0}}CBM&nbsp;&nbsp;</p> <p>{{$t('体积')}}{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.volume:0}}CBM&nbsp;&nbsp;</p>
<p>{{$t('重量')}}{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.weight:0}}KG <p>{{$t('重量')}}{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.weight:0}}KG
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment