Merge branch 'ccc'

# Conflicts:
#	src/views/remind/invRemindSetModify.vue
#	vue.config.js
prod
anthonywj 2 years ago
commit b521965c82

@ -41,7 +41,6 @@
"clipboard": "2.0.8", "clipboard": "2.0.8",
"core-js": "3.19.1", "core-js": "3.19.1",
"echarts": "4.9.0", "echarts": "4.9.0",
"element-china-area-data": "^5.0.2",
"element-ui": "2.15.8", "element-ui": "2.15.8",
"file-saver": "2.0.5", "file-saver": "2.0.5",
"fuse.js": "6.4.3", "fuse.js": "6.4.3",

@ -421,8 +421,13 @@ export function getOrderList(params) {
params: params params: params
}); });
} }
export function getOrderFilter(params) {
return axios({
url: "udiwms/inout/preInorder/filter",
method: "get",
params: params
});
}
export function updateStatus(query) { export function updateStatus(query) {
return axios({ return axios({
url: "/spms/inout/order/web/updateStatus", url: "/spms/inout/order/web/updateStatus",

@ -1,30 +1,40 @@
<template> <template>
<div> <div>
<el-card style="margin: 5px; margin-top: -20px"> <el-card style="margin: 5px; margin-top: -20px">
<el-form :model="orderFormData" :rules="formRules" ref="dataForm" label-width="100px" <el-form
style="margin-bottom: -15px"> :model="orderFormData"
<el-button-group style="display: flex;margin: 0px 0 10px 80%; height: 35px"> :rules="formRules"
<el-button ref="dataForm"
size="mini" label-width="100px"
type="primary" style="margin-bottom: -15px"
@click.native="saveOrder()" >
>草稿保存 <el-button-group
</el-button style="display: flex; margin: 0px 0 10px 80%; height: 35px"
> >
<el-button <el-button
size="mini" size="mini"
type="primary" type="primary"
@click.native="submit()" v-if="documentShow"
@click.native="OptionalDocument()"
>选入预验收库单
</el-button>
<el-button size="mini" type="primary" @click.native="saveOrder()"
>草稿保存
</el-button>
<el-button size="mini" type="primary" @click.native="submit()"
>立即提交 >立即提交
</el-button </el-button>
>
</el-button-group> </el-button-group>
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-form-item prop="corpOrderId" label="单据号:"> <el-form-item prop="corpOrderId" label="单据号:">
<el-input v-model="orderFormData.corpOrderId" auto-complete="off" style="width: 90%" <el-input
v-model="orderFormData.corpOrderId"
auto-complete="off"
style="width: 90%"
clearable clearable
:disabled="corpOrderIdDisabled"></el-input> :disabled="corpOrderIdDisabled"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
@ -45,15 +55,19 @@
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-form-item prop="action" label="单据类型:"> <el-form-item prop="action" label="单据类型:">
<el-select v-model="orderFormData.action" placeholder="请选择单据类型" <el-select
v-model="orderFormData.action"
placeholder="请选择单据类型"
:disabled="corpOrderIdDisabled" :disabled="corpOrderIdDisabled"
style="width: 90%" style="width: 90%"
@change="actionChange"> @change="actionChange"
>
<el-option <el-option
v-for="item in busTypeOptions" v-for="item in busTypeOptions"
:key="item.name" :key="item.name"
:label="item.name" :label="item.name"
:value="item.action"> :value="item.action"
>
<span style="float: left">{{ item.name }}</span> <span style="float: left">{{ item.name }}</span>
</el-option> </el-option>
</el-select> </el-select>
@ -62,14 +76,20 @@
<el-col :span="11"> <el-col :span="11">
<el-form-item prop="invCode" label="当前仓库:"> <el-form-item prop="invCode" label="当前仓库:">
<el-select v-model="orderFormData.invCode" placeholder="当前仓库" <el-select
v-model="orderFormData.invCode"
placeholder="当前仓库"
style="width: 90%" style="width: 90%"
:disabled="corpOrderIdDisabled" @change="changeInv" filterable> :disabled="corpOrderIdDisabled"
@change="changeInv"
filterable
>
<el-option <el-option
v-for="item in curInvOptions" v-for="item in curInvOptions"
: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">{{ <span style="float: right; color: #8492a6; font-size: 13px">{{
item.warehouseName item.warehouseName
@ -78,13 +98,17 @@
</el-select> </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-col :span="11">
<el-form-item prop="fromCorp" <el-form-item
prop="fromCorp"
label="往来信息:" label="往来信息:"
v-if="curAction.corpType === 0 || curAction.corpType === 2 || (curAction.corpType === 1 && !curAction.genUnit)" v-if="
curAction.corpType === 0 ||
curAction.corpType === 2 ||
(curAction.corpType === 1 && !curAction.genUnit)
"
> >
<el-select <el-select
v-model="orderFormData.fromCorp" v-model="orderFormData.fromCorp"
@ -108,12 +132,16 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="fromCorp" <el-form-item
prop="fromCorp"
v-if="curAction.corpType == 3" v-if="curAction.corpType == 3"
label="往来信息:" label="往来信息:"
> >
<el-select v-model="orderFormData.fromInvCode" placeholder="请选择往来仓库" <el-select
:disabled="corpOrderIdDisabled" filterable v-model="orderFormData.fromInvCode"
placeholder="请选择往来仓库"
:disabled="corpOrderIdDisabled"
filterable
clearable clearable
style="width: 90%" style="width: 90%"
> >
@ -121,29 +149,35 @@
v-for="item in fromInvOptions" v-for="item in fromInvOptions"
:key="item.code" :key="item.code"
: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">{{ <span style="float: right; color: #8492a6; font-size: 13px">{{
item.code item.code
}}</span> }}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="fromCorp" label="往来信息:" <el-form-item
v-if="curAction.corpType ==1 && curAction.genUnit"> prop="fromCorp"
<el-input v-model="orderFormData.fromCorp" auto-complete="off" label="往来信息:"
v-if="curAction.corpType == 1 && curAction.genUnit"
>
<el-input
v-model="orderFormData.fromCorp"
auto-complete="off"
clearable clearable
style="width: 90%" style="width: 90%"
:disabled="corpOrderIdDisabled" :disabled="corpOrderIdDisabled"
placeholder="请输入病人住院号" placeholder="请输入病人住院号"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item prop="remark" label="备注:"> <el-form-item prop="remark" label="备注:">
<el-input v-model="orderFormData.remark" auto-complete="off" <el-input
v-model="orderFormData.remark"
auto-complete="off"
clearable clearable
style="width: 90%" style="width: 90%"
placeholder="请输入备注信息" placeholder="请输入备注信息"
@ -151,13 +185,21 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="documentShow">
<el-col :span="11">
<el-form-item prop="acceptance" label="预验收单据:">
<el-input
style="width:90%"
:disabled="true"
v-model="orderFormData.checkPreInOrders"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="errView == 1"> <el-row v-if="errView == 1">
<el-col :span="20"> <el-col :span="20">
<el-form-item prop="errMsg" label="异常信息:"> <el-form-item prop="errMsg" label="异常信息:">
<el-input <el-input v-model="orderFormData.errMsg" disabled></el-input>
v-model="orderFormData.errMsg"
disabled
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -168,7 +210,7 @@
id="inputer" id="inputer"
@focus="getInputFocus($event)" @focus="getInputFocus($event)"
@keypress.enter.native="enterKey($event)" @keypress.enter.native="enterKey($event)"
ref='inputRef' ref="inputRef"
style="ime-mode: disabled" style="ime-mode: disabled"
type="tel" type="tel"
v-model="codeFormData.code" v-model="codeFormData.code"
@ -182,71 +224,100 @@
@click.native.stop="addCode()" @click.native.stop="addCode()"
style="margin-left: 15px" style="margin-left: 15px"
>添加 >添加
</el-button </el-button>
>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
</el-card> </el-card>
<el-tabs type="border-card" style="margin: 5px"> <el-tabs type="border-card" style="margin: 5px">
<el-tab-pane label="业务详情" v-if="bizShow && viewBizVisible"> <el-tab-pane label="业务详情" v-if="bizShow && viewBizVisible">
<biz-detail-panel :idQuery="orderFormData" :refreshPanel="refreshCodesPanel" :refreshOrder="refreshOrder" <biz-detail-panel
:idQuery="orderFormData"
:refreshPanel="refreshCodesPanel"
:refreshOrder="refreshOrder"
:viewType="viewType" :viewType="viewType"
:curBustype="curAction" :curBustype="curAction"
v-if="isBizDetailAlive"></biz-detail-panel> v-if="isBizDetailAlive"
></biz-detail-panel>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="扫码详情" v-if="viewCodeVisible"> <el-tab-pane label="扫码详情" v-if="viewCodeVisible">
<codeDetailPanel :idQuery="orderFormData" :refreshPanel="refreshCodesPanel" <codeDetailPanel
:idQuery="orderFormData"
:refreshPanel="refreshCodesPanel"
:viewType="viewType" :viewType="viewType"
v-if="isCodeDetailAlive"></codeDetailPanel> v-if="isCodeDetailAlive"
></codeDetailPanel>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="扫码明细" v-if="viewCodeDetailVisible"> <el-tab-pane label="扫码明细" v-if="viewCodeDetailVisible">
<codesPanel :idQuery="orderFormData" <codesPanel
:idQuery="orderFormData"
:refreshPanel="refreshCodesPanel" :refreshPanel="refreshCodesPanel"
v-if="isCodeAlive" v-if="isCodeAlive"
:viewType="viewType" :viewType="viewType"
:selectRlTitle="selectRlTitle" :selectRlTitle="selectRlTitle"
:editTitle="editTitle" :editTitle="editTitle"
:selectUnitTitle="selectUnitTitle"></codesPanel> :selectUnitTitle="selectUnitTitle"
></codesPanel>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<el-dialog <el-dialog
:title="editTitle" :title="editTitle"
:visible.sync="editOriginCodeVisible" :visible.sync="editOriginCodeVisible"
append-to-body width="70%" append-to-body
width="70%"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
v-if="editOriginCodeVisible"> v-if="editOriginCodeVisible"
>
<editCodeDialog <editCodeDialog
:closeCodeDialog="closeCodeDialog" :closeCodeDialog="closeCodeDialog"
:repeatAddCode="repeatAddCode" :repeatAddCode="repeatAddCode"
:codeDetail="codeFormData" :codeDetail="codeFormData"
editType="1"> editType="1"
>
</editCodeDialog> </editCodeDialog>
</el-dialog> </el-dialog>
<!-- 选入预验收库单 -->
<el-dialog
title="选入预验收库单"
:visible.sync="selectorder"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="70%"
v-if="selectorder"
append-to-body
@close="closeDialogtwo"
>
<dialog-create-order-select
@giveselectbox="giveselectbox"
:closeDialogtwo="closeDialogtwo"
>
</dialog-create-order-select>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { import {
submitBiz, addOrderWeb, submitCodes, submitOrderWeb, saveOrderWeb, submitBiz,
updateCodeBindSup, enterCodeWeb addOrderWeb,
submitCodes,
submitOrderWeb,
saveOrderWeb,
updateCodeBindSup,
enterCodeWeb,
} from "../../api/inout/order"; } from "../../api/inout/order";
import { findByFrom, findInvByUser } from "../../api/system/invSubWarehouse"; import { findByFrom, findInvByUser } from "../../api/system/invSubWarehouse";
import { parseTime } from "../../utils/coTools"; import { parseTime } from "../../utils/coTools";
import {getBasicUnitMaintains} from "../../api/basic/basicUnitMaintain" import { getBasicUnitMaintains } from "../../api/basic/basicUnitMaintain";
import editCodeDialog from "./DialogEditCode"; import editCodeDialog from "./DialogEditCode";
import DialogCreateOrderSelect from "./DialogCreateOrderSelect";
import codesPanel from "./PanelCreateOrderCodes";
import codesPanel from "./PanelCreateOrderCodes" import codeDetailPanel from "./PanelCreateOrderCodeDetail";
import codeDetailPanel from "./PanelCreateOrderCodeDetail" import bizDetailPanel from "./PanelCreateOrderBizDetail";
import bizDetailPanel from "./PanelCreateOrderBizDetail" import A from "../../plugins/KeyScaner";
import A from "../../plugins/KeyScaner"
import { findByInvUser } from "@/api/basic/busType"; import { findByInvUser } from "@/api/basic/busType";
export default { export default {
@ -264,15 +335,14 @@ export default {
type: Object, type: Object,
required: true, required: true,
}, },
viewType: { //12.3 viewType: {
//12.3
type: Object, type: Object,
required: true, required: true,
}, },
}, },
data() { data() {
return { return {
// //
orderFormData: { orderFormData: {
billNo: null, billNo: null,
@ -283,10 +353,12 @@ export default {
fromInvCode: null, fromInvCode: null,
remark: null, remark: null,
fromType: 2, fromType: 2,
errMsg: null errMsg: null,
checkPreInOrders: null,
}, },
errView: 0, errView: 0,
//
selectorder: false,
// //
codeFormData: { codeFormData: {
code: "", code: "",
@ -316,17 +388,20 @@ export default {
formRules: { formRules: {
corpOrderId: [ corpOrderId: [
{required: true, message: "请输入单据号", trigger: "blur"} { required: true, message: "请输入单据号", trigger: "blur" },
], ],
createTime: [ createTime: [
{required: true, message: "请选择创建时间", trigger: "blur"} { required: true, message: "请选择创建时间", trigger: "blur" },
], ],
invCode: [ invCode: [
{required: true, message: "请选择当前仓库", trigger: "change"} { required: true, message: "请选择当前仓库", trigger: "change" },
], ],
action: [ action: [
{required: true, message: "请选择单据类型", trigger: "change"} { required: true, message: "请选择单据类型", trigger: "change" },
], ],
acceptance:[
{required: true, message: "请选入预验收单据", trigger: "blur"},
]
}, },
isScan: true, isScan: true,
scanText: "扫码录入:", scanText: "扫码录入:",
@ -355,30 +430,45 @@ export default {
viewBizVisible: false, viewBizVisible: false,
viewCodeVisible: false, viewCodeVisible: false,
viewCodeDetailVisible: false, viewCodeDetailVisible: false,
documentShow:false,//
}; };
}, },
components: { components: {
codesPanel, codeDetailPanel, bizDetailPanel, editCodeDialog codesPanel,
codeDetailPanel,
bizDetailPanel,
editCodeDialog,
DialogCreateOrderSelect,
}, },
methods: { methods: {
// //
findInvListByUser() { findInvListByUser() {
this.curInvOptions = []; this.curInvOptions = [];
findInvByUser() findInvByUser()
.then(response => { .then((response) => {
this.curInvOptions = response.data || []; this.curInvOptions = response.data || [];
if (this.curInvOptions != null && this.curInvOptions.length > 0 && this.orderFormData.invWarehouseCode == null) { if (
this.curInvOptions != null &&
this.curInvOptions.length > 0 &&
this.orderFormData.invWarehouseCode == null
) {
this.orderFormData.invWarehouseCode = this.curInvOptions[0].code; this.orderFormData.invWarehouseCode = this.curInvOptions[0].code;
this.getBusTypeByInv() this.getBusTypeByInv();
} }
}) })
.catch(() => { .catch(() => {});
}); },
//
giveselectbox(val) {
this.orderFormData.checkPreInOrders = val;
}, },
// //
changeInv() { changeInv() {
this.orderFormData.action = null; this.orderFormData.action = null;
if(this.documentShow=true){
this.documentShow=false
}
this.getBusTypeByInv(); this.getBusTypeByInv();
}, },
@ -391,8 +481,11 @@ export default {
.then((response) => { .then((response) => {
this.busTypeOptions = response.data || []; this.busTypeOptions = response.data || [];
}) })
.catch(() => { .catch(() => {});
}); },
//
closeDialogtwo() {
this.selectorder = false;
}, },
initBusType() { initBusType() {
@ -403,16 +496,24 @@ export default {
.then((response) => { .then((response) => {
this.busTypeOptions = response.data || []; this.busTypeOptions = response.data || [];
this.curAction = this.getActionItem(this.orderFormData.action); this.curAction = this.getActionItem(this.orderFormData.action);
if ((this.curAction.checkEnable && (this.curAction.checkWebNew || this.curAction.checkUdims || this.curAction.checkCopy if (
|| this.curAction.checkPdaEd || this.curAction.checkPdaUn || this.curAction.checkPc || this.curAction.checkWebNew || this.curAction.checkSp || this.curAction.checkChange || this.curAction.checkBalance)) || this.viewType == 1) { (this.curAction.checkEnable &&
(this.curAction.checkWebNew ||
this.curAction.checkUdims ||
this.curAction.checkCopy ||
this.curAction.checkPdaEd ||
this.curAction.checkPdaUn ||
this.curAction.checkPc ||
this.curAction.checkWebNew ||
this.curAction.checkSp ||
this.curAction.checkChange ||
this.curAction.checkBalance)) ||
this.viewType == 1
) {
this.bizShow = true; this.bizShow = true;
} else } else this.bizShow = false;
this.bizShow = false;
}) })
.catch(() => { .catch(() => {});
});
}, },
// //
@ -423,12 +524,13 @@ export default {
corpType: null, corpType: null,
outType: null, outType: null,
page: 1, page: 1,
limit: 20 limit: 20,
}; };
if (this.curAction.corpType == 3) {// if (this.curAction.corpType == 3) {
//
cQuery.corpType = 3; cQuery.corpType = 3;
} else if (this.curAction.corpType == 2)// } else if (this.curAction.corpType == 2) {
{ //
cQuery.corpType = 2; cQuery.corpType = 2;
} else if (this.curAction.corpType == 0) { } else if (this.curAction.corpType == 0) {
cQuery.corpType = 2; cQuery.corpType = 2;
@ -446,21 +548,34 @@ export default {
// //
actionChange(item) { actionChange(item) {
this.curAction = this.getActionItem(item); this.curAction = this.getActionItem(item);
if ((this.curAction.checkEnable && this.curAction.checkWebNew) || this.viewType == 1) { if (
(this.curAction.checkEnable && this.curAction.checkWebNew) ||
this.viewType == 1
) {
// 1 // 1
this.bizShow = true; this.bizShow = true;
} else } else this.bizShow = false;
this.bizShow = false; if (
if (this.curAction.corpType == 0 || this.curAction.corpType == 2 || (this.curAction.corpType == 1 && !this.curAction.genUnit)) { this.curAction.corpType == 0 ||
this.curAction.corpType == 2 ||
(this.curAction.corpType == 1 && !this.curAction.genUnit)
) {
//1. //1.
this.orderFormData.fromCorp = null; this.orderFormData.fromCorp = null;
this.findMethod(); this.findMethod();
} else if (this.curAction.corpType == 3) { } else if (this.curAction.corpType == 3) {
//2. //2.
this.orderFormData.fromInvCode = null; this.orderFormData.fromInvCode = null;
this.findFromInvList(); this.findFromInvList();
} }
if(this.curAction.scanPreIn = true && this.curAction.backPreinType == 1){
this.documentShow=true
}
else{
this.documentShow=false
}
this.giveselectbox();
}, },
// //
@ -475,8 +590,7 @@ export default {
this.orderFormData.fromInvCode = this.fromInvOptions[0].code; this.orderFormData.fromInvCode = this.fromInvOptions[0].code;
} }
}) })
.catch(() => { .catch(() => {});
});
}, },
// //
@ -507,12 +621,16 @@ export default {
} }
if (this.$isBlank(this.orderFormData.corpOrderId)) { if (this.$isBlank(this.orderFormData.corpOrderId)) {
let date = new Date(); let date = new Date();
this.orderFormData.corpOrderId = parseTime(date, '{y}{m}{d}{h}{i}{s}') + Math.ceil(Math.random() * 89 + 10); this.orderFormData.corpOrderId =
parseTime(date, "{y}{m}{d}{h}{i}{s}") +
Math.ceil(Math.random() * 89 + 10);
} }
this.codeFormData.code = this.codeFormData.code.trim(); this.codeFormData.code = this.codeFormData.code.trim();
if (this.$isBlank(this.codeFormData.code)) return; if (this.$isBlank(this.codeFormData.code)) return;
this.loading = true; this.loading = true;
let tQuery = Object.assign(JSON.parse(JSON.stringify(this.orderFormData))); let tQuery = Object.assign(
JSON.parse(JSON.stringify(this.orderFormData))
);
tQuery.code = this.codeFormData.code; tQuery.code = this.codeFormData.code;
tQuery.orderType = this.viewType; tQuery.orderType = this.viewType;
this.addCodeSubmit(tQuery); this.addCodeSubmit(tQuery);
@ -520,7 +638,9 @@ export default {
}, },
repeatAddCode(editData) { repeatAddCode(editData) {
let tQuery = Object.assign(JSON.parse(JSON.stringify(this.orderFormData))); let tQuery = Object.assign(
JSON.parse(JSON.stringify(this.orderFormData))
);
tQuery.code = this.codeFormData.code; tQuery.code = this.codeFormData.code;
tQuery.orderType = this.viewType; tQuery.orderType = this.viewType;
@ -531,22 +651,19 @@ export default {
this.closeCodeDialog(); this.closeCodeDialog();
this.addCodeSubmit(tQuery); this.addCodeSubmit(tQuery);
}, },
// //
addCodeSubmit(tQuery) { addCodeSubmit(tQuery) {
addOrderWeb(tQuery).then((response) => { addOrderWeb(tQuery).then((response) => {
if (response.code === 20000) { if (response.code === 20000) {
this.orderFormData.billNo = response.data.orderId; this.orderFormData.billNo = response.data.orderId;
if (response.data.errMsg != null) { if (response.data.errMsg != null) {
this.$alert(response.data.errMsg, '提示', { this.$alert(response.data.errMsg, "提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
type: 'warning', type: "warning",
closeOnClickModal: true, closeOnClickModal: true,
callback: action => { callback: (action) => {},
}
}); });
} }
this.corpOrderIdDisabled = true; this.corpOrderIdDisabled = true;
@ -571,23 +688,23 @@ export default {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "忽略", cancelButtonText: "忽略",
type: "error", type: "error",
}).then(() => { })
.then(() => {
tQuery.ignoreExpire = true; tQuery.ignoreExpire = true;
this.addCodeSubmit(tQuery) this.addCodeSubmit(tQuery);
}).catch(() => { })
.catch(() => {});
});
} else if (response.code == 505) { } else if (response.code == 505) {
this.$confirm(response.message, "提示", { this.$confirm(response.message, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "忽略", cancelButtonText: "忽略",
type: "warning", type: "warning",
}).then(() => { })
.then(() => {
tQuery.ignoreRecentExpire = true; tQuery.ignoreRecentExpire = true;
this.addCodeSubmit(tQuery) this.addCodeSubmit(tQuery);
}).catch(() => { })
.catch(() => {});
});
} else if (response.code == 507) { } else if (response.code == 507) {
this.editOriginCodeVisible = true; this.editOriginCodeVisible = true;
this.editTitle = response.message; this.editTitle = response.message;
@ -596,19 +713,19 @@ export default {
this.codeFormData.batchNo = response.data.batchNo; this.codeFormData.batchNo = response.data.batchNo;
this.codeFormData.serialNo = response.data.serialNo; this.codeFormData.serialNo = response.data.serialNo;
this.$message({ this.$message({
type: 'error', type: "error",
message: "提交失败!" + this.editTitle, message: "提交失败!" + this.editTitle,
customClass: 'messageIndex' customClass: "messageIndex",
}); });
} else { } else {
this.$alert(response.message, '提示', { this.$alert(response.message, "提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
type: 'warning', type: "warning",
closeOnClickModal: true, closeOnClickModal: true,
callback: action => { callback: (action) => {
this.$refs.inputRef.focus(); this.$refs.inputRef.focus();
this.$refs.inputRef.select(); this.$refs.inputRef.select();
} },
}); });
} }
} }
@ -620,25 +737,25 @@ export default {
this.isCodeAlive = false; this.isCodeAlive = false;
this.isBizDetailAlive = false; this.isBizDetailAlive = false;
this.isCodeDetailAlive = false; this.isCodeDetailAlive = false;
this.$nextTick(() => { // this.$nextTick(() => {
this.isCodeAlive = true //
this.isCodeAlive = true;
this.isBizDetailAlive = true; this.isBizDetailAlive = true;
this.isCodeDetailAlive = true; this.isCodeDetailAlive = true;
}) });
}, },
refreshOrder(orderQuery) { refreshOrder(orderQuery) {
this.orderFormData = orderQuery; this.orderFormData = orderQuery;
}, },
submit() { submit() {
let tQuery = Object.assign(JSON.parse(JSON.stringify(this.orderFormData))); let tQuery = Object.assign(
JSON.parse(JSON.stringify(this.orderFormData))
);
tQuery.orderId = this.orderFormData.billNo; tQuery.orderId = this.orderFormData.billNo;
if (this.viewType == 2) { if (this.viewType == 2) {
submitCodes(tQuery) submitCodes(tQuery).then((response) => {
.then((response) => {
if (response.code === 20000) { if (response.code === 20000) {
this.$message.success("提交成功,等待处理,请刷新后查看!"); this.$message.success("提交成功,等待处理,请刷新后查看!");
this.closeDialog(); this.closeDialog();
@ -647,8 +764,7 @@ export default {
} }
}); });
} else if (this.viewType == 1) { } else if (this.viewType == 1) {
submitBiz(tQuery) submitBiz(tQuery).then((response) => {
.then((response) => {
if (response.code === 20000) { if (response.code === 20000) {
this.$message.success("提交成功"); this.$message.success("提交成功");
this.closeDialog(); this.closeDialog();
@ -657,8 +773,7 @@ export default {
} }
}); });
} else } else
submitOrderWeb(tQuery) submitOrderWeb(tQuery).then((response) => {
.then((response) => {
if (response.code === 20000) { if (response.code === 20000) {
this.$message.success("提交成功"); this.$message.success("提交成功");
this.closeDialog(); this.closeDialog();
@ -668,7 +783,9 @@ export default {
}); });
}, },
saveOrder() { saveOrder() {
let tQuery = Object.assign(JSON.parse(JSON.stringify(this.orderFormData))); let tQuery = Object.assign(
JSON.parse(JSON.stringify(this.orderFormData))
);
tQuery.billNo = this.orderFormData.billNo; tQuery.billNo = this.orderFormData.billNo;
if (this.orderFormData.billNo == null) { if (this.orderFormData.billNo == null) {
this.$message.error("请先录入单据信息!"); this.$message.error("请先录入单据信息!");
@ -684,7 +801,6 @@ export default {
}); });
}, },
// //
resetForm() { resetForm() {
if (this.$refs["dataForm"]) { if (this.$refs["dataForm"]) {
@ -699,7 +815,7 @@ export default {
let tQuery = { let tQuery = {
originCode: this.originCode, originCode: this.originCode,
code: this.codeFormData.code.trim(), code: this.codeFormData.code.trim(),
} };
enterCodeWeb(tQuery).then((response) => { enterCodeWeb(tQuery).then((response) => {
if (response.code === 20000) { if (response.code === 20000) {
this.$refs.inputRef.focus(); this.$refs.inputRef.focus();
@ -727,20 +843,19 @@ export default {
.catch(() => { .catch(() => {
this.codeFormData.code = this.originCode; this.codeFormData.code = this.originCode;
}); });
} else if (response.code == 508) { } else if (response.code == 508) {
this.originCode = ""; this.originCode = "";
this.codeFormData.code = "01" + response.data.nameCode; this.codeFormData.code = "01" + response.data.nameCode;
this.originCode = this.codeFormData.code; this.originCode = this.codeFormData.code;
} else { } else {
this.$alert(response.message, '提示', { this.$alert(response.message, "提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
type: 'warning', type: "warning",
closeOnClickModal: true, closeOnClickModal: true,
callback: action => { callback: (action) => {
this.$refs.inputRef.focus(); this.$refs.inputRef.focus();
this.$refs.inputRef.select(); this.$refs.inputRef.select();
} },
}); });
} }
} }
@ -748,7 +863,6 @@ export default {
}); });
}, },
getInputFocus(event) { getInputFocus(event) {
event.currentTarget.select(); event.currentTarget.select();
}, },
@ -773,7 +887,8 @@ export default {
id: this.curRow.id, id: this.curRow.id,
supId: row.erpId, supId: row.erpId,
}; };
updateCodeBindSup(query).then((response) => { updateCodeBindSup(query)
.then((response) => {
if (response.code == 20000) { if (response.code == 20000) {
this.$message.success("绑定成功"); this.$message.success("绑定成功");
this.orderFormData.id = this.curRow.orderId; this.orderFormData.id = this.curRow.orderId;
@ -781,14 +896,17 @@ export default {
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
}).catch(() => { })
.catch(() => {});
});
}, },
closeCodeDialog() { closeCodeDialog() {
this.editOriginCodeVisible = false; this.editOriginCodeVisible = false;
this.refreshCodesPanel(); this.refreshCodesPanel();
}, },
//
OptionalDocument() {
this.selectorder = true;
},
}, },
filters: {}, filters: {},
mounted() { mounted() {
@ -812,19 +930,17 @@ export default {
that.sictomText = that.sictomText + str; that.sictomText = that.sictomText + str;
that.codeFormData.code = that.sictomText; that.codeFormData.code = that.sictomText;
} else { } else {
that.codeFormData.code = text; that.codeFormData.code = text;
} }
}; };
inputer.focus(); inputer.focus();
}, },
created() { created() {
// //
this.codeFormData.code = ''; this.codeFormData.code = "";
// //
if (this.viewType == 2) {//2.13 if (this.viewType == 2) {
//2.13
this.viewCodeVisible = true; this.viewCodeVisible = true;
this.viewCodeDetailVisible = true; this.viewCodeDetailVisible = true;
} else if (this.viewType == 1) { } else if (this.viewType == 1) {
@ -835,7 +951,8 @@ export default {
this.viewBizVisible = true; this.viewBizVisible = true;
} }
this.orderFormData.orderType = this.viewType; this.orderFormData.orderType = this.viewType;
if (this.$isNotBlank(this.orderQuery.billNo)) { // if (this.$isNotBlank(this.orderQuery.billNo)) {
//
this.corpOrderIdDisabled = true; this.corpOrderIdDisabled = true;
this.orderFormData = this.orderQuery; this.orderFormData = this.orderQuery;
this.actionEnable = true; this.actionEnable = true;
@ -845,25 +962,27 @@ export default {
this.initBusType(); this.initBusType();
this.findMethod(this.orderFormData.fromCorp); this.findMethod(this.orderFormData.fromCorp);
this.findFromInvList(); this.findFromInvList();
} else { // } else {
//
this.corpOrderIdDisabled = false; this.corpOrderIdDisabled = false;
let date = new Date(); let date = new Date();
this.orderFormData.createTime = parseTime(date, '{y}-{m}-{d} {h}:{i}:{s}'); this.orderFormData.createTime = parseTime(
this.orderFormData.corpOrderId = parseTime(date, '{y}{m}{d}{h}{i}{s}') + Math.ceil(Math.random() * 89 + 10); date,
"{y}-{m}-{d} {h}:{i}:{s}"
);
this.orderFormData.corpOrderId =
parseTime(date, "{y}{m}{d}{h}{i}{s}") +
Math.ceil(Math.random() * 89 + 10);
this.orderFormData.deptCode = this.$store.getters.deptCode; this.orderFormData.deptCode = this.$store.getters.deptCode;
this.orderFormData.invCode = this.$store.getters.locInvCode; this.orderFormData.invCode = this.$store.getters.locInvCode;
this.findInvListByUser(); this.findInvListByUser();
} }
} },
, };
}
;
</script> </script>
<style> <style>
#inputer { #inputer {
width: 100%; width: 100%;
min-height: 30px; min-height: 30px;
@ -872,18 +991,16 @@ export default {
border-style: solid; border-style: solid;
border-width: 0.1px; border-width: 0.1px;
color: #4a4a4a; color: #4a4a4a;
} }
#inputer:focus { #inputer:focus {
width: 100%; width: 100%;
min-height: 30px; min-height: 30px;
background-color: white; background-color: white;
border: #0080FF; border: #0080ff;
border-style: solid; border-style: solid;
border-width: 0.1px; border-width: 0.1px;
color: #4a4a4a; color: #4a4a4a;
} }
.ime-disabled { .ime-disabled {

@ -0,0 +1,729 @@
<template>
<div>
<el-card class="el-card">
<el-form
:model="filterQuery"
class="query-form"
size="mini"
label-width="100px"
v-show="showSearch"
>
<el-row>
<el-col :span="6">
<el-form-item class="query-form-item" label="单号:">
<el-input
v-model="filterQuery.billNo"
placeholder="请输入单号"
style="width: 90%"
clearable="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item class="query-form-item" label="出入库类型:">
<el-select
v-model="filterQuery.mainAction"
placeholder="请选择出入库类型"
style="width: 90%"
>
<el-option label="全部" value=""></el-option>
<el-option label="入库" value="WareHouseIn"></el-option>
<el-option label="出库" value="WareHouseOut"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item class="query-form-item" label="单据类型:">
<el-select
v-model="filterQuery.action"
placeholder="请选择单据类型"
style="width: 90%"
clearable
>
<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-col :span="6">
<el-form-item class="query-form-item" label="所属仓库:">
<el-select
v-model="filterQuery.invCode"
placeholder="请选择所属仓库"
clearable="true"
style="width: 90%"
@change="invChange"
>
<el-option
v-for="item in invList"
: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-row>
<el-row>
<el-col :span="6">
<el-form-item class="query-form-item" label="创建时间:">
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 90%"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group>
<el-button icon="el-icon-view" type="primary" @click="hideSearch"
>显示/隐藏搜索栏</el-button
>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"
>重置
</el-button>
<el-button type="primary" icon="el-icon-search" @click="onSubmit"
>查询
</el-button>
<el-button
type="primary"
size="mini"
icon="el-icon-bottom-right"
@click="combine"
:loading="combineLoading"
@close="closeLocalDialog"
>选入</el-button
>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table
ref="multipleTable"
@select="select"
v-loading="loading"
:data="list"
style="width: 100%"
highlight-current-row
border
@row-click="handleSelectionChange"
>
<!-- <el-table-column type="selection" width="55"></el-table-column> -->
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="扫码单据类型"
prop="billTypeName"
></el-table-column>
<el-table-column
label="订单号"
prop="billNo"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="来源订单号"
prop="corpOrderId"
show-overflow-tooltip
></el-table-column>
<el-table-column label="来源" prop="fromType">
<template slot-scope="scope">
<span>{{ fromTypeMap[scope.row.fromType] }}</span>
</template>
</el-table-column>
<el-table-column label="往来单位" prop="fromName" width="220">
</el-table-column>
<el-table-column label="当前部门" prop="deptName" width="120">
</el-table-column>
<el-table-column label="当前仓库" prop="invName" width="120">
</el-table-column>
<el-table-column
label="所属科室"
prop="deptName"
width="120"
v-if="enableDept"
>
</el-table-column>
<el-table-column
label="创建时间"
prop="createTime"
show-overflow-tooltip
>
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="校验状态" prop="status" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag :type="(scope.row.status ===-1 ) | statusFilterType">{{-->
<!-- checkStatus[scope.row.status]-->
<!-- }}-->
<!-- </el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" width="150" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="printOrder(scope.row)"
>打印
</el-button>
<el-button
type="text"
size="small"
@click.native.stop="rollback(scope.row)"
>撤回
</el-button>
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="getList"
></pagination>
</el-card>
</div>
</template>
<script>
import {
deleteInvByBillNo,
getOrderFilter,
rollbackOrder,
} from "../../api/inout/order";
import { getLocalJoinByUser } from "@/api/basic/busType";
import { getInvListByUser } from "@/api/system/invWarehouse";
import { isBlank } from "@/utils/strUtil";
import { selectSysParamByKey } from "@/api/param/systemParamConfig";
import { getResultDetailList } from "@/api/inout/orderDetailResult";
import { getCodeDetailList } from "@/api/inout/orderDetailCode";
import { getCodeList } from "@/api/inout/code";
import {
inspectionOrderPDFFromTemplateFile,
orderPDFFromTemplateFile,
} from "@/api/itextpdf/orderPrint";
const formJson = {
site_id: "",
site_name: "",
describe: "",
ads: [],
};
export default {
name: "IoAuditedOrder",
props: {
closeDialogtwo: {
type: Function,
required: true,
},
},
data() {
return {
showSearch: true,
filterQuery: {
id: "",
billNo: null,
statusType: "audited",
mainAction: null,
action: null,
page: 1,
limit: 10,
startTime: null,
endTime: null,
invCode: this.$store.getters.locInvCode,
},
checkStatus: {
1: "草稿",
2: "等待处理",
3: "等待校验",
4: "处理异常",
5: "校验成功",
6: "校验异常",
7: "已审核",
8: "审核拒绝",
},
invList: [],
list: [],
total: 0,
loading: false,
index: null,
enableDept: false,
fromTypeMap: {
1: "UDIMS平台",
2: "网页新增",
3: "pda即时校验",
4: "pda未校验",
5: "pc端扫码精灵",
6: "流转自动补单",
7: "UDI供应商平台",
8: "平衡补录单据",
10: "手动补单",
11: "仓库盘点",
12: "采购计划",
13: "领用单据",
14: "第三方系统单据",
},
deleteData: {
id: "",
status: 10,
},
dialogTableVisible: false,
formLoading: false,
dialogVisible: false,
formData: formJson,
deleteLoading: false,
busTypes: [],
currentRow: {},
actDateRange: [],
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
bizQuery: {
productName: null,
orderIdFk: null,
page: 1,
limit: 10,
},
bizTotal: 0,
bizDetailLoading: false,
bizDetailList: [],
codeQuery: {
orderIdFk: null,
page: 1,
limit: 10,
},
codeTotal: 0,
codeDetailLoading: false,
codeDetailList: [],
resultQuery: {
orderId: null,
code: null,
page: 1,
limit: 10,
},
resultTotal: 0,
resultDetailLoading: false,
resultDetailList: [],
selectboxs: [],
selectbox: "",
};
},
components: {},
methods: {
//
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
id: "",
billNo: null,
statusType: "audited",
mainAction: null,
action: null,
page: 1,
limit: 10,
startTime: null,
endTime: null,
invCode: this.$store.getters.locInvCode,
};
this.getList();
},
//
onSubmit() {
this.loading = true;
if (this.actDateRange !== null) {
this.filterQuery.startTime = this.actDateRange[0];
this.filterQuery.endTime = this.actDateRange[1];
} else {
this.filterQuery.startTime = null;
this.filterQuery.endTime = null;
}
this.filterQuery.page = 1;
this.getList();
},
//
combine() {
this.closeDialogtwo();
this.$emit("giveselectbox", this.currentRow.billNo);
},
// //
// select(selection,row){
// // console.log(row);
// this.selectboxs.push(row)
// let nerArr = JSON.parse(JSON.stringify(this.selectboxs))
// let qwe = nerArr.map(item=>{
// //
// return item.billNo
// })
// this.selectbox=qwe
// },
//
closeLocalDialog() {},
hideSearch() {
this.showSearch = !this.showSearch;
},
getBusType() {
let query = {
code: this.filterQuery.invCode,
enabled: true,
};
getLocalJoinByUser(query)
.then((response) => {
this.busTypes = response.data.list || [];
})
.catch(() => {});
},
handleSelectionChange(val) {
this.currentRow = val;
console.log(this.currentRow.billNo);
this.getOrderDetails();
},
//
getOrderDetails() {
this.bizQuery.page = 1;
this.codeQuery.page = 1;
this.resultQuery.page = 1;
this.getBizDetailList();
this.getCodeDetailList();
this.getResultDetailList();
},
//
getList() {
this.loading = true;
this.currentRow = { billNo: "" };
getOrderFilter(this.filterQuery)
.then((response) => {
this.loading = false;
if (response.code === 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
})
.catch((error) => {
this.$message.error(error.message);
this.loading = false;
this.list = [];
this.total = 0;
});
},
deleteOrders(data) {
this.loading = true;
this.deleteData.billNo = data.billNo;
deleteInvByBillNo(this.deleteData)
.then((response) => {
if (response.code == 20000) {
this.getList();
this.$message({
type: "success",
message: "删除成功!",
});
} else if (response.code == 520) {
this.$message.error("新增扫码单据列表已不存在该扫码单据!");
this.getList();
}
})
.catch(() => {});
},
deleteDialog(row) {
this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteOrders(row);
})
.catch(() => {});
},
invChange() {
this.filterQuery.action = null;
this.getBusType();
},
getInvList() {
getInvListByUser()
.then((response) => {
this.invList = response.data || [];
})
.catch(() => {});
},
checkOrder(orderId) {},
onBizReset() {
this.bizQuery = {
productName: null,
orderIdFk: null,
page: 1,
limit: 10,
};
this.getBizDetailList();
},
onBizSubmit() {
this.bizQuery.page = 1;
this.getBizDetailList();
},
getBizDetailList() {
if (isBlank(this.currentRow.billNo)) {
this.$message.error("请先选择需要查询的单据!");
return;
}
this.bizDetailLoading = true;
this.bizQuery.orderIdFk = this.currentRow.billNo;
getResultDetailList(this.bizQuery)
.then((res) => {
this.bizDetailLoading = false;
if (res.code === 20000) {
this.bizDetailList = res.data.list || [];
this.bizTotal = res.data.total || 0;
} else {
this.$message.error(res.message);
this.bizDetailList = [];
this.bizTotal = 0;
}
})
.catch((error) => {
this.bizDetailLoading = false;
this.$message.error(error.message);
this.bizDetailList = [];
this.bizTotal = 0;
});
},
editBizDialog(row) {},
onCodeReset() {
this.codeQuery = {
orderIdFk: null,
page: 1,
limit: 10,
};
this.getCodeDetailList();
},
onCodeSubmit() {
this.codeQuery.page = 1;
this.getCodeDetailList();
},
getCodeDetailList() {
if (isBlank(this.currentRow.billNo)) {
this.$message.error("请先选择需要查询的单据!");
return;
}
this.codeQuery.orderIdFk = this.currentRow.billNo;
this.codeDetailLoading = true;
getCodeDetailList(this.codeQuery)
.then((res) => {
this.codeDetailLoading = false;
if (res.code === 20000) {
this.codeDetailList = res.data.list || [];
this.codeTotal = res.data.total || 0;
} else {
this.$message.error(res.message);
this.codeDetailList = [];
this.codeTotal = 0;
}
})
.catch((error) => {
this.codeDetailLoading = true;
this.$message.error(error.message);
this.codeDetailList = [];
this.codeTotal = 0;
});
},
editCodeDialog(row) {},
printOrder(row) {
let tQuery = {
action: row.action,
moduleId: 1,
};
this.loading = true;
inspectionOrderPDFFromTemplateFile(tQuery)
.then((response) => {
if (response.code === 20000) {
tQuery = {
templateId: response.data,
orderIdFk: row.billNo,
action: row.action,
moduleId: 1,
};
orderPDFFromTemplateFile(tQuery)
.then((response) => {
//pdfurl
const binaryData = [];
binaryData.push(response);
//blob
let url = window.URL.createObjectURL(
new Blob(binaryData, { type: "application/pdf" })
);
this.loading = false;
window.open(url); //pdf
})
.catch(() => {
this.loading = false;
});
} else {
this.loading = false;
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
});
},
onResultReset() {
this.resultQuery = {
orderId: null,
code: null,
page: 1,
limit: 10,
};
this.getResultDetailList();
},
onResultSubmit() {
this.resultQuery.page = 1;
this.getResultDetailList();
},
getResultDetailList() {
if (isBlank(this.currentRow.billNo)) {
this.$message.error("请先选择需要查询的单据!");
return;
}
this.resultQuery.orderId = this.currentRow.billNo;
this.resultDetailLoading = true;
getCodeList(this.resultQuery)
.then((res) => {
this.resultDetailLoading = false;
if (res.code === 20000) {
this.resultDetailList = res.data.list || [];
this.resultTotal = res.data.total || 0;
} else {
this.$message.error(res.message);
this.resultDetailList = [];
this.resultTotal = 0;
}
})
.catch((error) => {
this.resultDetailLoading = false;
this.$message.error(error.message);
this.resultDetailList = [];
this.resultTotal = 0;
});
},
//
rollback(row) {
this.$confirm(
"此操作将撤回单据至已校验未审核状态并删除对应库存信息, 是否继续?",
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(() => {
let param = { billNo: row.billNo };
rollbackOrder(param).then((res) => {
if (res.code === 20000) {
this.$message.success("撤回成功");
this.getList();
} else {
this.$message.error(res.message);
}
});
})
.catch(() => {
// this.$message.info('退');
});
},
},
filters: {
statusFilterType(status) {
const statusMap = {
false: "success",
true: "warning",
};
return statusMap[status];
},
},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
},
created() {
this.getInvList();
this.getBusType();
selectSysParamByKey({ paramKey: "muti_inv_mode" }).then((res) => {
if (res.code === 20000) {
if (res.data.paramValue === "0") {
this.enableDept = true;
}
}
});
this.getList();
},
};
</script>
<style type="text/scss" lang="scss">
</style>

@ -1,15 +1,15 @@
"use strict"; 'use strict'
const path = require("path"); const path = require('path')
function resolve(dir) { function resolve(dir) {
return path.join(__dirname, dir); return path.join(__dirname, dir)
} }
const CompressionPlugin = require("compression-webpack-plugin"); const CompressionPlugin = require('compression-webpack-plugin')
const name = process.env.VUE_APP_TITLE || "UDI管理系统"; // 网页标题 const name = process.env.VUE_APP_TITLE || 'UDI管理系统' // 网页标题
const port = process.env.port || process.env.npm_config_port || 80; // 端口 const port = process.env.port || process.env.npm_config_port || 80 // 端口
// vue.config.js 配置说明 // vue.config.js 配置说明
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions //官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
@ -20,16 +20,16 @@ module.exports = {
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
publicPath: process.env.VUE_APP_CONTEXT_PATH, publicPath: process.env.VUE_APP_CONTEXT_PATH,
// 在npm run build 或 yarn build 时 生成文件的目录名称要和baseUrl的生产环境路径一致默认dist // 在npm run build 或 yarn build 时 生成文件的目录名称要和baseUrl的生产环境路径一致默认dist
outputDir: "UDI_WMS_NEW", outputDir: 'UDI_WMS_NEW',
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下) // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
assetsDir: "static", assetsDir: 'static',
// 是否开启eslint保存检测有效值ture | false | 'error' // 是否开启eslint保存检测有效值ture | false | 'error'
lintOnSave: process.env.NODE_ENV === "development", lintOnSave: process.env.NODE_ENV === 'development',
// 如果你不需要生产环境的 source map可以将其设置为 false 以加速生产环境构建。 // 如果你不需要生产环境的 source map可以将其设置为 false 以加速生产环境构建。
productionSourceMap: false, productionSourceMap: false,
// webpack-dev-server 相关配置 // webpack-dev-server 相关配置
devServer: { devServer: {
host: "0.0.0.0", host: '0.0.0.0',
port: port, port: port,
open: false, open: false,
proxy: { proxy: {
@ -38,94 +38,99 @@ module.exports = {
target: `http://192.168.0.166:9991/`, target: `http://192.168.0.166:9991/`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "", ['^' + process.env.VUE_APP_BASE_API]: ''
}, }
}, }
}, },
disableHostCheck: true, disableHostCheck: true
}, },
css: { css: {
loaderOptions: { loaderOptions: {
sass: { sass: {
sassOptions: { outputStyle: "expanded" }, sassOptions: { outputStyle: "expanded" }
}, }
}, }
}, },
configureWebpack: { configureWebpack: {
name: name, name: name,
resolve: { resolve: {
alias: { alias: {
"@": resolve("src"), '@': resolve('src')
}, }
}, },
plugins: [ plugins: [
// http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件 // http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件
new CompressionPlugin({ new CompressionPlugin({
cache: false, // 不启用文件缓存 cache: false, // 不启用文件缓存
test: /\.(js|css|html)?$/i, // 压缩文件格式 test: /\.(js|css|html)?$/i, // 压缩文件格式
filename: "[path].gz[query]", // 压缩后的文件名 filename: '[path].gz[query]', // 压缩后的文件名
algorithm: "gzip", // 使用gzip压缩 algorithm: 'gzip', // 使用gzip压缩
minRatio: 0.8, // 压缩率小于1才会压缩 minRatio: 0.8 // 压缩率小于1才会压缩
}), })
], ],
}, },
chainWebpack(config) { chainWebpack(config) {
config.plugins.delete("preload"); // TODO: need test config.plugins.delete('preload') // TODO: need test
config.plugins.delete("prefetch"); // TODO: need test config.plugins.delete('prefetch') // TODO: need test
// set svg-sprite-loader // set svg-sprite-loader
config.module.rule("svg").exclude.add(resolve("src/assets/icons")).end();
config.module config.module
.rule("icons") .rule('svg')
.exclude.add(resolve('src/assets/icons'))
.end()
config.module
.rule('icons')
.test(/\.svg$/) .test(/\.svg$/)
.include.add(resolve("src/assets/icons")) .include.add(resolve('src/assets/icons'))
.end() .end()
.use("svg-sprite-loader") .use('svg-sprite-loader')
.loader("svg-sprite-loader") .loader('svg-sprite-loader')
.options({ .options({
symbolId: "icon-[name]", symbolId: 'icon-[name]'
}) })
.end(); .end()
config.when(process.env.NODE_ENV !== "development", (config) => {
config config
.plugin("ScriptExtHtmlWebpackPlugin") .when(process.env.NODE_ENV !== 'development',
.after("html") config => {
.use("script-ext-html-webpack-plugin", [ config
{ .plugin('ScriptExtHtmlWebpackPlugin')
.after('html')
.use('script-ext-html-webpack-plugin', [{
// `runtime` must same as runtimeChunk name. default is `runtime` // `runtime` must same as runtimeChunk name. default is `runtime`
inline: /runtime\..*\.js$/, inline: /runtime\..*\.js$/
}, }])
]) .end()
.end(); config
config.optimization.splitChunks({ .optimization.splitChunks({
chunks: "all", chunks: 'all',
cacheGroups: { cacheGroups: {
libs: { libs: {
name: "chunk-libs", name: 'chunk-libs',
test: /[\\/]node_modules[\\/]/, test: /[\\/]node_modules[\\/]/,
priority: 10, priority: 10,
chunks: "initial", // only package third parties that are initially dependent chunks: 'initial' // only package third parties that are initially dependent
}, },
elementUI: { elementUI: {
name: "chunk-elementUI", // split elementUI into a single package name: 'chunk-elementUI', // split elementUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
}, },
commons: { commons: {
name: "chunk-commons", name: 'chunk-commons',
test: resolve("src/components"), // can customize your rules test: resolve('src/components'), // can customize your rules
minChunks: 3, // minimum common number minChunks: 3, // minimum common number
priority: 5, priority: 5,
reuseExistingChunk: true, reuseExistingChunk: true
}, }
}, }
}); })
config.optimization.runtimeChunk("single"), config.optimization.runtimeChunk('single'),
{ {
from: path.resolve(__dirname, "./public/robots.txt"), //防爬虫文件 from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
to: "./", //到根目录下 to: './' //到根目录下
}; }
}); }
}, )
}; }
}

Loading…
Cancel
Save