选择库存产品,

dev_ksck2.0
anthonywj 1 year ago
parent 5a9cda84a3
commit 1056d3e1c6

@ -16,9 +16,9 @@ ENV = 'production'
# VUE_APP_BASE_API = 'http://192.168.0.127:9170/UDI_WMS_MC/'
# 吴雨泽
# VUE_APP_BASE_API = 'http://192.168.0.67:9150/UDI_WMS_MC/'
# VUE_APP_BASE_API = 'http://192.168.0.127:9170/UDI_WMS_MC/'
VUE_APP_BASE_API = 'http://192.168.0.127:9170/UDI_WMS_MC/'
# VUE_APP_BASE_API = 'http://dm.xmglxp.com:8082/UDI_WMS_MC/'
VUE_APP_BASE_API = 'http://dm.xmglxp.com:82/UDI_WMS_MC/'
# VUE_APP_BASE_API = 'http://dm.xmglxp.com:82/UDI_WMS_MC/'
# VUE_APP_BASE_API = 'http://dm.xmglxp.com:8001/UDI_WMS_MC/'
# 诏安总医院

@ -370,7 +370,7 @@
</el-col>
<el-divider direction="vertical"></el-divider>
<el-col span="13">
<span class="sptext">采购类型</span>
<span class="sptext">产品属性</span>
</el-col>
</el-row>
<el-divider></el-divider>

@ -434,13 +434,20 @@
></el-input>
</el-form-item>
</el-col>
<el-col :span="2">
<el-col :span="4">
<el-button
type="primary"
size="mini"
@click.native.stop="addCode()"
style="margin-left: 15px"
>添加
>扫码添加
</el-button>
<el-button
type="primary"
size="mini"
v-if="curAction.useDyCount == 2"
@click.native.stop="addInvProduct()"
>库存选入
</el-button>
</el-col>
</el-row>
@ -449,7 +456,6 @@
<el-tabs type="border-card" style="margin: 5px">
<el-tab-pane label="校验详情" v-if="viewCheckVisible || viewType == 7">
<checkResultPanel
:idQuery="orderFormData"
@ -600,7 +606,24 @@
</span>
</el-dialog>
<el-dialog
title="库存物资录入"
:visible.sync="selectInvProductVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="selectInvProductVisible"
:append-to-body='true'
>
<dialogInvProduct
:closeDialog="closeDialogC2"
:invQueryData="invQueryData"
:type="3"
></dialogInvProduct>
</el-dialog>
</div>
</template>
<script>
@ -635,6 +658,7 @@ import {isBlank} from "@/utils/strUtil";
import {getDetailBizs} from "@/api/inout/orderDetailCode";
import {filterNoPage, page, remoteFilter} from "@/api/basic/sicker/skPersonApi";
import {selectSysParamByKey} from "@/api/param/systemParamConfig";
import dialogInvProduct from "@/views/inout/DialogSelectInvProduct";
export default {
name: "ioCreateOrder",
@ -740,9 +764,9 @@ export default {
action: [
{required: true, message: "请选择单据类型", trigger: "change"},
],
acceptance: [
{required: true, message: "请选入预验收单据", trigger: "blur"},
],
// acceptance: [
// {required: true, message: "", trigger: "blur"},
// ],
},
isScan: true,
scanText: "扫码录入:",
@ -782,8 +806,14 @@ export default {
spaceCodeList: [],
checkTipDialogVisible: false,
checkTip: null,
enableSick: false,
enableSick: false
//
selectInvProductVisible: false,
invQueryData: {
invCode: null,
},
};
},
components: {
@ -793,7 +823,7 @@ export default {
bizDetailPanel,
editCodeDialog,
DialogCreateOrderSelect,
DialogSelectUnit, DialogSelectSpace, selectRlDialog, diSkPrescribePanel
DialogSelectUnit, DialogSelectSpace, selectRlDialog, diSkPrescribePanel, dialogInvProduct
},
methods: {
@ -853,6 +883,10 @@ export default {
findByInvUser(query)
.then((response) => {
this.busTypeOptions = response.data || [];
if (this.busTypeOptions.length == 1) {
this.orderFormData.action = this.busTypeOptions[0].action;
this.actionChange(this.orderFormData.action)
}
})
.catch(() => {
});
@ -870,6 +904,7 @@ export default {
.then((response) => {
this.busTypeOptions = response.data.list || [];
this.curAction = this.getActionItem(this.orderFormData.action);
if (isBlank(this.curAction)) {
this.curAction = {
corpType: 0,
@ -1142,6 +1177,22 @@ export default {
})
},
addInvProduct() {
this.invQueryData.invCode = this.orderFormData.invCode;
this.selectInvProductVisible = true;
},
closeDialogC2(rData) {
this.selectInvProductVisible = false;
if (this.$isNotBlank(rData)) {
this.codeFormData.code = rData;
this.addCode();
// this.codeFormData.code = null;
}
// this.refreshCodesPanel()
},
//
addCode(event) {

@ -5,9 +5,9 @@
<el-col :span="20">
<el-form-item label="UDI码:" prop="code">
<el-input
v-model="editData.code"
clearable
disabled
v-model="editData.code"
clearable
disabled
></el-input>
</el-form-item>
</el-col>
@ -125,7 +125,7 @@ export default {
return
}
});
}else{
} else {
this.repeatAddCode(this.editData);
}
@ -142,17 +142,17 @@ export default {
} 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;
});
.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;
});
}
}
@ -164,18 +164,24 @@ export default {
findByCode() {
let query = {udiCode: this.editData.code};
findByCode(query)
.then((response) => {
if (response.code === 20000) {
if (response.data.scbssfbhxlh == "否") {
this.xlhEnable = true;
}
if (response.data.zxxsbzbhsydysl > 1) {
this.isUseDyCheck = true;
}
} else {
.then((response) => {
if (response.code === 20000) {
if (response.data.scbssfbhxlh == "否") {
this.xlhEnable = true;
}
this.loading = false;
});
if (response.data.zxxsbzbhsydysl > 1) {
this.isUseDyCheck = true;
}
let allowNoSerial = response.data.allowNoSerial ?? true;
if (isBlank(this.editData.serialNo) && !allowNoSerial) {
this.isSerialNo = true
}
} else {
}
this.loading = false;
});
}
}
@ -194,9 +200,7 @@ export default {
if (isBlank(this.editData.batchNo)) {
this.isBatchNo = true
}
if (isBlank(this.editData.serialNo)) {
this.isSerialNo = true
}
}
}
</script>

@ -66,8 +66,14 @@
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row="false" border
@current-change="handleChange"
ref="multipleTable">
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column label width="45" v-if="type=3">
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column type="selection" width="55" v-if="type!=3"></el-table-column>
<el-table-column label="序号" type="index" width="55"></el-table-column>
<el-table-column label="DI/物资编码" prop="nameCode" width="120" show-overflow-tooltip></el-table-column>
<el-table-column label="物资名称" prop="cpmctymc" width="160" show-overflow-tooltip></el-table-column>
@ -162,6 +168,9 @@ export default {
showSup: false,
fromOptions: [],
productRemarkSet: {},
currentRow: null,
radioCheck: null,
};
},
components: {},
@ -252,80 +261,95 @@ export default {
this.showSearch = !this.showSearch;
},
combine() {
let selection = this.$refs.multipleTable.selection;
if (selection.length < 1) {
this.$message.error('未选择产品');
return;
}
var idster = [];
if (this.codeArray != null || this.codeArray != undefined) {
if (this.codeArray.length > 0) {
for (var i = 0; i < this.codeArray.length; i++) {
idster.push(this.codeArray[i].relIdFk);
}
if (this.type == 3) {
let nameCode = this.currentRow.nameCode ?? '';
let productionDate = this.currentRow.productionDate ?? '';
let expireDate = this.currentRow.expireDate ?? '';
let batchNo = this.currentRow.batchNo ?? '';
let udiCode = "#" + nameCode
+ "#" + productionDate
+ "#" + expireDate +
"#" + batchNo + "#" + "#" + "#";
this.closeDialog(udiCode);
} else {
let selection = this.$refs.multipleTable.selection;
if (selection.length < 1) {
this.$message.error('未选择产品');
return;
}
if (idster.length > 0) {
for (var i = 0; i < idster.length; i++) {
for (var j = 0; j < selection.length; j++) {
if (idster[i] == selection[j].relIdFk) {
this.$message.error("该产品已录入!");
return
var idster = [];
if (this.codeArray != null || this.codeArray != undefined) {
if (this.codeArray.length > 0) {
for (var i = 0; i < this.codeArray.length; i++) {
idster.push(this.codeArray[i].relIdFk);
}
}
if (idster.length > 0) {
for (var i = 0; i < idster.length; i++) {
for (var j = 0; j < selection.length; j++) {
if (idster[i] == selection[j].relIdFk) {
this.$message.error("该产品已录入!");
return
}
}
}
}
}
}
var ids = [];
selection.forEach((obj, index) => {
let data = {
relId: obj.relIdFk,
batchNo: obj.batchNo,
productDate: obj.productionDate,
expireDate: obj.expireDate,
supId: obj.supId,
price: obj.price,
nameCode: obj.nameCode,
}
ids.push(data);
});
var ids = [];
selection.forEach((obj, index) => {
let data = {
relId: obj.relIdFk,
batchNo: obj.batchNo,
productDate: obj.productionDate,
expireDate: obj.expireDate,
supId: obj.supId,
price: obj.price,
nameCode: obj.nameCode,
}
ids.push(data);
});
if (this.type == 2) { //
let data = {
datas: ids,
orderEntity: this.orderQuery,
}
this.loading = true;
addBizProduct(data)
.then((response) => {
if (this.type == 2) { //
let data = {
datas: ids,
orderEntity: this.orderQuery,
}
this.loading = true;
addBizProduct(data)
.then((response) => {
this.loading = false;
if (response.code === 20000) {
this.closeDialog(response.data);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
});
} else {
this.loading = true;
let tQuery = {
datas: ids,
purReceiveEntity: this.invQueryData,
};
addDetail(tQuery).then((response) => {
this.loading = false;
if (response.code === 20000) {
this.closeDialog(response.data);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
}).catch(() => {
this.loading = false;
});
} else {
this.loading = true;
let tQuery = {
datas: ids,
purReceiveEntity: this.invQueryData,
};
addDetail(tQuery).then((response) => {
this.loading = false;
if (response.code === 20000) {
this.closeDialog(response.data);
} else {
this.$message.error(response.message);
}
}).catch(() => {
this.loading = false;
});
}
}
},
findBasicProductSet() {
@ -335,6 +359,11 @@ export default {
}
});
},
handleChange(val) {
this.currentRow = val;
this.radioCheck = val.id
},
},
filters: {
statusFilterType(status) {
@ -343,21 +372,26 @@ export default {
true: "danger",
};
return statusMap[status];
},
},
}
,
}
,
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
},
}
,
created() {
this.findBasicProductSet();
this.filterQuery.invCode = this.invQueryData.targetInvCode;
//
this.getList();
},
};
}
,
}
;
</script>
<style type="text/scss" lang="scss">

Loading…
Cancel
Save