|
@@ -272,16 +272,16 @@
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="计费单位" prop="fFeetunit">
|
|
|
+ <el-form-item label="计费单位" prop="fFeetUnit">
|
|
|
<el-select
|
|
|
- v-model="form.fFeetunit"
|
|
|
+ v-model="form.fFeetUnit"
|
|
|
placeholder="请选择计费单位"
|
|
|
clearable
|
|
|
:disabled="browseStatus || formBrowseStatus"
|
|
|
style="width: 80%"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="(item, index) in fFeetunitOptions"
|
|
|
+ v-for="(item, index) in fFeetUnitOptions"
|
|
|
:key="index.dictValue"
|
|
|
:label="item.dictLabel"
|
|
|
:value="item.dictValue"
|
|
@@ -1262,7 +1262,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="fFeeunitid"
|
|
|
+ prop="fFeeUnitid"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
width="180px"
|
|
@@ -1270,13 +1270,14 @@
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<el-select
|
|
|
- v-model="scope.row.fFeeunitid"
|
|
|
+ v-model="scope.row.fFeeUnitid"
|
|
|
placeholder="请选择计价单位"
|
|
|
clearable
|
|
|
:disabled="browseStatus"
|
|
|
+ @change="changeFeeUnit(scope.row)"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="(item, index) in fFeetunitOptions"
|
|
|
+ v-for="(item, index) in fFeetUnitOptions"
|
|
|
:key="index.dictValue"
|
|
|
:label="item.dictLabel"
|
|
|
:value="item.dictValue"
|
|
@@ -1626,7 +1627,7 @@
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column
|
|
|
- prop="fFeeunitid"
|
|
|
+ prop="fFeeUnitid"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
width="180px"
|
|
@@ -1634,15 +1635,16 @@
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<el-select
|
|
|
- v-model="scope.row.fFeeunitid"
|
|
|
+ v-model="scope.row.fFeeUnitid"
|
|
|
filterable
|
|
|
remote
|
|
|
:disabled="browseStatus"
|
|
|
:remote-method="corpsRemoteMethod"
|
|
|
placeholder="计价单位"
|
|
|
+ @change="changeFeeUnit(scope.row)"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="(item, index) in fFeetunitOptions"
|
|
|
+ v-for="(item, index) in fFeetUnitOptions"
|
|
|
:key="index.dictValue"
|
|
|
:label="item.dictLabel"
|
|
|
:value="item.dictValue"
|
|
@@ -1980,7 +1982,6 @@
|
|
|
v-model.number="importList.fGrossweight"
|
|
|
v-input-limit="2"
|
|
|
style="width: 100%"
|
|
|
- disabled
|
|
|
placeholder="毛重"
|
|
|
/>
|
|
|
</el-form-item>
|
|
@@ -1991,7 +1992,6 @@
|
|
|
v-model.number="importList.fNetweight"
|
|
|
v-input-limit="2"
|
|
|
style="width: 100%"
|
|
|
- disabled
|
|
|
placeholder="毛重"
|
|
|
/>
|
|
|
</el-form-item>
|
|
@@ -2012,7 +2012,6 @@
|
|
|
<el-select
|
|
|
placeholder="请选择箱型"
|
|
|
v-model="importList.fCntrtype"
|
|
|
- size="mini"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="(item, index) in cntrList"
|
|
@@ -2884,7 +2883,7 @@
|
|
|
label="费用名称"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
- prop="fFeeunitid"
|
|
|
+ prop="fFeeUnitid"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
width="180px"
|
|
@@ -2892,14 +2891,14 @@
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<el-select
|
|
|
- v-model="scope.row.fFeeunitid"
|
|
|
+ v-model="scope.row.fFeeUnitid"
|
|
|
placeholder="请选择计价单位"
|
|
|
@change="changeFeeUnit(scope.row)"
|
|
|
disabled
|
|
|
clearable
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="(dict, index) in fFeetunitOptions"
|
|
|
+ v-for="(dict, index) in fFeetUnitOptions"
|
|
|
:key="index.dictValue"
|
|
|
:label="dict.dictLabel"
|
|
|
:value="dict.dictValue"
|
|
@@ -3053,7 +3052,7 @@ export default {
|
|
|
fMblno: [{ required: true, message: " ", trigger: "blur" }],
|
|
|
fBsdeptid: [{ required: true, message: " ", trigger: "blur" }],
|
|
|
fCorpid: [{ required: true, message: " ", trigger: "blur" }],
|
|
|
- fFeetunit: [{ required: true, message: " ", trigger: "blur" }],
|
|
|
+ fFeetUnit: [{ required: true, message: " ", trigger: "blur" }],
|
|
|
fPlanqty: [{ required: true, message: " ", trigger: "blur" }],
|
|
|
fPlangrossweight: [{ required: true, message: " ", trigger: "blur" }],
|
|
|
fPlannetweight: [{ required: true, message: " ", trigger: "blur" }],
|
|
@@ -3088,7 +3087,7 @@ export default {
|
|
|
businessTypeOption: [],
|
|
|
fCompanyOptIons: [],
|
|
|
fleetOptions: [],
|
|
|
- fFeetunitOptions: [],
|
|
|
+ fFeetUnitOptions: [],
|
|
|
current: "",
|
|
|
before: "",
|
|
|
contrOl: false,
|
|
@@ -3161,7 +3160,7 @@ export default {
|
|
|
localStorage.setItem("businessTypeList", JSON.stringify(response.data));
|
|
|
});
|
|
|
this.getDicts("data_unitfees").then((response) => {
|
|
|
- this.fFeetunitOptions = response.data;
|
|
|
+ this.fFeetUnitOptions = response.data;
|
|
|
});
|
|
|
this.getDicts("data_trademodes").then((response) => {
|
|
|
this.fTrademodeidOptions = response.data;
|
|
@@ -3298,6 +3297,53 @@ export default {
|
|
|
return this.$message.error("请勿重复卸货");
|
|
|
}
|
|
|
}
|
|
|
+ if (this.CntrTable.length > 0) {
|
|
|
+ let arr = [];
|
|
|
+ this.CntrTable.map((e) => {
|
|
|
+ this.cntrList.map((item) => {
|
|
|
+ if (item.fId == e.fCntrid) {
|
|
|
+ arr.push(item.fName + "X" + e.fCntrcount);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ arr = [...new Set(arr)];
|
|
|
+ this.form.fCntval = arr.join(",");
|
|
|
+ } else {
|
|
|
+ this.form.fCntval = null;
|
|
|
+ }
|
|
|
+ if (this.detailList.length > 0) {
|
|
|
+ let arr = [];
|
|
|
+ this.detailList.map((e) => {
|
|
|
+ this.goodsOptions.map((item) => {
|
|
|
+ if (e.fGoodsid == item.fId) {
|
|
|
+ arr.push(item.fName);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ arr = [...new Set(arr)];
|
|
|
+ this.form.fProductName = arr.join(",");
|
|
|
+ } else {
|
|
|
+ this.form.fProductName = "";
|
|
|
+ }
|
|
|
+ if (this.detailList.length > 0) {
|
|
|
+ let arr = [];
|
|
|
+ this.detailList.map((e) => {
|
|
|
+ arr.push(e.fMarks);
|
|
|
+ });
|
|
|
+ arr = [...new Set(arr)];
|
|
|
+ this.form.fMarks = arr.join(",");
|
|
|
+ } else {
|
|
|
+ this.form.fMarks = "";
|
|
|
+ }
|
|
|
+ if (this.detailList.length == 0) {
|
|
|
+ this.form.fNetweight = 0;
|
|
|
+ this.form.fPlanvolumn = 0;
|
|
|
+ this.form.fGrossweight = 0;
|
|
|
+ } else {
|
|
|
+ this.form.fNetweight = this.fNetweight;
|
|
|
+ this.form.fPlanvolumn = this.fPlanvolumn;
|
|
|
+ this.form.fGrossweight = this.fGrossweight;
|
|
|
+ }
|
|
|
let formData = new window.FormData();
|
|
|
formData.append("warehouseBills", JSON.stringify(this.form));
|
|
|
formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
|
|
@@ -3343,6 +3389,53 @@ export default {
|
|
|
return this.$message.error("请存在未卸货的数据");
|
|
|
}
|
|
|
}
|
|
|
+ if (this.CntrTable.length > 0) {
|
|
|
+ let arr = [];
|
|
|
+ this.CntrTable.map((e) => {
|
|
|
+ this.cntrList.map((item) => {
|
|
|
+ if (item.fId == e.fCntrid) {
|
|
|
+ arr.push(item.fName + "X" + e.fCntrcount);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ arr = [...new Set(arr)];
|
|
|
+ this.form.fCntval = arr.join(",");
|
|
|
+ } else {
|
|
|
+ this.form.fCntval = null;
|
|
|
+ }
|
|
|
+ if (this.detailList.length > 0) {
|
|
|
+ let arr = [];
|
|
|
+ this.detailList.map((e) => {
|
|
|
+ this.goodsOptions.map((item) => {
|
|
|
+ if (e.fGoodsid == item.fId) {
|
|
|
+ arr.push(item.fName);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ arr = [...new Set(arr)];
|
|
|
+ this.form.fProductName = arr.join(",");
|
|
|
+ } else {
|
|
|
+ this.form.fProductName = "";
|
|
|
+ }
|
|
|
+ if (this.detailList.length > 0) {
|
|
|
+ let arr = [];
|
|
|
+ this.detailList.map((e) => {
|
|
|
+ arr.push(e.fMarks);
|
|
|
+ });
|
|
|
+ arr = [...new Set(arr)];
|
|
|
+ this.form.fMarks = arr.join(",");
|
|
|
+ } else {
|
|
|
+ this.form.fMarks = "";
|
|
|
+ }
|
|
|
+ if (this.detailList.length == 0) {
|
|
|
+ this.form.fNetweight = 0;
|
|
|
+ this.form.fPlanvolumn = 0;
|
|
|
+ this.form.fGrossweight = 0;
|
|
|
+ } else {
|
|
|
+ this.form.fNetweight = this.fNetweight;
|
|
|
+ this.form.fPlanvolumn = this.fPlanvolumn;
|
|
|
+ this.form.fGrossweight = this.fGrossweight;
|
|
|
+ }
|
|
|
let formData = new window.FormData();
|
|
|
formData.append("warehouseBills", JSON.stringify(this.form));
|
|
|
formData.append("warehousebillsitems", JSON.stringify(this.Printinglist));
|
|
@@ -3387,6 +3480,53 @@ export default {
|
|
|
return this.$message.error("请存在未入库的数据");
|
|
|
}
|
|
|
}
|
|
|
+ if (this.CntrTable.length > 0) {
|
|
|
+ let arr = [];
|
|
|
+ this.CntrTable.map((e) => {
|
|
|
+ this.cntrList.map((item) => {
|
|
|
+ if (item.fId == e.fCntrid) {
|
|
|
+ arr.push(item.fName + "X" + e.fCntrcount);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ arr = [...new Set(arr)];
|
|
|
+ this.form.fCntval = arr.join(",");
|
|
|
+ } else {
|
|
|
+ this.form.fCntval = null;
|
|
|
+ }
|
|
|
+ if (this.detailList.length > 0) {
|
|
|
+ let arr = [];
|
|
|
+ this.detailList.map((e) => {
|
|
|
+ this.goodsOptions.map((item) => {
|
|
|
+ if (e.fGoodsid == item.fId) {
|
|
|
+ arr.push(item.fName);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ arr = [...new Set(arr)];
|
|
|
+ this.form.fProductName = arr.join(",");
|
|
|
+ } else {
|
|
|
+ this.form.fProductName = "";
|
|
|
+ }
|
|
|
+ if (this.detailList.length > 0) {
|
|
|
+ let arr = [];
|
|
|
+ this.detailList.map((e) => {
|
|
|
+ arr.push(e.fMarks);
|
|
|
+ });
|
|
|
+ arr = [...new Set(arr)];
|
|
|
+ this.form.fMarks = arr.join(",");
|
|
|
+ } else {
|
|
|
+ this.form.fMarks = "";
|
|
|
+ }
|
|
|
+ if (this.detailList.length == 0) {
|
|
|
+ this.form.fNetweight = 0;
|
|
|
+ this.form.fPlanvolumn = 0;
|
|
|
+ this.form.fGrossweight = 0;
|
|
|
+ } else {
|
|
|
+ this.form.fNetweight = this.fNetweight;
|
|
|
+ this.form.fPlanvolumn = this.fPlanvolumn;
|
|
|
+ this.form.fGrossweight = this.fGrossweight;
|
|
|
+ }
|
|
|
// 撤回入库
|
|
|
let formData = new window.FormData();
|
|
|
formData.append("warehouseBills", JSON.stringify(this.form));
|
|
@@ -3446,6 +3586,7 @@ export default {
|
|
|
this.$set(this.form, "fBstime", Date.parse(this.form.fBstime));
|
|
|
this.$set(this.form, "createTime", Date.parse(this.form.createTime));
|
|
|
this.$set(this.form, "fChargedate", Date.parse(this.form.fChargedate));
|
|
|
+ this.$set(this.form, "fFeetUnit", this.form.fFeetunit);
|
|
|
if (this.form.fTrademodeid) {
|
|
|
this.$set(
|
|
|
this.form,
|
|
@@ -3457,10 +3598,14 @@ export default {
|
|
|
this.$set(this.form, "fStltypeid", this.form.fStltypeid.toString());
|
|
|
}
|
|
|
if (!this.copyStatus) {
|
|
|
- this.detailList = response.data.warehouseBillsItem;
|
|
|
+ if (response.data.warehouseBillsItem) {
|
|
|
+ this.detailList = response.data.warehouseBillsItem;
|
|
|
+ } else {
|
|
|
+ this.detailList = [];
|
|
|
+ }
|
|
|
response.data.warehousebillsfeesCr.map((e) => {
|
|
|
if (e.fFeeunitid) {
|
|
|
- e.fFeeunitid = e.fFeeunitid.toString();
|
|
|
+ e.fFeeUnitid = e.fFeeunitid.toString();
|
|
|
}
|
|
|
if (e.fStltypeid || e.fStltypeid == 0) {
|
|
|
e.fStltypeid = e.fStltypeid.toString();
|
|
@@ -3469,7 +3614,7 @@ export default {
|
|
|
this.warehouseCrList = response.data.warehousebillsfeesCr;
|
|
|
response.data.warehousebillsfeesDr.map((e) => {
|
|
|
if (e.fFeeunitid) {
|
|
|
- e.fFeeunitid = e.fFeeunitid.toString();
|
|
|
+ e.fFeeUnitid = e.fFeeunitid.toString();
|
|
|
}
|
|
|
if (e.fStltypeid || e.fStltypeid == 0) {
|
|
|
e.fStltypeid = e.fStltypeid.toString();
|
|
@@ -3480,8 +3625,14 @@ export default {
|
|
|
if (response.data.enclosures) {
|
|
|
this.relevantAttachments = response.data.enclosures;
|
|
|
}
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
+ this.$set(this.form, "fId", null);
|
|
|
this.$set(this.form, "fMblno", null);
|
|
|
+ this.$set(this.form, "fMarks", null);
|
|
|
+ this.$set(this.form, "fProductName", null);
|
|
|
+ this.$set(this.form, "fNetweight", 0);
|
|
|
+ this.$set(this.form, "fPlanvolumn", 0);
|
|
|
+ this.$set(this.form, "fGrossweight", 0);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -3510,7 +3661,7 @@ export default {
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
- if (!this.warehouseDrList[item].fFeeunitid) {
|
|
|
+ if (!this.warehouseDrList[item].fFeeUnitid) {
|
|
|
if (item === "fBusinessType") {
|
|
|
} else {
|
|
|
this.$message.error(
|
|
@@ -3540,7 +3691,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (!this.warehouseCrList[item].fFeeunitid) {
|
|
|
+ if (!this.warehouseCrList[item].fFeeUnitid) {
|
|
|
if (item === "fBusinessType") {
|
|
|
} else {
|
|
|
this.$message.error(
|
|
@@ -3550,9 +3701,56 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- let formData = new window.FormData();
|
|
|
// 附件数据
|
|
|
- this.form.fBillingway = this.form.fFeetunit;
|
|
|
+ this.form.fBillingway = this.form.fFeetUnit;
|
|
|
+ if (this.detailList.length == 0) {
|
|
|
+ this.form.fNetweight = 0;
|
|
|
+ this.form.fPlanvolumn = 0;
|
|
|
+ this.form.fGrossweight = 0;
|
|
|
+ } else {
|
|
|
+ this.form.fNetweight = this.fNetweight;
|
|
|
+ this.form.fPlanvolumn = this.fPlanvolumn;
|
|
|
+ this.form.fGrossweight = this.fGrossweight;
|
|
|
+ }
|
|
|
+ if (this.CntrTable.length > 0) {
|
|
|
+ let arr = [];
|
|
|
+ this.CntrTable.map((e) => {
|
|
|
+ this.cntrList.map((item) => {
|
|
|
+ if (item.fId == e.fCntrid) {
|
|
|
+ arr.push(item.fName + "X" + e.fCntrcount);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ arr = [...new Set(arr)];
|
|
|
+ this.form.fCntval = arr.join(",");
|
|
|
+ } else {
|
|
|
+ this.form.fCntval = null;
|
|
|
+ }
|
|
|
+ if (this.detailList.length > 0) {
|
|
|
+ let arr = [];
|
|
|
+ this.detailList.map((e) => {
|
|
|
+ this.goodsOptions.map((item) => {
|
|
|
+ if (e.fGoodsid == item.fId) {
|
|
|
+ arr.push(item.fName);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ arr = [...new Set(arr)];
|
|
|
+ this.form.fProductName = arr.join(",");
|
|
|
+ } else {
|
|
|
+ this.form.fProductName = "";
|
|
|
+ }
|
|
|
+ if (this.detailList.length > 0) {
|
|
|
+ let arr = [];
|
|
|
+ this.detailList.map((e) => {
|
|
|
+ arr.push(e.fMarks);
|
|
|
+ });
|
|
|
+ arr = [...new Set(arr)];
|
|
|
+ this.form.fMarks = arr.join(",");
|
|
|
+ } else {
|
|
|
+ this.form.fMarks = "";
|
|
|
+ }
|
|
|
+ let formData = new window.FormData();
|
|
|
formData.append("tWarehouseBills", JSON.stringify(this.form));
|
|
|
// 库存明细
|
|
|
formData.append(
|
|
@@ -3587,12 +3785,60 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- saveForm() {
|
|
|
+ saveForm(status) {
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
+ this.form.fBillingway = this.form.fFeetUnit;
|
|
|
+ if (this.detailList.length == 0) {
|
|
|
+ this.form.fNetweight = 0;
|
|
|
+ this.form.fPlanvolumn = 0;
|
|
|
+ this.form.fGrossweight = 0;
|
|
|
+ } else {
|
|
|
+ this.form.fNetweight = this.fNetweight;
|
|
|
+ this.form.fPlanvolumn = this.fPlanvolumn;
|
|
|
+ this.form.fGrossweight = this.fGrossweight;
|
|
|
+ }
|
|
|
let formData = new window.FormData();
|
|
|
// 附件数据
|
|
|
- this.form.fBillingway = this.form.fFeetunit;
|
|
|
+ this.form.fQty = this.fQty;
|
|
|
+ if (this.CntrTable.length > 0) {
|
|
|
+ let arr = [];
|
|
|
+ this.CntrTable.map((e) => {
|
|
|
+ this.cntrList.map((item) => {
|
|
|
+ if (item.fId == e.fCntrid) {
|
|
|
+ arr.push(item.fName + "X" + e.fCntrcount);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ arr = [...new Set(arr)];
|
|
|
+ this.form.fCntval = arr.join(",");
|
|
|
+ } else {
|
|
|
+ this.form.fCntval = null;
|
|
|
+ }
|
|
|
+ if (this.detailList.length > 0) {
|
|
|
+ let arr = [];
|
|
|
+ this.detailList.map((e) => {
|
|
|
+ this.goodsOptions.map((item) => {
|
|
|
+ if (e.fGoodsid == item.fId) {
|
|
|
+ arr.push(item.fName);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ arr = [...new Set(arr)];
|
|
|
+ this.form.fProductName = arr.join(",");
|
|
|
+ } else {
|
|
|
+ this.form.fProductName = "";
|
|
|
+ }
|
|
|
+ if (this.detailList.length > 0) {
|
|
|
+ let arr = [];
|
|
|
+ this.detailList.map((e) => {
|
|
|
+ arr.push(e.fMarks);
|
|
|
+ });
|
|
|
+ arr = [...new Set(arr)];
|
|
|
+ this.form.fMarks = arr.join(",");
|
|
|
+ } else {
|
|
|
+ this.form.fMarks = "";
|
|
|
+ }
|
|
|
formData.append("tWarehouseBills", JSON.stringify(this.form));
|
|
|
// 库存明细
|
|
|
formData.append(
|
|
@@ -3634,37 +3880,43 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
} else {
|
|
|
- this.mblnoStatus = "";
|
|
|
- this.form = response.data.warehouseBills;
|
|
|
- this.$set(this.form, "fEta", Date.parse(this.form.fEta));
|
|
|
- this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
|
|
|
- this.$set(this.form, "fBstime", Date.parse(this.form.fBstime));
|
|
|
- this.$set(
|
|
|
- this.form,
|
|
|
- "createTime",
|
|
|
- Date.parse(this.form.createTime)
|
|
|
- );
|
|
|
- this.$set(
|
|
|
- this.form,
|
|
|
- "fChargedate",
|
|
|
- Date.parse(this.form.fChargedate)
|
|
|
- );
|
|
|
- if (this.form.fTrademodeid) {
|
|
|
+ if ((response.code = 200)) {
|
|
|
+ this.mblnoStatus = "";
|
|
|
+ this.form = response.data.warehouseBills;
|
|
|
+ this.$set(this.form, "fEta", Date.parse(this.form.fEta));
|
|
|
+ this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
|
|
|
+ this.$set(this.form, "fBstime", Date.parse(this.form.fBstime));
|
|
|
+ this.$set(this.form, "fFeetUnit", this.form.fFeetunit);
|
|
|
this.$set(
|
|
|
this.form,
|
|
|
- "fTrademodeid",
|
|
|
- this.form.fTrademodeid.toString()
|
|
|
+ "createTime",
|
|
|
+ Date.parse(this.form.createTime)
|
|
|
);
|
|
|
- }
|
|
|
- if (this.form.fStltypeid || this.form.fStltypeid == 0) {
|
|
|
this.$set(
|
|
|
this.form,
|
|
|
- "fStltypeid",
|
|
|
- this.form.fStltypeid.toString()
|
|
|
+ "fChargedate",
|
|
|
+ Date.parse(this.form.fChargedate)
|
|
|
);
|
|
|
+ if (this.form.fTrademodeid) {
|
|
|
+ this.$set(
|
|
|
+ this.form,
|
|
|
+ "fTrademodeid",
|
|
|
+ this.form.fTrademodeid.toString()
|
|
|
+ );
|
|
|
+ }
|
|
|
+ if (this.form.fStltypeid || this.form.fStltypeid == 0) {
|
|
|
+ this.$set(
|
|
|
+ this.form,
|
|
|
+ "fStltypeid",
|
|
|
+ this.form.fStltypeid.toString()
|
|
|
+ );
|
|
|
+ }
|
|
|
+ this.detailList = response.data.warehousebillsitems;
|
|
|
+ this.msgSuccess("保存成功");
|
|
|
+ if (status == "goBack") {
|
|
|
+ this.cancel();
|
|
|
+ }
|
|
|
}
|
|
|
- this.detailList = response.data.warehousebillsitems;
|
|
|
- this.msgSuccess("保存成功");
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -3897,8 +4149,8 @@ export default {
|
|
|
}
|
|
|
operationAgreement(data).then((response) => {
|
|
|
response.rows.map((e) => {
|
|
|
- if (e.fFeeunitid) {
|
|
|
- e.fFeeunitid = e.fFeeunitid.toString();
|
|
|
+ if (e.fFeeUnitid) {
|
|
|
+ e.fFeeUnitid = e.fFeeUnitid.toString();
|
|
|
}
|
|
|
});
|
|
|
this.tasklegList = response.rows;
|
|
@@ -4056,7 +4308,10 @@ export default {
|
|
|
this.reset();
|
|
|
this.fixdetaiNum = null;
|
|
|
this.fixdetaiNum = index;
|
|
|
+ console.log(row);
|
|
|
row.fBsdate = new Date(row.fBsdate).getTime();
|
|
|
+ row.fBusinessType = row.fBusinessType.toString();
|
|
|
+ row.fCntrtype = Number(row.fCntrtype);
|
|
|
this.importList = row;
|
|
|
this.weightList = true;
|
|
|
},
|
|
@@ -4071,6 +4326,13 @@ export default {
|
|
|
this.sumMum += e.fQty;
|
|
|
}
|
|
|
});
|
|
|
+ if (this.detailList.length == 0) {
|
|
|
+ this.form.fProductName = "";
|
|
|
+ this.form.fMarks = "";
|
|
|
+ this.form.fNetweight = 0;
|
|
|
+ this.form.fPlanvolumn = 0;
|
|
|
+ this.form.fGrossweight = 0;
|
|
|
+ }
|
|
|
},
|
|
|
// 新增附件上传
|
|
|
addRelevt() {
|
|
@@ -4092,7 +4354,7 @@ export default {
|
|
|
this.warehouseDrList.push({
|
|
|
fCorpid: null,
|
|
|
fFeeid: null,
|
|
|
- fFeeunitid: "",
|
|
|
+ fFeeUnitid: "",
|
|
|
fQty: null,
|
|
|
fUnitprice: null,
|
|
|
fAmount: null,
|
|
@@ -4127,7 +4389,7 @@ export default {
|
|
|
this.warehouseCrList.push({
|
|
|
fCorpid: null,
|
|
|
fFeeid: null,
|
|
|
- fFeeunitid: "",
|
|
|
+ fFeeUnitid: "",
|
|
|
fQty: null,
|
|
|
fUnitprice: null,
|
|
|
fAmount: null,
|
|
@@ -4162,13 +4424,13 @@ export default {
|
|
|
} else {
|
|
|
this.dialogWhgenlegList.map((e) => {
|
|
|
let qty = 1;
|
|
|
- if (e.fFeeunitid == 1) {
|
|
|
+ if (e.fFeeUnitid == 1) {
|
|
|
qty = this.fQty;
|
|
|
- } else if (e.fFeeunitid == 2) {
|
|
|
+ } else if (e.fFeeUnitid == 2) {
|
|
|
qty = (this.fGrossweight / 1000).toFixed(2);
|
|
|
- } else if (e.fFeeunitid == 3) {
|
|
|
+ } else if (e.fFeeUnitid == 3) {
|
|
|
qty = (this.fNetweight / 1000).toFixed(2);
|
|
|
- } else if (e.fFeeunitid == 7) {
|
|
|
+ } else if (e.fFeeUnitid == 7) {
|
|
|
qty = this.fCntqty;
|
|
|
}
|
|
|
let fAmount = 0;
|
|
@@ -4179,7 +4441,7 @@ export default {
|
|
|
fQty: qty,
|
|
|
fCorpid: e.fCorpid,
|
|
|
fFeeid: e.feeFId,
|
|
|
- fFeeunitid: e.fFeeunitid,
|
|
|
+ fFeeUnitid: e.fFeeUnitid,
|
|
|
fUnitprice: e.fPrice,
|
|
|
fCurrency: "RMB",
|
|
|
fExrate: 1,
|
|
@@ -4196,7 +4458,7 @@ export default {
|
|
|
fQty: qty,
|
|
|
fCorpid: e.fCorpid,
|
|
|
fFeeid: e.feeId,
|
|
|
- fFeeunitid: e.fFeeunitid,
|
|
|
+ fFeeUnitid: e.fFeeUnitid,
|
|
|
fUnitprice: e.fPrice,
|
|
|
fCurrency: "RMB",
|
|
|
fExrate: 1,
|
|
@@ -4289,9 +4551,81 @@ export default {
|
|
|
}
|
|
|
this.$set(row, "fAmount", Number(fUnitprice) * Number(fQty)).toFixed(2);
|
|
|
},
|
|
|
+ // 变更计价单位
|
|
|
+ changeFeeUnit(row) {
|
|
|
+ if (!row.fFeeUnitid) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (row.fFeeUnitid === "2") {
|
|
|
+ this.$set(row, "fQty", (this.fGrossweight / 1000).toFixed(2));
|
|
|
+ } else if (row.fFeeUnitid === "1") {
|
|
|
+ this.$set(row, "fQty", this.fQty.toFixed(2));
|
|
|
+ } else if (row.fFeeUnitid === "3") {
|
|
|
+ this.$set(row, "fQty", (this.fNetweight / 1000).toFixed(2));
|
|
|
+ } else if (row.fFeeUnitid === "7") {
|
|
|
+ this.$set(row, "fQty", this.fCntqty);
|
|
|
+ } else {
|
|
|
+ this.$set(row, "fQty", 0);
|
|
|
+ }
|
|
|
+ if (row.fUnitprice) {
|
|
|
+ this.$set(
|
|
|
+ row,
|
|
|
+ "fAmount",
|
|
|
+ parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2)
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
//打印
|
|
|
addprint(status) {
|
|
|
if (status == "zyd") {
|
|
|
+ if (this.CntrTable.length > 0) {
|
|
|
+ let arr = [];
|
|
|
+ this.CntrTable.map((e) => {
|
|
|
+ this.cntrList.map((item) => {
|
|
|
+ if (item.fId == e.fCntrid) {
|
|
|
+ arr.push(item.fName + "X" + e.fCntrcount);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ arr = [...new Set(arr)];
|
|
|
+ this.form.fCntval = arr.join(",");
|
|
|
+ } else {
|
|
|
+ this.form.fCntval = null;
|
|
|
+ }
|
|
|
+ if (this.detailList.length > 0) {
|
|
|
+ let arr = [];
|
|
|
+ this.detailList.map((e) => {
|
|
|
+ this.goodsOptions.map((item) => {
|
|
|
+ if (e.fGoodsid == item.fId) {
|
|
|
+ arr.push(item.fName);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ arr = [...new Set(arr)];
|
|
|
+ this.form.fProductName = arr.join(",");
|
|
|
+ } else {
|
|
|
+ this.form.fProductName = "";
|
|
|
+ }
|
|
|
+ if (this.detailList.length > 0) {
|
|
|
+ let arr = [];
|
|
|
+ this.detailList.map((e) => {
|
|
|
+ arr.push(e.fMarks);
|
|
|
+ });
|
|
|
+ arr = [...new Set(arr)];
|
|
|
+ this.form.fMarks = arr.join(",");
|
|
|
+ } else {
|
|
|
+ this.form.fMarks = "";
|
|
|
+ }
|
|
|
+ this.form.fBillingway = this.form.fFeetUnit;
|
|
|
+ if (this.detailList.length == 0) {
|
|
|
+ this.form.fNetweight = 0;
|
|
|
+ this.form.fPlanvolumn = 0;
|
|
|
+ this.form.fGrossweight = 0;
|
|
|
+ } else {
|
|
|
+ this.form.fNetweight = this.fNetweight;
|
|
|
+ this.form.fPlanvolumn = this.fPlanvolumn;
|
|
|
+ this.form.fGrossweight = this.fGrossweight;
|
|
|
+ }
|
|
|
let formData = new window.FormData();
|
|
|
formData.append("warehouseBills", JSON.stringify(this.form));
|
|
|
formData.append(
|
|
@@ -4341,14 +4675,16 @@ export default {
|
|
|
},
|
|
|
goBack() {
|
|
|
this.$confirm("是否确定返回列表?", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
+ confirmButtonText: "保存",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
})
|
|
|
.then(() => {
|
|
|
- this.cancel();
|
|
|
+ this.saveForm("goBack");
|
|
|
})
|
|
|
- .catch(() => {});
|
|
|
+ .catch(() => {
|
|
|
+ this.cancel();
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
watch: {
|