采购订单按供应商创建

prod
anthonywj 2 years ago
parent 7bba144dc2
commit 2b2b45cb78

@ -74,16 +74,44 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="采购说明:" prop="billNo"> <el-form-item
<el-input v-model="formData.remark" auto-complete="off" type="textarea" autosize></el-input> prop="supId"
label="供应商:"
>
<el-select
v-model="formData.supId"
filterable
remote
:disabled="corpOrderIdDisabled"
clearable
reserve-keyword
style="width: 90%"
placeholder="请选择供应商"
:remote-method="findMethod"
>
<el-option
v-for="item in fromOptions"
:key="item.erpId"
:label="item.name"
:value="item.erpId"
>
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
</el-row>
<el-row> <el-row>
<el-col :span="11">
<el-form-item label="采购说明:" prop="remark">
<el-input v-model="formData.remark" auto-complete="off" type="textarea" autosize></el-input>
</el-form-item>
</el-col>
<el-col :span="11" v-show="formData.status==4"> <el-col :span="11" v-show="formData.status==4">
<el-form-item label="拒绝原因:"> <el-form-item label="拒绝原因:">
<el-input v-model="formData.auditRemark" auto-complete="off" :disabled="true"></el-input> <el-input v-model="formData.auditRemark" auto-complete="off" :disabled="true"></el-input>
@ -91,8 +119,10 @@
</el-col> </el-col>
</el-row> </el-row>
</el-card> </el-card>
<el-card> <el-card>
<el-row type="flex" justify="end"> <el-row type="flex" justify="end">
<el-button-group style="display: flex"> <el-button-group style="display: flex">
@ -151,6 +181,7 @@
:closeDialog="closeDialogC2" :closeDialog="closeDialogC2"
:purType="1" :purType="1"
:pId="pId" :pId="pId"
:supId="formData.supId"
:data="thisData" :data="thisData"
></purOrderProducts> ></purOrderProducts>
</el-dialog> </el-dialog>
@ -187,6 +218,7 @@ import {
import {filterSubByInv} from "@/api/system/invSubWarehouse"; import {filterSubByInv} from "@/api/system/invSubWarehouse";
import SelectPlanListDialog from "@/views/purchase/purPlan/selectPlanListDialog"; import SelectPlanListDialog from "@/views/purchase/purPlan/selectPlanListDialog";
import {parseTime} from "@/utils/coTools"; import {parseTime} from "@/utils/coTools";
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
export default { export default {
name: "idQuery", name: "idQuery",
@ -221,9 +253,11 @@ export default {
deptCode: null, deptCode: null,
locStorageCode: null, locStorageCode: null,
invWarehouseCode: null, invWarehouseCode: null,
supId: null,
}, },
pId: null, pId: null,
formRules: {}, formRules: {},
fromOptions: [],
codeArray: [], codeArray: [],
total: 0, total: 0,
loading: false, loading: false,
@ -254,7 +288,9 @@ export default {
storageList: [], storageList: [],
invCodeList: [], invCodeList: [],
invQueryData: {}, invQueryData: {},
selectApplyVisible: false selectApplyVisible: false,
corpOrderIdDisabled: false,
}; };
}, },
watch: { watch: {
@ -341,6 +377,10 @@ export default {
}) })
}, },
selectProductFunction() { selectProductFunction() {
if (this.$isBlank(this.formData.supId)) {
this.$message.warning("请先选择供应商!");
return;
}
this.selectProductVisible = true; this.selectProductVisible = true;
//idid //idid
if (this.pId == null) { if (this.pId == null) {
@ -365,9 +405,11 @@ export default {
} }
selectOrderDetail(this.query) // selectOrderDetail(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;
if (this.total > 0) {
this.corpOrderIdDisabled = true;
}
this.loading = false; this.loading = false;
}) })
.catch(() => { .catch(() => {
@ -482,6 +524,28 @@ export default {
}) })
} }
}, },
//
findMethod(query) {
this.fromOptions = [];
let cQuery = {
key: query,
corpType: 2,
outType: null,
page: 1,
limit: 20,
};
getBasicUnitMaintains(cQuery)
.then((response) => {
this.loading = false;
this.fromOptions = response.data.list || [];
})
.catch(() => {
this.loading = false;
});
},
}, },
filters: {}, filters: {},
mounted() { mounted() {
@ -499,7 +563,9 @@ export default {
this.formData = this.idQuery.formData; this.formData = this.idQuery.formData;
this.orderEditor = true; this.orderEditor = true;
this.sValue = this.formData.corpName; this.sValue = this.formData.corpName;
this.findMethod(this.formData.supId);
this.getStockOrderDetailList(); this.getStockOrderDetailList();
this.corpOrderIdDisabled = true;
} else { } else {
var date = new Date(); var date = new Date();
this.formData = { this.formData = {

@ -5,12 +5,14 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="UDI码:" class="query-form-item"> <el-form-item label="UDI码:" class="query-form-item">
<el-input v-model="listQuery.udiCode" style="width: 96%" placeholder="请扫描或输入UDI码" clearable="true" @keyup.enter.native="keyup_submit($event)"></el-input> <el-input v-model="listQuery.udiCode" style="width: 96%" placeholder="请扫描或输入UDI码" clearable="true"
@keyup.enter.native="keyup_submit($event)"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="第三方物资编码:" class="query-form-item"> <el-form-item label="第三方物资编码:" class="query-form-item">
<el-input v-model="listQuery.thrPiId" style="width: 90%" placeholder="请输入第三方物资编码" clearable="true"></el-input> <el-input v-model="listQuery.thrPiId" style="width: 90%" placeholder="请输入第三方物资编码"
clearable="true"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -18,12 +20,14 @@
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="物品编码:" class="query-form-item"> <el-form-item label="物品编码:" class="query-form-item">
<el-input v-model="listQuery.unionCode" style="width: 90%" placeholder="请输入DI/医保编码/商品条码" clearable="true"></el-input> <el-input v-model="listQuery.unionCode" style="width: 90%" placeholder="请输入DI/医保编码/商品条码"
clearable="true"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="产品通用名:" class="query-form-item"> <el-form-item label="产品通用名:" class="query-form-item">
<el-input v-model="listQuery.cpmctymc" style="width: 90%" placeholder="请输入产品通用名" clearable="true"></el-input> <el-input v-model="listQuery.cpmctymc" style="width: 90%" placeholder="请输入产品通用名"
clearable="true"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -50,7 +54,8 @@
</div> </div>
<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 :row-class-name="tableRowClassName" @current-change="handleChange" ref="multipleTable"> <el-table :data="dataList" style="width: 100%" v-loading="loading" border highlight-current-row
:row-class-name="tableRowClassName" @current-change="handleChange" 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>
@ -137,6 +142,10 @@ export default {
type: Object, type: Object,
required: true, required: true,
}, },
supId: {
type: Object,
required: true,
},
}, },
data() { data() {
@ -271,6 +280,7 @@ export default {
getList() { getList() {
this.loading = true; this.loading = true;
this.listQuery.customerId = store.getters.customerId; this.listQuery.customerId = store.getters.customerId;
this.listQuery.unitFk = this.supId;
filterCompanyProductRelevance(this.listQuery) filterCompanyProductRelevance(this.listQuery)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;

Loading…
Cancel
Save