业务单据功能提交

pro
郑明梁 2 years ago
parent adc4ec982d
commit 0960540330

@ -146,4 +146,12 @@ export function getDetailList(params) {
}); });
} }
export function filterSupList(data) {
return request({
url: "/purchase/order/filterSupList",
method: 'post',
data: data
})
}

@ -98,6 +98,7 @@
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" prop="remark"></el-table-column>
<el-table-column label="创建时间" prop="createTime"></el-table-column> <el-table-column label="创建时间" prop="createTime"></el-table-column>
<el-table-column label="操作" width="120px"> <el-table-column label="操作" width="120px">
<template slot-scope="scope"> <template slot-scope="scope">

@ -25,7 +25,7 @@
</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.flbm" style="width: 90%" placeholder="请输入分类编码" <el-input v-model="listQuery.mainId" style="width: 90%" placeholder="请输入三方物资分类"
clearable="true"></el-input> clearable="true"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>

@ -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>
@ -127,7 +127,8 @@
<el-row type="flex" justify="end"> <el-row type="flex" justify="end">
<el-button-group style="display: flex"> <el-button-group style="display: flex">
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px"> <el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px">
<el-button type="primary" @click.native.stop="selectProductFunction()" :loading="loading">产品录入</el-button> <el-button type="primary" @click.native.stop="selectProductFunction()" :loading="loading">产品录入
</el-button>
<!-- <el-button type="primary" :loading="loading" @click.native.stop="selectApply()">选入采购单</el-button>--> <!-- <el-button type="primary" :loading="loading" @click.native.stop="selectApply()">选入采购单</el-button>-->
</el-button-group> </el-button-group>
@ -154,7 +155,21 @@
</el-table-column> </el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column> <el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column>
<el-table-column label="生产厂家" prop="manufactory"></el-table-column> <el-table-column label="生产厂家" prop="manufactory"></el-table-column>
<el-table-column label="供应商" prop="supName"></el-table-column> <el-table-column label="供应商" prop="supName">
<template slot-scope="scope">
<el-select size="mini"
@change='tableCountChange(scope.row)'
v-model="scope.row.supName" clearable
:disabled="scope.row.index !== selectedIndex"
placeholder="请选择">
<el-option v-for="item in suppliers"
:key="item.erpId"
:label="item.name"
:value="item.name">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="操作" width="120"> <el-table-column label="操作" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" :disabled="scope.row.index === selectedIndex" @click.stop="true" <el-button type="text" size="small" :disabled="scope.row.index === selectedIndex" @click.stop="true"
@ -170,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>
@ -214,7 +229,8 @@ import {
listOrderDetail, listOrderDetail,
addOrderId, addOrderId,
selectOrderDetail, selectOrderDetail,
updateDetail updateDetail,
filterSupList
} from "@/api/purchase/purOrder"; } from "@/api/purchase/purOrder";
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";
@ -267,6 +283,7 @@ export default {
formVisible: false, formVisible: false,
deleteLoading: false, deleteLoading: false,
orderNo: null, orderNo: null,
suppliers: [],
statusMap: { statusMap: {
1: "草稿", 1: "草稿",
2: "未审核", 2: "未审核",
@ -364,18 +381,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)) {
@ -405,23 +422,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}) //
.then((response) => {
this.suppliers = response.data.list || [];
})
.catch(() => {
});
}, },
tableCountChange(row) { tableCountChange(row) {
if (this.$isNotBlank(row)) { if (this.$isNotBlank(row)) {
@ -457,19 +481,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);
@ -485,17 +509,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 = [];
@ -503,14 +527,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;
@ -538,13 +562,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;
}); });
}, },
}, },
@ -577,8 +601,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