1.修复部分查询问题,单据编辑保存数量校验放在后端实时校验

fencang
x_z 3 years ago
parent 3811e418ce
commit a4c9a80ed5

@ -683,10 +683,10 @@ export default {
formData: formJson, formData: formJson,
formRules: { formRules: {
name: [ name: [
{required: true, message: "请输入仓库货位名", trigger: "blur"} {required: true, message: "请输入仓库", trigger: "blur"}
], ],
code: [ code: [
{required: true, message: "请输入仓库货位代码", trigger: "blur"} {required: true, message: "请输入仓库码", trigger: "blur"}
] ]
}, },
pidData: {}, pidData: {},

@ -31,7 +31,7 @@
<el-form-item> <el-form-item>
<el-button-group style="display:flex;"> <el-button-group style="display:flex;">
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="getList"></el-button> <el-button type="primary" icon="search" @click="search"></el-button>
<el-button type="primary" icon="search" @click="clearAll" <el-button type="primary" icon="search" @click="clearAll"
v-if="!this.thirdSysDetail.enabled">清空全部 v-if="!this.thirdSysDetail.enabled">清空全部
</el-button> </el-button>
@ -67,7 +67,7 @@
<script> <script>
import { import {
getCorps, delCorps, delAll, downloadAll delCorps, delAll, downloadAll
} from "../../api/thrsys/thrCorps"; } from "../../api/thrsys/thrCorps";
import {getBasicThirdSys, filterDetailByKey} from "../../api/basic/basicThirdSys"; import {getBasicThirdSys, filterDetailByKey} from "../../api/basic/basicThirdSys";
import {ucloudUnit} from "../../api/basic/basicUnitMaintain"; import {ucloudUnit} from "../../api/basic/basicUnitMaintain";
@ -97,9 +97,6 @@
methods: { methods: {
onReset() { onReset() {
// this.$router.push({
// path: "",
// });
this.filterQuery = { this.filterQuery = {
unitId: null, unitId: null,
name: null, name: null,
@ -109,10 +106,11 @@
}; };
this.getList(); this.getList();
}, },
search() {
this.filterQuery.page =1;
this.getList();
},
getList() { getList() {
if (this.filterQuery.thirdSys == null) { if (this.filterQuery.thirdSys == null) {
this.$message.warning("请先选择第三方系统!") this.$message.warning("请先选择第三方系统!")
return; return;
@ -213,11 +211,9 @@
}); });
}, },
handleChange(response, files, fileList) { handleChange(response, files, fileList) {
console.log(response);
if (response.code != 20000) { if (response.code != 20000) {
this.$message.error(response.message); this.$message.error(response.message);
} else { } else {
console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
this.$message.success("文件上传成功,请稍后刷新查看!"); this.$message.success("文件上传成功,请稍后刷新查看!");
} }
}, },

@ -124,7 +124,7 @@
v-model="rowData.companyName" v-model="rowData.companyName"
filterable filterable
remote remote
:disabled="rowData.companyName!=null" :disabled="rowData.companyName != null && rowData.companyName != ''"
clearable="true" clearable="true"
reserve-keyword reserve-keyword
placeholder="请输入企业名称" placeholder="请输入企业名称"
@ -354,6 +354,7 @@
id: "", id: "",
checkType: "", checkType: "",
roles: "", roles: "",
companyName: ""
}, },
rowDataRules: { rowDataRules: {
nickName: [ nickName: [
@ -509,6 +510,7 @@
if (this.$isBlank(this.rowData.companyName)) { if (this.$isBlank(this.rowData.companyName)) {
return this.$message.warning("请输入企业名称"); return this.$message.warning("请输入企业名称");
} }
this.checkQuery.companyName = this.rowData.companyName;
this.checkRegister(); this.checkRegister();
this.centerDialogVisible = false; this.centerDialogVisible = false;
}, },

@ -118,6 +118,7 @@
:loading="loading" :loading="loading"
:disabled="corpOrderIdDisabled" :disabled="corpOrderIdDisabled"
@change="unitChange" @change="unitChange"
@focus="findMethod('')"
> >
<el-option <el-option
v-for="item in fromOptions" v-for="item in fromOptions"

@ -101,6 +101,7 @@
placeholder="请输入往来单位" placeholder="请输入往来单位"
:remote-method="findMethod" :remote-method="findMethod"
:loading="loading" :loading="loading"
@focus="findMethod('')"
@change="selectOne" @change="selectOne"
> >
<el-option <el-option
@ -645,7 +646,6 @@ export default {
} }
}, },
findStorageMethod(query) { findStorageMethod(query) {
console.log(query);
if (this.formData.locStorageCode == null) if (this.formData.locStorageCode == null)
return; return;
this.fromStorageOptions = []; this.fromStorageOptions = [];
@ -706,12 +706,10 @@ export default {
if (status == '3') { if (status == '3') {
tQuery.subErpOrders.forEach((obj) => { tQuery.subErpOrders.forEach((obj) => {
obj.reCount = obj.count; obj.reCount = obj.count;
console.log(obj.reCount);
}); });
} }
console.log(tQuery);
insertStockOrderWeb(tQuery) insertStockOrderWeb(tQuery)
.then(response => { .then(response => {
this.loading = false; this.loading = false;
@ -792,7 +790,6 @@ export default {
this.invQueryData = { this.invQueryData = {
locStorageCode: this.formData.corpId, locStorageCode: this.formData.corpId,
}; };
console.log("his.invQueryData " + this.invQueryData.locStorageCode);
this.selectInvProductVisible = true; this.selectInvProductVisible = true;
} else { } else {
this.selectProductVisible = true; this.selectProductVisible = true;
@ -820,7 +817,6 @@ export default {
stockOrderDetailQueryProduct(tQuery).then((response) => { stockOrderDetailQueryProduct(tQuery).then((response) => {
this.loading = false; this.loading = false;
console.log(response)
if (response.code === 20000) { if (response.code === 20000) {
if (response.data.getType === "1") { if (response.data.getType === "1") {
this.loading = true; this.loading = true;
@ -874,7 +870,6 @@ export default {
rData.forEach((obj, index) => { rData.forEach((obj, index) => {
this.codeArray.unshift(obj); this.codeArray.unshift(obj);
}); });
console.log(this.codeArray);
this.$refs.multipleTable.setCurrentRow(this.codeArray[0]); this.$refs.multipleTable.setCurrentRow(this.codeArray[0]);
this.currentRow = this.codeArray[0]; this.currentRow = this.codeArray[0];
this.selectedIndex = 0; this.selectedIndex = 0;
@ -1134,7 +1129,6 @@ export default {
this.loading = true; this.loading = true;
stockOrderDetail(this.query) // stockOrderDetail(this.query) //
.then((response) => { .then((response) => {
console.log(response)
this.codeArray = response.data.list || []; this.codeArray = response.data.list || [];
this.total = response.data.total || 0; this.total = response.data.total || 0;
this.loading = false; this.loading = false;
@ -1180,15 +1174,11 @@ export default {
}); });
}, },
selectOne(event) { selectOne(event) {
this.formData.corpName = event.name; this.formData.corpName = event.name;
this.formData.corpId = event.erpId; this.formData.corpId = event.erpId;
this.formData.unitIdFk = event.erpId; this.formData.unitIdFk = event.erpId;
// console.log("this.inputQuery.companyId" + item);
console.log("this.inputQuery.companyId" + event.erpId);
}, },
findMethod(query) { findMethod(query) {
console.log(query);
this.fromOptions = []; this.fromOptions = [];
let cQuery = { let cQuery = {
key: query, key: query,
@ -1301,7 +1291,7 @@ export default {
this.formData.billdate = new Date(); this.formData.billdate = new Date();
// this.generateBillNo(); // this.generateBillNo();
} }
this.findMethod();
this.getBusType(); this.getBusType();
this.getStorage(); this.getStorage();
this.findSubInvByInv(); this.findSubInvByInv();

@ -769,7 +769,6 @@ export default {
this.detailLoading = true; this.detailLoading = true;
stockOrderDetail(this.detailQuery) stockOrderDetail(this.detailQuery)
.then((response) => { .then((response) => {
console.log(response)
this.detailLoading = false; this.detailLoading = false;
this.detailList = response.data.list || []; this.detailList = response.data.list || [];
}) })
@ -889,12 +888,6 @@ export default {
if (valid) { if (valid) {
this.detailLoading = true; this.detailLoading = true;
let tQuery = this.detailFormData; let tQuery = this.detailFormData;
if (this.detailCountMax) {
if (this.detailFormData.count < this.detailFormData.reCount) {
this.$message.error("实际数量不能高于订单数量");
return;
}
}
// if (this.$isBlank(tQuery.batchNo)) { // if (this.$isBlank(tQuery.batchNo)) {
// if (!tQuery.allowNoBatch) { // if (!tQuery.allowNoBatch) {
// return this.$message.error(''); // return this.$message.error('');

Loading…
Cancel
Save