申购单据产品查询修改,提交采购订单修改

pro
anthonywj 2 years ago
parent b7e1e1bcab
commit c3dc2e4b5f

@ -8,9 +8,9 @@ ENV = 'production'
#林纪裕cd #林纪裕cd
VUE_APP_BASE_API = 'http://r.jiyuudims.cloud:5003/UDI_WMS_MC/' # VUE_APP_BASE_API = 'http://r.jiyuudims.cloud:5003/UDI_WMS_MC/'
# VUE_APP_BASE_API = 'http://127.0.0.1:9150/UDI_WMS_MC/' VUE_APP_BASE_API = 'http://127.0.0.1:9150/UDI_WMS_MC/'
# 测试服务器 # 测试服务器
# VUE_APP_BASE_API = 'http://192.168.0.66:9150/UDI_WMS_MC/' # VUE_APP_BASE_API = 'http://192.168.0.66:9150/UDI_WMS_MC/'

@ -6,7 +6,7 @@
</div> </div>
<el-form <el-form
class="card-box login-form" class="card-box login-form"
autocomplete="on+ autocomplete="on"
:model="ruleForm" :model="ruleForm"
:rules="rules" :rules="rules"
ref="ruleForm" ref="ruleForm"

@ -75,13 +75,14 @@
<el-divider style="margin: 15px"></el-divider> <el-divider style="margin: 15px"></el-divider>
<el-table :data="dataList" style="width: 100%" v-loading="loading" border highlight-current-row <el-table :data="dataList" style="width: 100%" v-loading="loading" border highlight-current-row
:row-class-name="tableRowClassName" @current-change="handleChange" @selection-change="handleSelectionChange" ref="multipleTable"> :row-class-name="tableRowClassName" @current-change="handleChange"
@selection-change="handleSelectionChange" ref="multipleTable">
<!--<el-table-column label width="45">--> <!--<el-table-column label width="45">-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
<!-- <el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>--> <!-- <el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>-->
<!-- </template>--> <!-- </template>-->
<!--</el-table-column>--> <!--</el-table-column>-->
<el-table-column type="selection"></el-table-column> <el-table-column type="selection"></el-table-column>
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="最小销售产品标识" prop="nameCode" width="140" show-overflow-tooltip></el-table-column> <el-table-column label="最小销售产品标识" prop="nameCode" width="140" show-overflow-tooltip></el-table-column>
<el-table-column label="第三方物资编码" prop="thirdId" show-overflow-tooltip></el-table-column> <el-table-column label="第三方物资编码" prop="thirdId" show-overflow-tooltip></el-table-column>
@ -187,7 +188,7 @@ export default {
keys: [], keys: [],
}, },
ids: [], ids: [],
lists:[], lists: [],
radioCheck: null, radioCheck: null,
dataList: [], dataList: [],
pageTotal: 1, pageTotal: 1,
@ -199,12 +200,12 @@ export default {
thirdSysFk: null, thirdSysFk: null,
busTypes: [], busTypes: [],
actDateRange: [], actDateRange: [],
tQuery : { tQuery: {
productId:"", productId: "",
productName: "", productName: "",
count: "", count: "",
orderIdFk: "", orderIdFk: "",
supId:"", supId: "",
}, },
pickerOptions: { pickerOptions: {
shortcuts: [ shortcuts: [
@ -328,16 +329,16 @@ export default {
intentBack() { intentBack() {
this.closeDialog(); this.closeDialog();
}, },
handleSelectionChange(val){ handleSelectionChange(val) {
this.lists=[]; this.lists = [];
for (var i=0;i<val.length;i++){ for (var i = 0; i < val.length; i++) {
this.tQuery={} this.tQuery = {}
this.tQuery.productId= val[i].id; this.tQuery.productId = val[i].id;
this.tQuery.supId=val[i].customerId; this.tQuery.supId = val[i].customerId;
this.tQuery.productName=val[i].cpmctymc; this.tQuery.productName = val[i].cpmctymc;
this.tQuery.count=1; this.tQuery.count = 1;
this.tQuery.orderIdFk=this.pId; this.tQuery.orderIdFk = this.pId;
this.tQuery.zczbhhzbapzbh=val[i].zczbhhzbapzbh; this.tQuery.zczbhhzbapzbh = val[i].zczbhhzbapzbh;
this.lists.push(this.tQuery) this.lists.push(this.tQuery)
} }
console.log(this.lists) console.log(this.lists)
@ -348,15 +349,15 @@ export default {
this.$message.error('未选择产品'); this.$message.error('未选择产品');
return; return;
} }
debugger
if (this.ids.length > 0) { // if (this.ids.length > 0) {
for (var i = 0; i < this.ids.length; i++) { // for (var i = 0; i < this.ids.length; i++) {
if (this.ids[i] == this.multipleSelection.id) { // if (this.ids[i] == this.multipleSelection.id) {
this.$message.error("该产品已录入!"); // this.$message.error("");
return // return
} // }
} // }
} // }
// let str = this.multipleSelection.zczbhhzbapzbh; // let str = this.multipleSelection.zczbhhzbapzbh;
@ -365,7 +366,7 @@ export default {
// this.certList = str.split(','); // this.certList = str.split(',');
// this.dialogFormVisible = true; // this.dialogFormVisible = true;
// } else { // } else {
this.combine(); this.combine();
// } // }
}, },

@ -18,13 +18,13 @@
<el-col :span="11"> <el-col :span="11">
<el-form-item label="创建时间:" prop="createTime"> <el-form-item label="创建时间:" prop="createTime">
<el-date-picker <el-date-picker
:disabled="true" :disabled="true"
v-model="formData.createTime" v-model="formData.createTime"
type="datetime" type="datetime"
placeholder="选择日期" placeholder="选择日期"
style="width: 100%" style="width: 100%"
:clearable="false" :clearable="false"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@ -45,12 +45,12 @@
<el-col :span="11"> <el-col :span="11">
<el-form-item label="到货截止:" prop="arrivalTime"> <el-form-item label="到货截止:" prop="arrivalTime">
<el-date-picker <el-date-picker
v-model="formData.arrivalTime" v-model="formData.arrivalTime"
type="datetime" type="datetime"
placeholder="选择日期" placeholder="选择日期"
style="width: 100%" style="width: 100%"
:clearable="false" :clearable="false"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@ -64,10 +64,10 @@
<el-select v-model="formData.invCode" @change="setDeptCode" placeholder="采购仓库信息" style="width: 100%" <el-select v-model="formData.invCode" @change="setDeptCode" placeholder="采购仓库信息" style="width: 100%"
clearable> clearable>
<el-option <el-option
v-for="item in invCodeList" v-for="item in invCodeList"
:key="item.name" :key="item.name"
:label="item.name" :label="item.name"
:value="item.code"> :value="item.code">
<span style="float: left">{{ item.name }}</span> <span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span> <span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span>
</el-option> </el-option>
@ -77,25 +77,25 @@
<el-col :span="11"> <el-col :span="11">
<el-form-item <el-form-item
prop="supId" prop="supId"
label="供应商:" label="供应商:"
> >
<el-select <el-select
v-model="formData.supId" v-model="formData.supId"
filterable filterable
remote remote
:disabled="corpOrderIdDisabled" :disabled="corpOrderIdDisabled"
clearable clearable
reserve-keyword reserve-keyword
style="width: 90%" style="width: 90%"
placeholder="请选择供应商" placeholder="请选择供应商"
:remote-method="findMethod" :remote-method="findMethod"
> >
<el-option <el-option
v-for="item in fromOptions" v-for="item in fromOptions"
:key="item.erpId" :key="item.erpId"
:label="item.name" :label="item.name"
:value="item.erpId" :value="item.erpId"
> >
<span style="float: left">{{ item.name }}</span> <span style="float: left">{{ item.name }}</span>
</el-option> </el-option>
@ -185,36 +185,36 @@
</el-form> </el-form>
<el-dialog <el-dialog
title="物资录入" title="物资录入"
:visible.sync="selectProductVisible" :visible.sync="selectProductVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
width="80%" width="80%"
v-if="selectProductVisible" v-if="selectProductVisible"
:append-to-body='true' :append-to-body='true'
> >
<purOrderProducts <purOrderProducts
:closeDialog="closeDialogC2" :closeDialog="closeDialogC2"
:purType="1" :purType="1"
:pId="pId" :pId="pId"
:supId="formData.supId" :supId="formData.supId"
:data="thisData" :data="thisData"
></purOrderProducts> ></purOrderProducts>
</el-dialog> </el-dialog>
<el-dialog <el-dialog
title="采购计划单据选入" title="采购计划单据选入"
:visible.sync="selectApplyVisible" :visible.sync="selectApplyVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
width="80%" width="80%"
append-to-body append-to-body
v-if="selectApplyVisible" v-if="selectApplyVisible"
> >
<select-plan-list-dialog <select-plan-list-dialog
:data="thisData" :data="thisData"
:pId="pId" :pId="pId"
:closeDialog="closeDialogC2" :closeDialog="closeDialogC2"
></select-plan-list-dialog> ></select-plan-list-dialog>
</el-dialog> </el-dialog>
</div> </div>
@ -351,6 +351,9 @@ export default {
if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") { if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") {
return this.$message.error('单据数量不能为0'); return this.$message.error('单据数量不能为0');
} }
if (this.$isBlank(this.codeArray[i].supName)) {
return this.$message.error('请选择产品对应供应商');
}
} }
} }
if (status == "1") { if (status == "1") {
@ -381,18 +384,18 @@ export default {
type: 1, type: 1,
} }
inserThrOrderWeb(tQuery) inserThrOrderWeb(tQuery)
.then(response => { .then(response => {
this.loading = false; this.loading = false;
if (response.code === 20000) { if (response.code === 20000) {
this.$message.success(tMessage + "成功"); this.$message.success(tMessage + "成功");
this.closeDialog(true); this.closeDialog(true);
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
}) })
}, },
selectProductFunction() { selectProductFunction() {
if (this.$isBlank(this.formData.supId)) { if (this.$isBlank(this.formData.supId)) {
@ -422,30 +425,30 @@ export default {
orderIdFk: this.pId orderIdFk: this.pId
} }
selectOrderDetail(this.query) // selectOrderDetail(this.query) //
.then((response) => { .then((response) => {
this.codeArray = response.data.list || []; this.codeArray = response.data.list || [];
this.total = response.data.total || 0; this.total = response.data.total || 0;
if (this.total > 0) { if (this.total > 0) {
this.corpOrderIdDisabled = true; this.corpOrderIdDisabled = true;
} }
this.loading = false; this.loading = false;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
this.list = []; this.list = [];
this.total = 0; this.total = 0;
}); });
}, },
rowChange(val) { rowChange(val) {
this.currentRow = val; this.currentRow = val;
this.selectedIndex = val.index; this.selectedIndex = val.index;
filterSupList({productId:val.productId}) // filterSupList({productId: val.productId}) //
.then((response) => { .then((response) => {
this.suppliers = response.data || []; this.suppliers = response.data || [];
}) })
.catch(() => { .catch(() => {
}); });
}, },
tableCountChange(row) { tableCountChange(row) {
if (this.$isNotBlank(row)) { if (this.$isNotBlank(row)) {
@ -481,19 +484,19 @@ export default {
let delIds = []; let delIds = [];
delIds.push(row.id) delIds.push(row.id)
delOrderDetail(delIds) delOrderDetail(delIds)
.then(response => { .then(response => {
this.detailLoading = false; this.detailLoading = false;
if (response.code === 20000) { if (response.code === 20000) {
this.$message.success(response.data); this.$message.success(response.data);
// this.getStockOrderDetailList(); // this.getStockOrderDetailList();
this.codeArray.splice(index, 1); this.codeArray.splice(index, 1);
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
}) })
.catch(() => { .catch(() => {
this.detailLoading = false; this.detailLoading = false;
}) })
} else { } else {
this.$message.success('删除成功'); this.$message.success('删除成功');
this.codeArray.splice(index, 1); this.codeArray.splice(index, 1);
@ -509,17 +512,17 @@ export default {
getStockOrderDetailList() { getStockOrderDetailList() {
this.loading = true; this.loading = true;
listOrderDetail(this.query) // listOrderDetail(this.query) //
.then((response) => { .then((response) => {
console.log(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;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
this.list = []; this.list = [];
this.total = 0; this.total = 0;
}); });
}, },
findSubInvs() { findSubInvs() {
this.invCodeList = []; this.invCodeList = [];
@ -527,14 +530,14 @@ export default {
filter: 3 filter: 3
}; };
filterSubByInv(query) filterSubByInv(query)
.then((response) => { .then((response) => {
this.invCodeList = response.data || []; this.invCodeList = response.data || [];
if (this.invCodeList != null && this.invCodeList.length == 1) { if (this.invCodeList != null && this.invCodeList.length == 1) {
this.formData.invCode = this.invCodeList[0].code; this.formData.invCode = this.invCodeList[0].code;
} }
}) })
.catch(() => { .catch(() => {
}); });
}, },
selectApply() { selectApply() {
this.selectApplyVisible = true; this.selectApplyVisible = true;
@ -562,13 +565,13 @@ export default {
limit: 20, limit: 20,
}; };
getBasicUnitMaintains(cQuery) getBasicUnitMaintains(cQuery)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
this.fromOptions = response.data.list || []; this.fromOptions = response.data.list || [];
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
}); });
}, },
}, },
@ -601,8 +604,8 @@ export default {
deptCode: null, deptCode: null,
incCode: null, incCode: null,
createTime: parseTime( createTime: parseTime(
date, date,
"{y}-{m}-{d} {h}:{i}:{s}" "{y}-{m}-{d} {h}:{i}:{s}"
), ),
}; };
this.orderEditor = false; this.orderEditor = false;

Loading…
Cancel
Save