|
@@ -100,7 +100,9 @@
|
|
|
<span v-else>{{ row.contractNumber }}</span>
|
|
|
</template>
|
|
|
<template slot="priceCategory" slot-scope="{row,index}">
|
|
|
+ <span v-if="row.$cellEdit" class="required_fields">*</span>
|
|
|
<goods-select
|
|
|
+ style="width:90% !important;"
|
|
|
v-if="row.$cellEdit"
|
|
|
v-model="row.priceCategoryNames"
|
|
|
@valueName="(value) => valueName(value,row)"
|
|
@@ -111,7 +113,9 @@
|
|
|
<span v-else>{{ row.priceCategoryNames }}</span>
|
|
|
</template>
|
|
|
<template slot="cntrNo" slot-scope="{ row }">
|
|
|
+ <span v-if="row.$cellEdit" class="required_fields">*</span>
|
|
|
<el-input
|
|
|
+ style="width:90%"
|
|
|
v-if="row.$cellEdit"
|
|
|
v-model="row.cntrNo"
|
|
|
placeholder="请输入"
|
|
@@ -122,12 +126,15 @@
|
|
|
<span v-else>{{ row.cntrNo }}</span>
|
|
|
</template>
|
|
|
<template slot="billWeight" slot-scope="{ row }">
|
|
|
+ <span v-if="row.$cellEdit" class="required_fields">*</span>
|
|
|
<el-input
|
|
|
+ style="width:90%"
|
|
|
v-if="row.$cellEdit"
|
|
|
v-model="row.billWeight"
|
|
|
placeholder="请输入"
|
|
|
size="small"
|
|
|
oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d\d\d\d\d).*$/, "$1.$2")'
|
|
|
+ @input="billWeightChange(row)"
|
|
|
@change="totalChange(row.billWeight)"
|
|
|
></el-input>
|
|
|
<span v-else>{{ row.billWeight }}</span>
|
|
@@ -139,7 +146,6 @@
|
|
|
placeholder="请输入"
|
|
|
size="small"
|
|
|
oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d\d\d\d\d).*$/, "$1.$2")'
|
|
|
- @input="billWeightChange(row)"
|
|
|
@change="totalChange(row.invoiceWeight)"
|
|
|
></el-input>
|
|
|
<span v-else>{{ row.invoiceWeight }}</span>
|
|
@@ -156,7 +162,9 @@
|
|
|
<span v-else>{{ row.price }}</span>
|
|
|
</template>
|
|
|
<template slot="actualQuantity" slot-scope="{ row }">
|
|
|
+ <span v-if="row.$cellEdit" class="required_fields">*</span>
|
|
|
<el-input
|
|
|
+ style="width:90%"
|
|
|
v-if="row.$cellEdit"
|
|
|
v-model="row.actualQuantity"
|
|
|
placeholder="请输入"
|
|
@@ -248,9 +256,6 @@
|
|
|
|
|
|
<script>
|
|
|
import customerContact from "./config/customerContact.json"
|
|
|
-import commodity from "../invoice/config/commodity.json";
|
|
|
-import {getSysNo} from "@/api/importTrade/purchase";
|
|
|
-import {getDeptLazyTree, customerList} from "@/api/basicData/basicFeesDesc";
|
|
|
import {detailReceiptList,
|
|
|
submitReceiptList,
|
|
|
removeGoodsItem,
|
|
@@ -259,9 +264,6 @@ import {detailReceiptList,
|
|
|
confirmReceipt,
|
|
|
repealReceipt
|
|
|
} from "@/api/importTrade/receipt"
|
|
|
-import {
|
|
|
- getList
|
|
|
-} from "@/api/basicData/deliveryNotice"
|
|
|
import upLoadOption from "../../exportTrade/purchaseContract/config/uploadList.json";
|
|
|
import {detailListData } from "@/api/importTrade/purchase";
|
|
|
import { contrastObj,contrastList } from "@/util/contrastData";
|
|
@@ -269,7 +271,6 @@ import { getOrgOrderNo } from "@/api/importTrade/salesContract"
|
|
|
import procurementDetail from "@/components/procurement/purchase";
|
|
|
import {selectGoodsNum} from "@/api/basicData/inventoryAccount"
|
|
|
import _ from "lodash";
|
|
|
-import importInventory from "../../salesManagement/salesContract/config/importInventory.json";
|
|
|
|
|
|
export default {
|
|
|
name: "detailsPageEdit",
|
|
@@ -421,8 +422,8 @@ export default {
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
- label: '码单重量',
|
|
|
- prop: 'billWeight',
|
|
|
+ label: '发票重量',
|
|
|
+ prop: 'invoiceWeight',
|
|
|
disabled: true,
|
|
|
rules: [
|
|
|
{
|
|
@@ -433,8 +434,8 @@ export default {
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
- label: '发票重量',
|
|
|
- prop: 'invoiceWeight',
|
|
|
+ label: '码单重量',
|
|
|
+ prop: 'billWeight',
|
|
|
disabled: true,
|
|
|
rules: [
|
|
|
{
|
|
@@ -572,7 +573,13 @@ export default {
|
|
|
cntrNo:row.cntrNo
|
|
|
}
|
|
|
selectGoodsNum(params).then(res =>{
|
|
|
- this.$set(this.contactsData[row.$index],"inventoryNumber",res.data.data)
|
|
|
+ if(res.data.data){
|
|
|
+ this.$set(this.contactsData[row.$index],"inventoryNumber",res.data.data.inQuantity)
|
|
|
+ this.$set(this.contactsData[row.$index],"inWeight",res.data.data.inWeight)
|
|
|
+ }else {
|
|
|
+ this.$set(this.contactsData[row.$index],"inventoryNumber",0.00)
|
|
|
+ this.$set(this.contactsData[row.$index],"inWeight",0.00)
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
},
|
|
@@ -684,23 +691,31 @@ export default {
|
|
|
});
|
|
|
this.contactsData.splice(index, 1);
|
|
|
}
|
|
|
+ }).finally(()=>{
|
|
|
+ this.totalChange()
|
|
|
})
|
|
|
},
|
|
|
//修改提交触发
|
|
|
editCustomer(status) {
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
for (let i = 0; i < this.contactsData.length; i++) {
|
|
|
- if (this.contactsData[i].billNo === "") {
|
|
|
+ if (this.contactsData[i].billNo === (null || "" )) {
|
|
|
return this.$message.error(`请输入第${i + 1}行的提单号`);
|
|
|
}
|
|
|
- if (this.contactsData[i].contractNumber === "") {
|
|
|
+ if (this.contactsData[i].contractNumber === (null || "" )) {
|
|
|
return this.$message.error(`请输入第${i + 1}行的合同号`);
|
|
|
}
|
|
|
- if (this.contactsData[i].priceCategory === "") {
|
|
|
+ if (this.contactsData[i].priceCategory === (null || "" )) {
|
|
|
return this.$message.error(`请输入第${i + 1}行的货物品种`);
|
|
|
}
|
|
|
- if (this.contactsData[i].actualQuantity === null) {
|
|
|
- return this.$message.error(`请输入第${i + 1}行的数量`);
|
|
|
+ if (this.contactsData[i].cntrNo === (null || "" )) {
|
|
|
+ return this.$message.error(`请输入第${i + 1}行的箱号`);
|
|
|
+ }
|
|
|
+ if (this.contactsData[i].actualQuantity === (null || "" )) {
|
|
|
+ return this.$message.error(`请输入第${i + 1}行的件数`);
|
|
|
+ }
|
|
|
+ if (this.contactsData[i].billWeight === (null || "" )) {
|
|
|
+ return this.$message.error(`请输入第${i + 1}行的码单重量`);
|
|
|
}
|
|
|
}
|
|
|
this.form.billNo = this.contactsData.map(item =>{return item.billNo}).join(",")
|
|
@@ -761,10 +776,22 @@ export default {
|
|
|
type: "warning"
|
|
|
}).then(()=>{
|
|
|
this.form.deliveryItemsList = this.contactsData;
|
|
|
+
|
|
|
confirmReceipt(this.form).then(res =>{
|
|
|
if(res.data.success){
|
|
|
this.$message.success("收货成功!")
|
|
|
+ this.form = res.data.data;
|
|
|
+ this.oldForm = Object.assign({},res.data.data);
|
|
|
this.receiptDisable = res.data.data.deliveryStatus === "已收货" ? true :false
|
|
|
+ this.configuration.dicData = this.form.corpName
|
|
|
+ if(this.form.deliveryItemsList){
|
|
|
+ this.contactsData = this.form.deliveryItemsList
|
|
|
+ this.oldContactsData = this.deepClone(this.form.deliveryItemsList)
|
|
|
+ }
|
|
|
+ if(this.form.deliveryFilesList){
|
|
|
+ this.upLoadData = this.form.deliveryFilesList
|
|
|
+ this.oldUpLoadData = this.deepClone(this.form.deliveryFilesList)
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
}).finally(()=>{
|
|
@@ -780,7 +807,18 @@ export default {
|
|
|
repealReceipt(this.form).then(res =>{
|
|
|
if(res.data.success){
|
|
|
this.$message.success("撤销成功!")
|
|
|
+ this.form = res.data.data;
|
|
|
+ this.oldForm = Object.assign({},res.data.data);
|
|
|
this.receiptDisable = res.data.data.deliveryStatus === "已收货" ? true :false
|
|
|
+ this.configuration.dicData = this.form.corpName
|
|
|
+ if(this.form.deliveryItemsList){
|
|
|
+ this.contactsData = this.form.deliveryItemsList
|
|
|
+ this.oldContactsData = this.deepClone(this.form.deliveryItemsList)
|
|
|
+ }
|
|
|
+ if(this.form.deliveryFilesList){
|
|
|
+ this.upLoadData = this.form.deliveryFilesList
|
|
|
+ this.oldUpLoadData = this.deepClone(this.form.deliveryFilesList)
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
}).finally(()=>{
|