采购订单界面相关修改

ywj_dev
anthonywj 2 years ago
parent 98461686c0
commit 573dd9f410

@ -71,12 +71,32 @@
<el-option label="送货单管理" :value="2"></el-option> <el-option label="送货单管理" :value="2"></el-option>
<el-option label="到货单管理" :value="3"></el-option> <el-option label="到货单管理" :value="3"></el-option>
<el-option label="退货单管理" :value="4"></el-option> <el-option label="退货单管理" :value="4"></el-option>
<el-option label="发票登记" :value="5"></el-option> <!-- <el-option label="发票登记" :value="5"></el-option>-->
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row type="flex"> <el-row type="flex">
<el-col :span="11">
<el-form-item label="往来单位类型" prop="corpType">
<el-select v-model="inputQuery.corpType"
size="small"
style="width: 90%"
placeholder="往来信息"
@change="corpTypeChange"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="内部进出平衡补单" prop="supplementOrderType"> <el-form-item label="内部进出平衡补单" prop="supplementOrderType">
<el-select :disabled="inputQuery.corpType !=3" <el-select :disabled="inputQuery.corpType !=3"
@ -126,12 +146,6 @@
<el-row type="flex"> <el-row type="flex">
<el-col :span="11">
<el-form-item label="单据前缀" prop="prefix">
<el-input v-model="inputQuery.prefix" size="small" style="width: 90%"></el-input>
</el-form-item>
</el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="供应商使用" prop="prefix"> <el-form-item label="供应商使用" prop="prefix">
<el-select v-model="inputQuery.spUse" style="width: 90%" placeholder="是否允许" clearable> <el-select v-model="inputQuery.spUse" style="width: 90%" placeholder="是否允许" clearable>
@ -140,6 +154,12 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11">
<el-form-item label="单据前缀" prop="prefix">
<el-input v-model="inputQuery.prefix" size="small" style="width: 90%"></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="11" class="el-col">--> <!-- <el-col :span="11" class="el-col">-->
<!-- <el-form-item label="单据详情展示方式" prop="orderVisibleType">--> <!-- <el-form-item label="单据详情展示方式" prop="orderVisibleType">-->
<!-- <el-select v-model="inputQuery.orderVisibleType"--> <!-- <el-select v-model="inputQuery.orderVisibleType"-->
@ -156,24 +176,7 @@
<el-row type="flex"> <el-row type="flex">
<el-col :span="11">
<el-form-item label="往来单位类型" prop="corpType">
<el-select v-model="inputQuery.corpType"
size="small"
style="width: 90%"
placeholder="往来信息"
@change="corpTypeChange"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row> </el-row>
<!-- <el-row type="flex">--> <!-- <el-row type="flex">-->
<!-- <el-col :span="11">--> <!-- <el-col :span="11">-->
@ -1068,11 +1071,11 @@
<script> <script>
import { candidateBusType } from '@/api/basic/busType' import {candidateBusType} from '@/api/basic/busType'
import busTypeAdvancedSettings from '@/views/basic/busType/busTypeAdvancedSettings.vue' import busTypeAdvancedSettings from '@/views/basic/busType/busTypeAdvancedSettings.vue'
import { isBlank } from '@/utils/strUtil' import {isBlank} from '@/utils/strUtil'
import { getOriginBusType } from '@/api/basic/busOriginType' import {getOriginBusType} from '@/api/basic/busOriginType'
import { getBasicUnitMaintains2 } from '@/api/basic/basicUnitMaintain' import {getBasicUnitMaintains2} from '@/api/basic/basicUnitMaintain'
export default { export default {
name: 'BussinessTypeModify', name: 'BussinessTypeModify',
@ -1090,7 +1093,7 @@ export default {
data() { data() {
return { return {
formRules: { formRules: {
name: [{ required: true, message: '请输入单据类型名称', trigger: 'blur' }], name: [{required: true, message: '请输入单据类型名称', trigger: 'blur'}],
mainAction: [ mainAction: [
{ {
required: true, required: true,
@ -1233,7 +1236,7 @@ export default {
} }
, ,
watch: { watch: {
corpType: function(val) { corpType: function (val) {
if (val != 1) { if (val != 1) {
this.inputQuery.orderTypeEnable = true this.inputQuery.orderTypeEnable = true
this.inputQuery.supplementOrderType = null this.inputQuery.supplementOrderType = null
@ -1312,6 +1315,7 @@ export default {
transition: border-bottom-color 0.3s; transition: border-bottom-color 0.3s;
outline: none; outline: none;
} }
/deep/ .el-collapse-item__content { /deep/ .el-collapse-item__content {
padding-bottom: 10px; padding-bottom: 10px;
font-size: 13px; font-size: 13px;

@ -72,7 +72,7 @@
import { import {
findByCode, findByCode,
saveCode, tabCode saveCode
} from "@/api/inout/code"; } from "@/api/inout/code";
export default { export default {
@ -106,35 +106,18 @@ export default {
methods: { methods: {
saveCode() { saveCode() {
if (this.editType == 1) { saveCode(this.editData)
this.repeatAddCode(this.editData); .then((response) => {
console.log(response)
tabCode(this.editData) if (response.code === 20000) {
.then((response) => { this.$message.success("提交成功");
console.log(response) this.codeDetail = this.editData;
if (response.code === 20000) { this.closeCodeDialog();
this.$message.success("提交成功"); } else {
} else { this.$message.error(response.message);
this.$message.error(response.message); }
} this.loading = false;
this.loading = false; });
});
} else {
saveCode(this.editData)
.then((response) => {
console.log(response)
if (response.code === 20000) {
this.$message.success("提交成功");
this.codeDetail = this.editData;
this.closeCodeDialog();
} else {
this.$message.error(response.message);
}
this.loading = false;
});
}
} }
, ,
cancelDialog() { cancelDialog() {

@ -5,7 +5,7 @@
<el-row> <el-row>
<el-col :span="18"> <el-col :span="18">
<el-form-item class="query-form-item" label="扫码查询:"> <el-form-item class="query-form-item" label="扫码查询:">
<el-input v-model="codeQuery.udiCode" <el-input v-model="codeQuery.code"
style="width: 97%" style="width: 97%"
placeholder="请扫描或输入UDI码" placeholder="请扫描或输入UDI码"
clearable="true" clearable="true"
@ -21,7 +21,15 @@
clearable="true"></el-input> clearable="true"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6">
<el-form-item label="状态:">
<el-select v-model="codeQuery.status" style="width: 90%" placeholder="请选择状态" clearable>
<el-option label="在库" value="1"></el-option>
<el-option label="已使用" value="2"></el-option>
<el-option label="已退回" value="3"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item class="query-form-item" label="收货仓库:"> <el-form-item class="query-form-item" label="收货仓库:">
<el-select v-model="codeQuery.invCode" placeholder="请选择收货仓库" clearable="true" <el-select v-model="codeQuery.invCode" placeholder="请选择收货仓库" clearable="true"
@ -89,21 +97,21 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item class="query-form-item" label="注册/备案号:"> <el-form-item class="query-form-item" label="生产企业:">
<el-input v-model="codeQuery.zczbhhzbapzbh" placeholder="注册/备案号" <el-input v-model="codeQuery.ylqxzcrbarmc" placeholder="生产企业"
style="width: 90%" style="width: 90%"
clearable="true"></el-input> 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 class="query-form-item" label="生产企业:"> <el-form-item class="query-form-item" label="注册/备案号:">
<el-input v-model="codeQuery.ylqxzcrbarmc" placeholder="生产企业" <el-input v-model="codeQuery.zczbhhzbapzbh" placeholder="注册/备案号"
style="width: 90%" style="width: 90%"
clearable="true"></el-input> clearable="true"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
@ -128,46 +136,101 @@
row-key="id" row-key="id"
> >
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column <el-table-column
label="UDI码" label="收货时间"
prop="code" prop="auditTime"
width="180" width="160"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="产品名称" label="预验收单号"
prop="orderId"
width="160"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="预验收单号"
prop="orderId"
width="160"
show-overflow-tooltip
></el-table-column>
<el-table-column label="状态" prop="status">
<template slot-scope="scope">
<el-tag :type="(scope.row.status)">
{{ statusMap[scope.row.status] }}
</el-tag>
</template>
</el-table-column>
<el-table-column
label="收货仓库"
prop="invName"
width="120"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="物资名称"
prop="productName" prop="productName"
width="160" width="160"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column
label="规格型号"
prop="ggxh"
width="160"
show-overflow-tooltip
></el-table-column>
<el-table-column <el-table-column
label="批次号" label="批次号"
prop="batchNo" width="120" prop="batchNo" width="120"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="扫码数量" label="入库数量"
prop="reCount" prop="originReCount" width="100"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="实际数量" label="剩余数量"
prop="reCount" prop="reCount" width="100"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="生产日期" label="生产日期"
prop="produceDate" prop="produceDate"
width="120" width="100"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="失效日期" label="失效日期"
prop="expireDate" prop="expireDate"
width="120" width="100"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="序列号" label="序列号"
prop="serialNo" prop="serialNo"
width="120" width="120"
></el-table-column> ></el-table-column>
<el-table-column
label="UDI码"
prop="code"
width="180"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="生产企业"
prop="manufactory"
width="160"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="注册/备案号"
prop="zczbhhzbapzbh"
width="160"
show-overflow-tooltip
></el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="codeTotal>0" v-show="codeTotal>0"
@ -203,14 +266,6 @@ export default {
data() { data() {
return { return {
showSearch: true, showSearch: true,
filterQuery: {
id: "",
billNo: null,
page: 1,
limit: 10,
startTime: null,
endTime: null,
},
invList: [], invList: [],
list: [], list: [],
total: 0, total: 0,
@ -275,7 +330,16 @@ export default {
], ],
}, },
codeQuery: { codeQuery: {
code: null,
orderId: null, orderId: null,
status: null,
invCode: null,
nameCode: null,
cpmctymc: null,
ggxh: null,
batchNo: null,
ylqxzcrbarmc: null,
zczbhhzbapzbh: null,
page: 1, page: 1,
limit: 10 limit: 10
}, },
@ -283,6 +347,12 @@ export default {
codeDetailLoading: false, codeDetailLoading: false,
codeDetailList: [], codeDetailList: [],
fromOptions: [], fromOptions: [],
auditDateRange: [],
statusMap: {
1: "在库",
2: "已使用",
3: "已退回",
}
}; };
}, },
components: {}, components: {},
@ -291,27 +361,19 @@ export default {
this.$router.push({ this.$router.push({
path: "", path: "",
}); });
this.filterQuery = {
id: "",
billNo: null,
page: 1,
limit: 10,
startTime: null,
endTime: null,
};
this.getList(); this.getList();
}, },
onSubmit() { onSubmit() {
this.loading = true; this.loading = true;
if (this.actDateRange !== null) {
this.filterQuery.startTime = this.actDateRange[0]; if (this.auditDateRange !== null) {
this.filterQuery.endTime = this.actDateRange[1]; this.codeQuery.startAduditTime = this.auditDateRange[0];
this.codeQuery.endAduditTime = this.auditDateRange[1];
} else { } else {
this.filterQuery.startTime = null; this.codeQuery.startAduditTime = null;
this.filterQuery.endTime = null; this.codeQuery.endAduditTime = null;
} }
this.filterQuery.page = 1; this.codeQuery.page = 1;
this.getList(); this.getList();
}, },
hideSearch() { hideSearch() {
@ -421,12 +483,6 @@ export default {
this.getCodeDetailList(); this.getCodeDetailList();
}, },
getCodeDetailList() { getCodeDetailList() {
if (isBlank(this.currentRow.billNo)) {
this.$message.error("请先选择需要查询的单据!")
return;
}
this.codeQuery.orderId = this.currentRow.billNo;
this.codeDetailLoading = true; this.codeDetailLoading = true;
filterDetail(this.codeQuery).then((res) => { filterDetail(this.codeQuery).then((res) => {
this.codeDetailLoading = false; this.codeDetailLoading = false;

@ -1,472 +1,488 @@
<template> <template>
<div> <div>
<el-form :model="formData" :rules="formRules" ref="dataForm" label-width="120px"> <el-form :model="formData" :rules="formRules" ref="dataForm" label-width="120px">
<el-row type="flex" justify="end" v-if="editType == 1"> <el-row type="flex" justify="end" v-if="editType == 1">
<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="saveOrder('3')" :loading="loading">审核通过</el-button> <el-button type="primary" @click.native="saveOrder('3')" :loading="loading">开始配货</el-button>
<el-button type="primary" @click.native="saveOrder('4')" :loading="loading">拒绝申请</el-button> <el-button type="primary" @click.native="saveOrder('4')" :loading="loading">作废</el-button>
</el-button-group> </el-button-group>
</el-row> </el-row>
<el-card style="margin-top: -5px;">
<el-row>
<el-col :span="11">
<el-form-item label="单据号:" prop="billNo">
<el-input v-model="formData.billNo" style="width: 90%" auto-complete="off" :disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="单据日期:" prop="billdate">
<el-date-picker
v-model="formData.billDate"
type="datetime"
placeholder="选择日期" :disabled="true"
style="width: 90%"
:clearable="false"
value-format="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-card style="margin-top: -5px;"> <el-row>
<el-row> <el-col :span="11">
<el-col :span="11"> <el-form-item label="收货仓库:" prop="locStorageCode">
<el-form-item label="单据号:" prop="billNo"> <el-select v-model="formData.invName" placeholder="收货仓库信息" style="width: 90%"
<el-input v-model="formData.billNo" style="width: 90%" auto-complete="off" :disabled="true"></el-input> :disabled="true" clearable>
</el-form-item> <el-option
</el-col> v-for="item in subInvList"
<el-col :span="11"> :key="item.name"
<el-form-item label="单据日期:" prop="billdate"> :label="item.name"
<el-date-picker :value="item.code">
v-model="formData.billDate" <span style="float: left">{{ item.name }}</span>
type="datetime" </el-option>
placeholder="选择日期" :disabled="true" </el-select>
style="width: 90%" </el-form-item>
:clearable="false" </el-col>
value-format="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row> <el-col :span="11">
<el-col :span="11"> <el-form-item label="处理状态:" prop="dealStatus">
<el-form-item label="收货仓库:" prop="locStorageCode"> <el-select v-model="formData.dealStatus" style="width: 90%" disabled>
<el-select v-model="formData.invName" placeholder="收货仓库信息" style="width: 90%" <el-option label="已处理" :value="1"></el-option>
:disabled="true" clearable> <el-option label="未处理" :value="2"></el-option>
<el-option <el-option label="作废" :value="3"></el-option>
v-for="item in subInvList" </el-select>
:key="item.name" </el-form-item>
:label="item.name" </el-col>
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="审核说明:" prop="billNo">
<el-input v-model="formData.auditRemark" style="width: 90%" auto-complete="off" type="textarea" autosize></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row> <!-- <el-col :span="11">-->
<el-col :span="11"> <!-- <el-form-item label="审核说明:" prop="billNo">-->
<el-form-item label="采购说明:" prop="billNo"> <!-- <el-input v-model="formData.auditRemark" style="width: 90%" auto-complete="off" type="textarea" autosize></el-input>-->
<el-input v-model="formData.remark" style="width: 90%":disabled="true" auto-complete="off" type="textarea" autosize></el-input> <!-- </el-form-item>-->
</el-form-item> <!-- </el-col>-->
</el-col> </el-row>
<el-col :span="11">
<!-- <el-form-item>-->
<!-- <el-checkbox v-model="formData.autoPurchase"></el-checkbox>-->
<!-- </el-form-item>-->
</el-col>
</el-row> <el-row>
<el-row v-show="formData.autoPurchase"> <el-col :span="24">
<el-col :span="11"> <el-form-item label="订单说明:" prop="billNo">
<el-form-item label="入库仓库:" prop="locStorageCode"> <el-input v-model="formData.remark" style="width: 90%" :disabled="true" auto-complete="off"
<el-select v-model="formData.targetSubInv" placeholder="入库仓库信息" style="width: 90%" @change="targetInvChange" clearable> type="textarea" autosize></el-input>
<el-option </el-form-item>
v-for="item in tarSubList" </el-col>
:key="item.name" <el-col :span="11">
:label="item.name" <!-- <el-form-item>-->
:value="item.code"> <!-- <el-checkbox v-model="formData.autoPurchase"></el-checkbox>-->
<span style="float: left">{{ item.name }}</span> <!-- </el-form-item>-->
</el-option> </el-col>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="入库单据类型:" class="query-form-item" prop="targetBillAction">
<el-select v-model="formData.targetBillAction" placeholder="请选择单据类型" style="width: 90%">
<el-option
v-for="item in busTypes"
:key="item.name"
:label="item.name"
:value="item.action">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="formData.autoPurchase">
<el-col :span="11">
<el-form-item label="入库仓库:" prop="locStorageCode">
<el-select v-model="formData.targetSubInv" placeholder="入库仓库信息" style="width: 90%"
@change="targetInvChange" clearable>
<el-option
v-for="item in tarSubList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="入库单据类型:" class="query-form-item" prop="targetBillAction">
<el-select v-model="formData.targetBillAction" placeholder="请选择单据类型" style="width: 90%">
<el-option
v-for="item in busTypes"
:key="item.name"
:label="item.name"
:value="item.action">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-card>
<el-card> </el-row>
<el-table v-loading="loading" :data="codeArray" style="width: 100%;" :row-class-name="tableRowClassName" border highlight-current-row max-height="300" height="300" ref="multipleTable"> </el-card>
<el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column label="物资名称" prop="productName" show-overflow-tooltip></el-table-column>
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip></el-table-column>
<el-table-column label="计量单位" prop="measname" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" prop="manufactory" show-overflow-tooltip></el-table-column>
<el-table-column width="150" label="单据数量">
<template slot-scope="scope">
<el-input size="small" v-model="scope.row.count"
placeholder="请输入数量" style="width: 80%"
type='number'
@change="tableCountChange(scope.row)"
:disabled="scope.row.index !== selectedIndex"
oninput="value=value.replace(/[^\d]/g,'')"></el-input>
</template>
</el-table-column>
</el-table>
</el-card>
</el-form>
<el-dialog <el-card>
title="物资录入" <el-table v-loading="loading" :data="codeArray" style="width: 100%;" :row-class-name="tableRowClassName" border
:visible.sync="selectProductVisible" highlight-current-row max-height="300" height="300" ref="multipleTable">
:close-on-click-modal="false" <el-table-column label="序号" type="index" width="50"></el-table-column>
:close-on-press-escape="false" <el-table-column label="物资名称" prop="productName" show-overflow-tooltip width="150"></el-table-column>
width="80%" <el-table-column label="规格型号" prop="spec" show-overflow-tooltip width="160"></el-table-column>
v-if="selectProductVisible" <el-table-column width="120" label="订单数量">
:append-to-body='true' <template slot-scope="scope">
> <el-input size="small" v-model="scope.row.count"
<purPlanProducts placeholder="请输入数量" style="width: 80%"
:closeDialog="closeDialogC2" type='number'
:data="thisData" @change="tableCountChange(scope.row)"
:purType="1" :disabled="scope.row.index !== selectedIndex"
></purPlanProducts> oninput="value=value.replace(/[^\d]/g,'')"></el-input>
</el-dialog> </template>
</div> </el-table-column>
<el-table-column label="计量单位" prop="measname" show-overflow-tooltip width="100"></el-table-column>
<el-table-column label="生产企业" prop="manufactory" show-overflow-tooltip width="160"></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh" show-overflow-tooltip="true"
width="160"></el-table-column>
</el-table>
</el-card>
</el-form>
<el-dialog
title="物资录入"
:visible.sync="selectProductVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="80%"
v-if="selectProductVisible"
:append-to-body='true'
>
<purPlanProducts
:closeDialog="closeDialogC2"
:data="thisData"
:purType="1"
></purPlanProducts>
</el-dialog>
</div>
</template> </template>
<script> <script>
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import purPlanProducts from "@/views/purchase/purPlan/purOrderSelectProduct"; import purPlanProducts from "@/views/purchase/purPlan/purOrderSelectProduct";
import {auditOrder, delOrderDetail, listOrderDetail} from "@/api/purchase/purOrder"; import {auditOrder, delOrderDetail, listOrderDetail} from "@/api/purchase/purOrder";
import {filterAllByUser,selectByCode} from "@/api/system/invWarehouse"; import {filterAllByUser, selectByCode} from "@/api/system/invWarehouse";
import {filterSubByInv} from "@/api/system/invSubWarehouse"; import {filterSubByInv} from "@/api/system/invSubWarehouse";
import {getLocalJoinByUser} from "@/api/basic/busType"; import {getLocalJoinByUser} from "@/api/basic/busType";
export default { export default {
name: "idQuery", name: "idQuery",
props: { props: {
closeDialog: { closeDialog: {
type: Function, type: Function,
required: true, required: true,
}, },
idQuery: { idQuery: {
type: Object, type: Object,
required: true, required: true,
}, },
editType: { editType: {
type: Object, type: Object,
required: true, required: true,
},
}, },
data() { },
return { data() {
code: "", return {
query: { code: "",
orderIdFk: "", query: {
page: 1, orderIdFk: "",
limit: 10, page: 1,
}, limit: 10,
formData: { },
id: null, formData: {
billNo: null, id: null,
billDate: "", billNo: null,
remark: "", billDate: "",
deptCode: null, remark: "",
locStorageCode: null, deptCode: null,
invWarehouseCode: null, locStorageCode: null,
auditRemark: null, invWarehouseCode: null,
autoPurchase: false, auditRemark: null,
targetInv: 1000, autoPurchase: false,
targetSubInv: null, targetInv: 1000,
targetBillAction: null, targetSubInv: null,
}, targetBillAction: null,
formRules: {}, },
codeArray: [], formRules: {},
total: 0, codeArray: [],
loading: false, total: 0,
index: null, loading: false,
formLoading: false, index: null,
formVisible: false, formLoading: false,
deleteLoading: false, formVisible: false,
orderNo: null, deleteLoading: false,
statusMap: { orderNo: null,
1: "草稿", statusMap: {
2: "未审核", 1: "草稿",
3: "已审核", 2: "未审核",
}, 3: "已审核",
typeMap: { },
1: "预入库", typeMap: {
2: "普通采购", 1: "预入库",
}, 2: "普通采购",
orderEditor: true, },
sOptions: [], orderEditor: true,
sValue: [], sOptions: [],
sList: [], sValue: [],
sLoading: false, sList: [],
busTypes: [], sLoading: false,
currentRow: {}, busTypes: [],
selectedIndex: "", currentRow: {},
selectProductVisible: false, selectedIndex: "",
thisData: {}, selectProductVisible: false,
subInvList: [], thisData: {},
tarSubList: [], subInvList: [],
invQueryData: {}, tarSubList: [],
invQueryData: {},
}; };
},
components: {
draggable,
purPlanProducts,
},
methods: {
saveOrder(status) {
let tip = "";
if (status == "3") {
tip = "是否确定通过该采购计划?";
} else {
tip = "是否确定拒绝该采购计划?";
}
this.$confirm(tip, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.submitFunction(status);
}).catch(() => {
this.loading = false;
});
}, },
components: { submitFunction(status) {
draggable, let tMessage = status === '1' ? '保存' : '提交';
purPlanProducts, this.loading = true;
let tQuery = {
autoPurchase: this.formData.autoPurchase,
targetSubInv: this.formData.targetSubInv,
targetDeptCode: this.formData.targetDeptCode,
targetBillAction: this.formData.targetBillAction,
editStatus: status,
purOrderEntity: this.formData,
subErpOrders: this.codeArray,
}
auditOrder(tQuery)
.then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success(tMessage + "成功");
this.closeDialog(true);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
})
},
selectProductFunction() {
this.selectProductVisible = true;
}, },
methods: { closeDialogC2(rData) {
saveOrder(status) { this.selectProductVisible = false;
let tip = ""; this.thisData = {};
if (status == "3") { if (this.$isNotBlank(rData)) {
tip = "是否确定通过该采购计划?"; this.codeArray = [];
} else { rData.forEach((obj, index) => {
tip = "是否确定拒绝该采购计划?"; this.codeArray.unshift(obj);
} });
this.$confirm(tip, "提示", { this.$refs.multipleTable.setCurrentRow(this.codeArray[0]);
confirmButtonText: "确定", this.currentRow = this.codeArray[0];
cancelButtonText: "取消", this.selectedIndex = 0;
type: "warning", }
}).then(() => { },
this.submitFunction(status); rowChange(val) {
}).catch(() => { this.currentRow = val;
this.loading = false; this.selectedIndex = val.index;
}); },
}, tableCountChange(row) {
submitFunction(status) { if (this.$isNotBlank(row)) {
let tMessage = status === '1' ? '保存' : '提交'; // row.count = row.reCount;
this.loading = true; }
let tQuery = { },
autoPurchase:this.formData.autoPurchase, tableRowClassName({row, rowIndex}) {
targetSubInv:this.formData.targetSubInv, row.index = rowIndex;
targetDeptCode:this.formData.targetDeptCode, },
targetBillAction:this.formData.targetBillAction, //
editStatus: status, resetForm() {
purOrderEntity: this.formData, if (this.$refs["dataForm"]) {
subErpOrders: this.codeArray, //
} this.$refs["dataForm"].clearValidate();
auditOrder(tQuery)
.then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success(tMessage + "成功");
this.closeDialog(true);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
})
},
selectProductFunction() {
this.selectProductVisible = true;
},
closeDialogC2(rData) {
this.selectProductVisible = false;
this.thisData = {};
if (this.$isNotBlank(rData)) {
this.codeArray = [];
rData.forEach((obj, index) => {
this.codeArray.unshift(obj);
});
this.$refs.multipleTable.setCurrentRow(this.codeArray[0]);
this.currentRow = this.codeArray[0];
this.selectedIndex = 0;
}
},
rowChange(val) {
this.currentRow = val;
this.selectedIndex = val.index;
},
tableCountChange(row) {
if (this.$isNotBlank(row)) {
// row.count = row.reCount;
}
},
tableRowClassName({row, rowIndex}) {
row.index = rowIndex;
},
// //
resetForm() { this.$refs["dataForm"].resetFields();
if (this.$refs["dataForm"]) { this.getList();
// }
this.$refs["dataForm"].clearValidate(); },
// deleteCodeArray(index, row) {
this.$refs["dataForm"].resetFields(); this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
this.getList(); confirmButtonText: "确定",
} cancelButtonText: "取消",
}, type: "warning",
deleteCodeArray(index, row) { }).then(() => {
this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", { this.$refs.multipleTable.setCurrentRow();
confirmButtonText: "确定", this.currentRow = {};
cancelButtonText: "取消", this.selectedIndex = "";
type: "warning",
}).then(() => {
this.$refs.multipleTable.setCurrentRow();
this.currentRow = {};
this.selectedIndex = "";
if (this.orderEditor) { if (this.orderEditor) {
this.detailLoading = true; this.detailLoading = true;
if (this.$isNotBlank(row.id)) { if (this.$isNotBlank(row.id)) {
delOrderDetail(row.id) delOrderDetail(row.id)
.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 {
this.$message.error(response.message);
}
})
.catch(() => {
this.detailLoading = false;
})
} else {
this.$message.success('删除成功');
this.codeArray.splice(index, 1);
}
} else { } else {
this.$message.success('删除成功'); this.$message.error(response.message);
this.codeArray.splice(index, 1);
} }
}).catch(() => { })
.catch(() => {
}); this.detailLoading = false;
}, })
getStockOrderDetailList() { } else {
this.loading = true; this.$message.success('删除成功');
listOrderDetail(this.query) // this.codeArray.splice(index, 1);
.then((response) => { }
console.log(response) } else {
this.codeArray = response.data.list || []; this.$message.success('删除成功');
this.total = response.data.total || 0; this.codeArray.splice(index, 1);
this.loading = false; }
}) }).catch(() => {
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
findSubInvs() {
this.subInvList = [];
let query = {
pcode: this.formData.locStorageCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
if (this.subInvList != null && this.subInvList.length == 1) {
this.formData.invWarehouseCode = this.subInvList[0].code;
}
})
.catch(() => {
});
},
findTargetSubInvs() { });
if(this.formData.targetSubInv!=null && this.tarSubList.length>0){ },
this.formData.targetDeptCode= this.subInvList.find(item => item.code == this.formData.targetSubInv).parentId getStockOrderDetailList() {
this.loading = true;
listOrderDetail(this.query) //
.then((response) => {
console.log(response)
this.codeArray = response.data.list || [];
this.total = response.data.total || 0;
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
findSubInvs() {
this.subInvList = [];
let query = {
pcode: this.formData.locStorageCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
if (this.subInvList != null && this.subInvList.length == 1) {
this.formData.invWarehouseCode = this.subInvList[0].code;
} }
this.tarSubList = []; })
let query = { .catch(() => {
pcode: 1000 });
}; },
filterSubByInv(query)
.then((response) => {
this.tarSubList = response.data || [];
if (this.tarSubList != null && this.tarSubList.length == 1) {
this.formData.targetSubInv = this.tarSubList[0].code;
this.formData.targetDeptCode=this.tarSubList[0].parentId;
this.targetInvChange(); findTargetSubInvs() {
} if (this.formData.targetSubInv != null && this.tarSubList.length > 0) {
}) this.formData.targetDeptCode = this.subInvList.find(item => item.code == this.formData.targetSubInv).parentId
.catch(() => { }
}); this.tarSubList = [];
}, let query = {
targetInvChange() { pcode: 1000
let query = { };
code: this.formData.targetSubInv, filterSubByInv(query)
enabled: true, .then((response) => {
spUse: true, this.tarSubList = response.data || [];
}; if (this.tarSubList != null && this.tarSubList.length == 1) {
getLocalJoinByUser(query) this.formData.targetSubInv = this.tarSubList[0].code;
.then((response) => { this.formData.targetDeptCode = this.tarSubList[0].parentId;
this.busTypes = response.data.list || [];
// this.formData.targetBillAction = this.busTypes[0].localAction;
})
.catch(() => {
});
let query1 = {
code: this.formData.targetSubInv,
};
selectByCode(query1)
.then((res) => {
if (res.code === 20000) {
this.formData.targetDeptCode=res.data
}
})
},
this.targetInvChange();
}
})
.catch(() => {
});
}, },
filters: {}, targetInvChange() {
mounted() { let query = {
document.body.ondrop = function (event) { code: this.formData.targetSubInv,
event.preventDefault(); enabled: true,
event.stopPropagation(); spUse: true,
}; };
}, getLocalJoinByUser(query)
created() { .then((response) => {
if (this.$isNotBlank(this.idQuery.id)) { this.busTypes = response.data.list || [];
this.query.limit = 100; // this.formData.targetBillAction = this.busTypes[0].localAction;
this.query.orderIdFk = this.idQuery.id; })
this.formData = this.idQuery.formData; .catch(() => {
this.formData.targetInv = 1000; });
this.orderEditor = true; let query1 = {
this.sValue = this.formData.corpName; code: this.formData.targetSubInv,
this.getStockOrderDetailList(); };
} else { selectByCode(query1)
this.formData = { .then((res) => {
id: null, if (res.code === 20000) {
billNo: null, this.formData.targetDeptCode = res.data
billDate: "", }
remark: "", })
deptCode: null,
locStorageCode: null,
invWarehouseCode: null,
auditRemark: null,
autoPurchase: false,
targetInv: 1000,
targetSubInv: null,
targetBillAction: null,
};
this.orderEditor = false;
}
this.findTargetSubInvs();
this.codeArray = [];
}, },
},
filters: {},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
},
created() {
if (this.$isNotBlank(this.idQuery.id)) {
this.query.limit = 100;
this.query.orderIdFk = this.idQuery.id;
this.formData = this.idQuery.formData;
this.formData.targetInv = 1000;
this.orderEditor = true;
this.sValue = this.formData.corpName;
this.getStockOrderDetailList();
} else {
this.formData = {
id: null,
billNo: null,
billDate: "",
remark: "",
deptCode: null,
locStorageCode: null,
invWarehouseCode: null,
auditRemark: null,
autoPurchase: false,
targetInv: 1000,
targetSubInv: null,
targetBillAction: null,
};
this.orderEditor = false;
}
this.findTargetSubInvs();
this.codeArray = [];
},
}; };
</script> </script>
<style> <style>
.ao-text { .ao-text {
width: 100%; width: 100%;
font-size: 13px; font-size: 13px;
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
float: right; float: right;
text-align: right; text-align: right;
margin-top: 10px; margin-top: 10px;
} }
</style> </style>

@ -8,10 +8,9 @@
<el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input> <el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="采购部门"> <el-form-item label="采购部门">
<el-select v-model="filterQuery.invCode" style="width: 90%" placeholder="请选择所属仓库"> <el-select v-model="filterQuery.invCode" style="width: 90%" placeholder="请选择采购部门">
<el-option <el-option
v-for="item in invList" v-for="item in invList"
:key="item.name" :key="item.name"
@ -22,8 +21,6 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="收货仓库"> <el-form-item label="收货仓库">
<el-select v-model="filterQuery.deptCode" placeholder="请选择收货仓库" style="width: 90%"> <el-select v-model="filterQuery.deptCode" placeholder="请选择收货仓库" style="width: 90%">
@ -39,27 +36,10 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8">
<el-form-item label="创建时间:">
<el-date-picker
:picker-options="pickerOptions"
v-model="createTimes"
type="daterange"
format="yyyy 年 MM 月 dd 日"
style="width: 90%"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="审核时间:"> <el-form-item label="发布时间:">
<el-date-picker <el-date-picker
:picker-options="pickerUpOptions" :picker-options="pickerUpOptions"
v-model="auditTimes" v-model="auditTimes"
@ -76,8 +56,6 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
<el-button-group style="display:flex;"> <el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button> <el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
@ -92,23 +70,28 @@
@current-change="handleDetail"> @current-change="handleDetail">
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="采购订单号" prop="billNo" width="150" show-overflow-tooltip></el-table-column> <el-table-column label="采购订单号" prop="billNo" width="150" show-overflow-tooltip></el-table-column>
<el-table-column label="创建时间" prop="createTime" width="180" show-overflow-tooltip></el-table-column> <el-table-column label="发布时间" prop="auditTime" width="180" show-overflow-tooltip></el-table-column>
<el-table-column label="采购部门" prop="invName" width="150" show-overflow-tooltip></el-table-column> <el-table-column label="处理状态" prop="emergency" width="120">
<el-table-column label="收货仓库" prop="deptName" width="150" show-overflow-tooltip></el-table-column> <template slot-scope="scope">
{{ dealStatus[scope.row.emergency] }}
</template>
</el-table-column>
<!-- <el-table-column label="创建时间" prop="createTime" width="180" show-overflow-tooltip></el-table-column>-->
<el-table-column label="紧急程度" prop="emergency" width="120"> <el-table-column label="紧急程度" prop="emergency" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
{{ emergencyMap[scope.row.emergency] }} {{ emergencyMap[scope.row.emergency] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到货时间" prop="arrivalTime" width="150" show-overflow-tooltip></el-table-column> <el-table-column label="到货时间" prop="arrivalTime" width="150" show-overflow-tooltip></el-table-column>
<el-table-column label="采购说明" prop="remark" width="180" show-overflow-tooltip></el-table-column> <el-table-column label="订单说明" prop="remark" width="180" show-overflow-tooltip></el-table-column>
<el-table-column label="审核时间" prop="auditTime" width="180" show-overflow-tooltip></el-table-column> <el-table-column label="采购部门" prop="deptName" width="150" show-overflow-tooltip></el-table-column>
<el-table-column label="操作"> <el-table-column label="收货仓库" prop="invName" width="150" show-overflow-tooltip></el-table-column>
<!-- <template slot-scope="scope">--> <el-table-column label="操作" fixed="right" width="100">
<!-- <el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)"--> <template slot-scope="scope">
<!-- >删除--> <el-button type="text" size="small" @click.native.stop="newDistributionForm(scope.row)"
<!-- </el-button>--> >处理
<!-- </template>--> </el-button>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
@ -123,16 +106,16 @@
<el-card class="el-card"> <el-card class="el-card">
<el-table v-loading="loading" :data="detailList" style="width: 100%" border highlight-current-row="true"> <el-table v-loading="loading" :data="detailList" style="width: 100%" border highlight-current-row="true">
<el-table-column label="序号" type="index" width="50"></el-table-column> <el-table-column label="序号" type="index" width="50"></el-table-column>
<!-- <el-table-column label="产品编码" prop="productId"></el-table-column> --> <el-table-column label="物资名称" prop="productName" show-overflow-tooltip width="150"></el-table-column>
<el-table-column label="物资名称" prop="productName" show-overflow-tooltip="true"></el-table-column> <el-table-column label="规格型号" prop="spec" show-overflow-tooltip width="160"></el-table-column>
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true"></el-table-column> <el-table-column label="计量单位" prop="measname" show-overflow-tooltip width="100"></el-table-column>
<el-table-column label="申购数量" prop="count"></el-table-column> <el-table-column label="计划数量" prop="planCount" width="100"></el-table-column>
<el-table-column label="计划数量" prop="planCount"></el-table-column> <el-table-column label="订单数量" prop="count" width="100"></el-table-column>
<el-table-column label="计量单位" prop="spec" show-overflow-tooltip="true"></el-table-column> <el-table-column label="计量单位" prop="spec" show-overflow-tooltip="true" width="100"></el-table-column>
<el-table-column label="供应商" prop="supName" show-overflow-tooltip="true"></el-table-column> <!-- <el-table-column label="供应商" prop="supName" show-overflow-tooltip="true"></el-table-column>-->
<el-table-column label="生产企业" prop="manufactory" show-overflow-tooltip="true"></el-table-column> <el-table-column label="生产企业" prop="manufactory" show-overflow-tooltip="true" width="160"></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh" show-overflow-tooltip="true" width="160"></el-table-column> <el-table-column label="注册/备案号" prop="zczbhhzbapzbh" show-overflow-tooltip="true" width="160"></el-table-column>
<el-table-column label="注册/备案人" prop="ylqxzcrbarmc" show-overflow-tooltip="true"></el-table-column> <!-- <el-table-column label="注册/备案人" prop="ylqxzcrbarmc" show-overflow-tooltip="true"></el-table-column>-->
</el-table> </el-table>
</el-card> </el-card>
@ -197,6 +180,13 @@ export default {
2: "紧急", 2: "紧急",
3: "不紧急", 3: "不紧急",
}, },
dealStatus: {
1: "已处理",
2: "未处理",
3: "作废",
},
invList: {}, invList: {},
deptList: {}, deptList: {},
idQuery: {}, idQuery: {},
@ -411,7 +401,7 @@ export default {
this.deptList = res.data || []; this.deptList = res.data || [];
}); });
}, },
newDistributionForm(index, row) { newDistributionForm(row) {
this.idQuery.id = ''; this.idQuery.id = '';
if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) { if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) {
this.idQuery.id = row.id; this.idQuery.id = row.id;

Loading…
Cancel
Save