|
|
@@ -2308,12 +2308,14 @@ export default {
|
|
|
let arr = selection.map(item => {
|
|
|
let obj = {};
|
|
|
if (dc === "C") {
|
|
|
- // 结算单位拿主表客户名称
|
|
|
+ // 应付生成应收时,结算单位拿主表客户名称
|
|
|
obj.corpId = this.assemblyForm.corpId;
|
|
|
obj.corpCnName = this.assemblyForm.corpCnName;
|
|
|
obj.corpEnName = this.assemblyForm.corpEnName;
|
|
|
obj.shortName = shortName;
|
|
|
obj.dc = "D";
|
|
|
+ } else {
|
|
|
+ obj.dc = "C";
|
|
|
}
|
|
|
|
|
|
obj.feeId = item.feeId;
|
|
|
@@ -2339,6 +2341,7 @@ export default {
|
|
|
obj.rmbAmountNet = item.rmbAmountNet;
|
|
|
obj.usdAmountNet = item.usdAmountNet;
|
|
|
obj.exrate = item.exrate;
|
|
|
+ obj.accStatus = 0;
|
|
|
return obj;
|
|
|
});
|
|
|
if (dc == "D") {
|
|
|
@@ -2518,6 +2521,7 @@ export default {
|
|
|
this.assemblyForm.feeCenterListD.push(obj);
|
|
|
});
|
|
|
}
|
|
|
+ obj.accStatus = 0;
|
|
|
this.$nextTick(() => {
|
|
|
const container = this.$refs.crudD.$el.querySelector(".el-table__body-wrapper");
|
|
|
if (container) {
|
|
|
@@ -2606,6 +2610,7 @@ export default {
|
|
|
// })
|
|
|
this.assemblyForm.feeCenterListC.push(obj);
|
|
|
}
|
|
|
+ obj.accStatus = 0;
|
|
|
this.$nextTick(() => {
|
|
|
const container = this.$refs.crudC.$el.querySelector(".el-table__body-wrapper");
|
|
|
if (container) {
|
|
|
@@ -2864,7 +2869,7 @@ export default {
|
|
|
},
|
|
|
// 客户的回调
|
|
|
async corpChange(value, name, row, dc) {
|
|
|
- console.log("corpChange", "value", value, "name", name, "row", row, "dc", dc);
|
|
|
+ // console.log("corpChange", "value", value, "name", name, "row", row, "dc", dc);
|
|
|
if (name == "shortName") {
|
|
|
console.log(value, name);
|
|
|
if (!value) {
|
|
|
@@ -2875,7 +2880,7 @@ export default {
|
|
|
}
|
|
|
for (let item of this.corpCnNameData) {
|
|
|
if (item.shortName == value) {
|
|
|
- console.log(item);
|
|
|
+ // console.log(item);
|
|
|
this.$set(row, "shortName", item.shortName);
|
|
|
this.$set(row, "corpCnName", item.cnName);
|
|
|
this.$set(row, "corpEnName", item.enName);
|
|
|
@@ -2902,7 +2907,7 @@ export default {
|
|
|
}
|
|
|
for (let item of this.feeCnNameData) {
|
|
|
if (item.cnName == value) {
|
|
|
- if (value == "PS") {
|
|
|
+ if (value == "PS" || value == "P/S") {
|
|
|
// 判断是否是分单
|
|
|
if (this.assemblyForm.billType == "MH") {
|
|
|
this.$confirm("分单不能添加PS", {
|
|
|
@@ -2963,7 +2968,7 @@ export default {
|
|
|
// 拿取费用简称下的计量单位
|
|
|
this.getBunitsPagefun(true, item, row);
|
|
|
// 币别
|
|
|
- if (value == "PS") {
|
|
|
+ if (value == "PS" || value == "P/S") {
|
|
|
this.$set(row, "curCode", "USD");
|
|
|
} else {
|
|
|
this.$set(row, "curCode", item.curNo);
|
|
|
@@ -2996,7 +3001,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
} else if (name == "unitNo") {
|
|
|
- console.log(value, name, row);
|
|
|
+ // console.log(value, name, row);
|
|
|
// 计量单位
|
|
|
this.$set(row, name, value);
|
|
|
for (let item of this.unitNoData) {
|
|
|
@@ -3369,7 +3374,6 @@ export default {
|
|
|
},
|
|
|
// 获取计算属性
|
|
|
async getBunitsPagefun(type, feeRow, row) {
|
|
|
- // console.log('getBunitsPagefun')
|
|
|
let srcBillId = null;
|
|
|
if (this.assemblyForm.billType == "MH") {
|
|
|
srcBillId = this.assemblyForm.masterId;
|
|
|
@@ -3380,7 +3384,6 @@ export default {
|
|
|
this.unitNoData = [];
|
|
|
let units = {};
|
|
|
let teunum = 0;
|
|
|
- // console.log("getBunitsPagefun", res.data.data, "feeRow", feeRow)
|
|
|
for (let item of res.data.data) {
|
|
|
if (feeRow && item.id == feeRow.unitId) {
|
|
|
units = item;
|
|
|
@@ -3429,7 +3432,6 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
this.unitNoData = [...arr, ...this.unitNoData];
|
|
|
- console.log("getBunitsPagefun.unitNoData", this.unitNoData, "units", units, "feeRow", feeRow);
|
|
|
// 选择费用时带出第一条
|
|
|
if (type) {
|
|
|
let feeunitNodata = [];
|
|
|
@@ -3439,7 +3441,19 @@ export default {
|
|
|
// }
|
|
|
// }
|
|
|
feeunitNodata = this.unitNoData.filter(u => u.quantityRule == units.quantityRule);
|
|
|
- this.corpChange(feeunitNodata.length > 0 ? feeunitNodata[0].code : "JOB", "unitNo", row);
|
|
|
+ // OF 改运费 1722822288795000833
|
|
|
+ let unitNo = feeunitNodata.length > 0 ? feeunitNodata[0].code : "JOB";
|
|
|
+ if (feeRow && feeRow.code === "OF") {
|
|
|
+ let accDeptId = this.assemblyForm.accDept + "";
|
|
|
+ // 海运费:市场部 1753232111692791810 默认按箱型箱量计算;海运部 1717838531146289153 默认按票
|
|
|
+ if (accDeptId == "1753232111692791810") {
|
|
|
+ unitNo = "CNTRTYPE";
|
|
|
+ }
|
|
|
+ if (accDeptId == "1717838531146289153") {
|
|
|
+ unitNo = "JOB";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.corpChange(unitNo, "unitNo", row);
|
|
|
}
|
|
|
},
|
|
|
|
|
|
@@ -3767,22 +3781,44 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
upSibmit(dc) {
|
|
|
- const obj = {
|
|
|
- corpId: this.upForm.corpId,
|
|
|
- corpCnName: this.upForm.corpCnName,
|
|
|
- corpEnName: this.upForm.corpEnName,
|
|
|
- shortName: this.upForm.shortName,
|
|
|
- feeCenterListD: dc == "D" ? this.selectionDList : this.selectionCList
|
|
|
- };
|
|
|
- updateCorpBatch(obj).then(res => {
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "操作成功!"
|
|
|
+ let sels = dc === "D" ? this.selectionDList : this.selectionCList;
|
|
|
+ let items = []
|
|
|
+
|
|
|
+ console.log("sels", sels)
|
|
|
+
|
|
|
+ sels.forEach(item => {
|
|
|
+ if(!!item.id){
|
|
|
+ items.push(item);
|
|
|
+ }else{
|
|
|
+ item.corpId=this.upForm.corpId;
|
|
|
+ item.corpCnName=this.upForm.corpCnName;
|
|
|
+ item.corpEnName=this.upForm.corpEnName;
|
|
|
+ item.shortName=this.upForm.shortName;
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ console.log("items", items)
|
|
|
+ if (items.length > 0) {
|
|
|
+ const obj = {
|
|
|
+ corpId: this.upForm.corpId,
|
|
|
+ corpCnName: this.upForm.corpCnName,
|
|
|
+ corpEnName: this.upForm.corpEnName,
|
|
|
+ shortName: this.upForm.shortName,
|
|
|
+ feeCenterListD: items
|
|
|
+ };
|
|
|
+ updateCorpBatch(obj).then(res => {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ this.dialogVisible = false;
|
|
|
+ this.dc = null;
|
|
|
+ this.$emit("billsDetailfun");
|
|
|
});
|
|
|
- this.dialogVisible = false;
|
|
|
+ }else{
|
|
|
this.dc = null;
|
|
|
- this.$emit("billsDetailfun");
|
|
|
- });
|
|
|
+ this.dialogVisible = false;
|
|
|
+ }
|
|
|
},
|
|
|
dicChange(name, row) {
|
|
|
if (name == "shortName") {
|
|
|
@@ -4043,7 +4079,7 @@ export default {
|
|
|
let that = this;
|
|
|
// 关闭按钮的监听点击
|
|
|
closeBtn.action = function() {
|
|
|
- console.log(that.$refs.ReportContainer, "1022");
|
|
|
+ // console.log(that.$refs.ReportContainer, "1022");
|
|
|
if (that.$refs.reportContainer) that.$refs.reportContainer.hideContainer();
|
|
|
};
|
|
|
|
|
|
@@ -4147,7 +4183,7 @@ export default {
|
|
|
"assemblyForm.mblno": {
|
|
|
// 执行方法
|
|
|
handler(oldValue, newValue) {
|
|
|
- console.log(oldValue, newValue);
|
|
|
+ // console.log(oldValue, newValue);
|
|
|
if (oldValue) {
|
|
|
amendsList(1, 10, { status: 3, mblno: this.assemblyForm.mblno, businessType: "SEA" }).then(res => {
|
|
|
if (res.data.data.records.length > 0) {
|