|
|
|
@ -73,7 +73,7 @@
|
|
|
|
|
<el-form-item style="margin-right: 50px; margin-left: auto">
|
|
|
|
|
<el-button-group>
|
|
|
|
|
<el-button type="primary" icon="search" @click="mergesOrders">合并单据</el-button>
|
|
|
|
|
<el-button type="primary" icon="search" @click="addOrders">新增订单</el-button>
|
|
|
|
|
<el-button type="primary" icon="search" @click="addOrders">新增单据</el-button>
|
|
|
|
|
<el-button type="primary" icon="search" @click="errOrders">异常单据</el-button>
|
|
|
|
|
|
|
|
|
|
</el-button-group>
|
|
|
|
@ -83,6 +83,7 @@
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="list" style="width: 100%"
|
|
|
|
|
highlight-current-row
|
|
|
|
|
@selection-change="handleSelectionChange">
|
|
|
|
|
<el-table-column type="selection" width="55"></el-table-column>
|
|
|
|
|
<el-table-column label="序号" type="index"></el-table-column>
|
|
|
|
@ -221,7 +222,7 @@
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="新增订单"
|
|
|
|
|
:title="formMap[formName]"
|
|
|
|
|
:visible.sync="addOrderVisible"
|
|
|
|
|
width="85%" append-to-body
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
@ -236,7 +237,7 @@
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="新增订单"
|
|
|
|
|
:title="formMap[formName]"
|
|
|
|
|
:visible.sync="addHosOrderVisible"
|
|
|
|
|
width="75%"
|
|
|
|
|
append-to-body
|
|
|
|
@ -269,6 +270,7 @@
|
|
|
|
|
@current-change="handleCurrentChange"
|
|
|
|
|
layout="prev, pager, next"
|
|
|
|
|
:total="total"
|
|
|
|
|
:current-page="filterQuery.page"
|
|
|
|
|
></el-pagination>
|
|
|
|
|
</el-card>
|
|
|
|
|
</div>
|
|
|
|
@ -291,6 +293,7 @@ import store from "../../store";
|
|
|
|
|
import {filterAllByUser} from "@/api/basic/invWarehouse";
|
|
|
|
|
import {getLocalJoinByUser} from "@/api/basic/busLocalType";
|
|
|
|
|
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
|
|
|
|
|
import {isBlank} from "@/utils/strUtil";
|
|
|
|
|
|
|
|
|
|
const formJson = {
|
|
|
|
|
site_id: "",
|
|
|
|
@ -314,7 +317,6 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
checkStatus: {
|
|
|
|
|
'-1': "草稿",
|
|
|
|
|
// 1: "等待处理",
|
|
|
|
|
1: "等待处理",
|
|
|
|
|
2: "等待校验",
|
|
|
|
|
3: "校验异常",
|
|
|
|
@ -350,8 +352,8 @@ export default {
|
|
|
|
|
formName: null,
|
|
|
|
|
errorDetail: "1111111111111",
|
|
|
|
|
formMap: {
|
|
|
|
|
add: "新增",
|
|
|
|
|
edit: "编辑",
|
|
|
|
|
add: "新增单据",
|
|
|
|
|
update: "编辑单据",
|
|
|
|
|
},
|
|
|
|
|
fromTypeMap: {
|
|
|
|
|
"1": "UDIMS平台",
|
|
|
|
@ -373,6 +375,7 @@ export default {
|
|
|
|
|
formData: formJson,
|
|
|
|
|
deleteLoading: false,
|
|
|
|
|
busTypes: [],
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
@ -396,6 +399,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
onSubmit() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
this.filterQuery.page = 1;
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
handleSizeChange(val) {
|
|
|
|
@ -440,7 +444,7 @@ export default {
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.storageList = response.data || [];
|
|
|
|
|
if (this.storageList.length > 0) {
|
|
|
|
|
this.invChange();
|
|
|
|
|
this.getSubInvList();
|
|
|
|
|
this.getList();
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
@ -466,6 +470,7 @@ export default {
|
|
|
|
|
this.idQuery.actDate = '';
|
|
|
|
|
this.idQuery.corpOrderId = '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.idQuery.outChangeEnable = row.outChangeEnable;
|
|
|
|
|
if (row.id !== null && row.id !== undefined && row.id !== '') {
|
|
|
|
|
this.idQuery.id = row.id;
|
|
|
|
@ -475,9 +480,10 @@ export default {
|
|
|
|
|
this.idQuery.locStorageCode = row.locStorageCode;
|
|
|
|
|
this.idQuery.invWarehouseCode = row.invWarehouseCode;
|
|
|
|
|
this.idQuery.fromSubInvCode = row.fromSubInvCode;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.idQuery.preCheck = row.preCheck;
|
|
|
|
|
this.formName = "update";
|
|
|
|
|
} else {
|
|
|
|
|
this.formName = "add";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (store.getters.customerId == 110) {
|
|
|
|
@ -486,13 +492,10 @@ export default {
|
|
|
|
|
this.idQuery.fromCorp = row.fromCorp;
|
|
|
|
|
this.idQuery.fromCorpId = row.fromCorpId;
|
|
|
|
|
this.idQuery.preCheck = row.preCheck;
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
this.idQuery.preCheck = row.preCheck;
|
|
|
|
|
this.addOrderVisible = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
errOrders() {
|
|
|
|
|
this.errOrderVisible = true;
|
|
|
|
@ -514,11 +517,9 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
handleSelectionChange(val) {
|
|
|
|
|
console.log(val);
|
|
|
|
|
this.multipleSelection = val;
|
|
|
|
|
},
|
|
|
|
|
selectUnit(row) {
|
|
|
|
|
console.log(row.id);
|
|
|
|
|
this.unitUpdateQuery.id = this.curIndex;
|
|
|
|
|
this.unitUpdateQuery.fromCorp = row.name;
|
|
|
|
|
this.unitUpdateQuery.fromCorpId = row.unitid;
|
|
|
|
@ -540,7 +541,6 @@ export default {
|
|
|
|
|
// this.filterQuery.statusOrOne = -1;
|
|
|
|
|
filterOrder(this.filterQuery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
console.log(response)
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.list = response.data.list || [];
|
|
|
|
|
this.total = response.data.total || 0;
|
|
|
|
@ -561,19 +561,24 @@ export default {
|
|
|
|
|
let unit = repeatData[0].fromCorp;
|
|
|
|
|
let action = repeatData[0].action;
|
|
|
|
|
let orderList = [];
|
|
|
|
|
repeatData.forEach((obj, index) => {
|
|
|
|
|
if (unit !== obj.fromCorp) {
|
|
|
|
|
this.$message.warning("往来单位不一致!");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(let index in repeatData){
|
|
|
|
|
if (action !== repeatData[index].action) {
|
|
|
|
|
this.$message.warning("业务类型不一致!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (action !== obj.action) {
|
|
|
|
|
this.$message.warning("业务类型不一致!");
|
|
|
|
|
if (unit !== repeatData[index].fromCorp) {
|
|
|
|
|
this.$message.warning("往来单位不一致!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
orderList.push(obj.id);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
orderList.push(repeatData[index].id);
|
|
|
|
|
}
|
|
|
|
|
let tquery = {
|
|
|
|
|
orderList: orderList,
|
|
|
|
|
type: 2,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.$confirm(
|
|
|
|
@ -653,8 +658,7 @@ export default {
|
|
|
|
|
this.list.splice(i, 1);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
;
|
|
|
|
|
};
|
|
|
|
|
this.$message.success("提交成功");
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(response.message);
|
|
|
|
@ -666,10 +670,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
handleErrorDetail(poistion) {
|
|
|
|
|
var mOrder = this.list[poistion];
|
|
|
|
|
var corpOrderId = mOrder.remark;
|
|
|
|
|
|
|
|
|
|
this.errorDetail = mOrder.remark;
|
|
|
|
|
console.log(corpOrderId + " " + mOrder + " " + mOrder.remark);
|
|
|
|
|
this.dialogVisible = true;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
@ -685,6 +686,25 @@ export default {
|
|
|
|
|
this.filterQuery.invWarehouseCode = "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (isBlank(this.filterQuery.locStorageCode)) {
|
|
|
|
|
this.filterQuery.invWarehouseCode = null;
|
|
|
|
|
this.subInvList = [];
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let query = {
|
|
|
|
|
pcode: this.filterQuery.locStorageCode
|
|
|
|
|
};
|
|
|
|
|
filterSubByInv(query)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.subInvList = response.data || [];
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getSubInvList() {
|
|
|
|
|
let query = {
|
|
|
|
|
pcode: this.filterQuery.locStorageCode
|
|
|
|
|
};
|
|
|
|
|