Merge branch '20240912_adapter' of http://116.204.71.86:3000/UDI/udiwms-vue-frame into 20240912_adapter

20240912_adapter
qiuyt 5 months ago
commit f20797caaf

@ -0,0 +1,378 @@
<template>
<div>
<el-card>
<el-form v-if="queryList && queryList.length > 0" :model="filterQuery" label-width="100px" >
<el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList">
<div v-if="showSearch || item.isImport">
<el-form-item
v-if="item.columnType == 'input' && item.columnName !='queryName' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
@keyup.enter.native="executeFuc($event,'5',item.clickFuc)"
clearable
></el-input>
</el-form-item>
<el-form-item
v-if="item.columnType == 'input' && item.columnName =='queryName' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`" :key="item.id">
<el-autocomplete
class="inline-input"
style="width: 90%"
v-model="queryName"
:fetch-suggestions="queryProductName"
placeholder="请输入内容"
clearable
@select="handleSelect"
@clear="clearQueryProduct"
></el-autocomplete>
</el-form-item>
<el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`">
<el-select v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
@change="executeFuc($event,'5',item.checkRules)"
:disabled="executeEval(null,item.disabledFuc,false)"
clearable>
<el-option
v-for="dict in item.lableRuleObj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{
item.code
}}</span>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`">
<el-select
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
filterable
remote
@change="executeFuc($event,'5',item.checkRules)"
:remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
clearable>
<el-option
v-for="item in options[item.clickFuc]"
:key="item.code"
:label="item.label"
:value="item.code"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{
item.code
}}</span>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`">
<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="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`">
<el-date-picker
v-model="filterQuery[item.columnName]"
:style="`width:${item.width+'px'}`"
value-format="yyyy-MM-dd"
:disabled="executeEval(null,item.disabledFuc,false)"
type="date"
:placeholder="item.columnDesc"
></el-date-picker>
</el-form-item>
</div>
</template>
</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" icon="el-icon-plus" @click="chooseDrug"></el-button>-->
<el-button type="primary" icon="el-icon-plus" @click="chooseHouseDrug"></el-button>
<!-- <el-button type="primary" icon="el-icon-plus" @click="addDrug"></el-button>-->
</el-button-group>
</div>
<el-table v-loading="loading" :data="list" style="width: 100%" :row-style="{height: '32px' }"
>
<el-table-column type="index" label="序号"></el-table-column>
<el-table-column label="药品标识码" prop="nameCode" width="160"></el-table-column>
<!--<el-table-column label="收费项目编码" prop="payFeeCode" width="100"></el-table-column>-->
<el-table-column label="药品通用名称" prop="cpmctymc" width="160"></el-table-column>
<el-table-column label="制剂规格" prop="prepnSpec" width="90"></el-table-column>
<el-table-column label="制剂单位" prop="prepnUnit" width="90"></el-table-column>
<el-table-column label="包装规格" prop="bzgg" width="100"></el-table-column>
<el-table-column label="包装单位" prop="packUnit" width="90"></el-table-column>
<!--<el-table-column label="包装比例" prop="packRatio" width="90"></el-table-column>-->
<el-table-column label="价格" prop="price" width="90"></el-table-column>
<el-table-column label="批准文号" prop="zczbhhzbapzbh" width="90"></el-table-column>
<el-table-column label="生产企业" prop="manufactory" width="90"></el-table-column>
<el-table-column label="医保编码" prop="ybbm" width="90"></el-table-column>
<el-table-column label="药品状态" prop="majorStatus" width="90">
<template slot-scope="scope">
<el-tag :type="(scope.row.majorStatus) | statusFilterType">
{{ statusMap[scope.row.majorStatus] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="100">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="editDrug(scope.row)"
>编辑
</el-button>
<el-button
type="text"
size="small"
@click.native.stop="deleteDrug(scope.row)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="getList"
>
</pagination>
</el-card>
</div>
</template>
<script>
import {
getUdiInfos,
deletetUdiInfos,
} from '@/api/basic/product/udiRelevance'
import {
getHead,executeFuc
} from "@/utils/customConfig";
export default {
name: 'selectDrugDialog',
data() {
return {
//
tableHeader: [],
queryList: [],
fromList: [],
executeFuc(row, type, clickFuc, value) {
return executeFuc(this, row, type, clickFuc, value);
},
executeEval(row, expression, defaultRet) {
if (expression) {
return eval(expression);
}
return defaultRet;
},
showSearch: false,
filterBadInv: true,
query: {},
list: [],
mainIds: [],
filterQuery: {
productsType: 2,
page: 1,
limit: 20,
addType: 1,
keyWords:""
},
addDrugVisible: false,
chooseDrugVisible: false,
statusMap: {
0: "停用",
1: "在用"
},
fromName: '',
rowData: {},
//12
type: null,
fromMap: {
'add': '新增-药品信息',
'edit': '编辑-药品信息',
},
loading: false,
chooseHouseDrugVisible: false,
uuid: "111",
relId: "",
isImport: false,
pId: 0,
thisData: {
nameCode: null,
cpmctymc: null,
ggxh: null,
},
relevanceEdit: {
id: null,
thirdId: "",
isDisable: null,
isUseDy: false,
isLock: null,
isAdavence: null,
allowNoBatch: null,
allowNoExpire: null,
allowNoProduct: null,
allowNoSerial: null,
pId: null,
},
total: 0
}
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
productsType: 2,
page: 1,
limit: 20,
addType: 1,
keyWords:""
};
this.getList();
},
hideSearch() {
this.showSearch = !this.showSearch;
},
onSubmit() {
this.filterQuery.page = 1;
this.getList()
},
addDrug() {
this.fromName = 'add'
this.type = 1
this.rowData = null
this.addDrugVisible = true
},
chooseDrug() {
this.chooseDrugVisible = true
},
chooseHouseDrug(val) {
this.defaultSys = null;
this.uuid = val.uuid;
this.relId = val.id;
this.isImport = true;
this.thisData = val;
this.chooseHouseDrugVisible = true
},
getList() {
getUdiInfos(this.filterQuery)
.then((response) => {
this.loading = false
this.list = response.data.list || []
this.mainIds = this.list.map(item => item.mainId);
this.total = response.data.total || 0
})
.catch(() => {
this.loading = false
this.list = []
this.total = 0
})
},
deleteDrug(row) {
this.$confirm("此操作将永久删除该药品信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
let tquery = {
id: row.id + "",
};
deletetUdiInfos(tquery).then(res => {
if (res.code != 20000) {
this.$message.error(res.message)
this.getList()
} else {
this.$message.success("删除成功!")
this.getList()
}
}).catch(() => {
this.$message.error("删除错误")
})
})
},
editDrug(row) {
this.fromName = 'edit'
this.type = 2
this.uuid = row.uuid;
this.relId = row.id;
this.isImport = false;
this.thisData = row;
this.pId = row.id;
this.relevanceEdit = {
id: row.id,
isUseDy: row.isUseDy,
isDisable: row.isDisable,
isLock: row.isLock,
isAdavence: row.isAdavence,
};
this.editFormat = JSON.parse(JSON.stringify(row));
this.rowData = row
this.addDrugVisible = true;
},
closeUdi() {
},
closeDialog() {
this.addDrugVisible = false;
this.chooseHouseDrugVisible = false;
this.getList()
}
},
filters: {
statusFilterType(status) {
const statusMap = {
0: "info",
1: "success",
};
return statusMap[status];
}
,
},
created() {
getHead("drugMaintain-ypzdwh", "1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
});
this.getList()
}
}
</script>
<style scoped>
</style>

@ -23,7 +23,8 @@
<div v-if="showSearch || item.isImport"> <div v-if="showSearch || item.isImport">
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" <el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)"
class="query-form-item" class="query-form-item"
:label="item.columnDesc+`:`" :key="item.id"> :label="item.columnDesc+`:`" :key="item.id"
>
<el-input <el-input
v-model="codeQuery[item.columnName]" v-model="codeQuery[item.columnName]"
:placeholder="item.columnDesc" :placeholder="item.columnDesc"
@ -34,11 +35,13 @@
</el-form-item> </el-form-item>
<el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)" <el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)"
class="query-form-item" class="query-form-item"
:label="item.columnDesc+`:`"> :label="item.columnDesc+`:`"
>
<el-select v-model="codeQuery[item.columnName]" <el-select v-model="codeQuery[item.columnName]"
:placeholder="item.columnDesc" :placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)" :disabled="executeEval(null,item.disabledFuc,false)"
clearable> clearable
>
<el-option <el-option
v-for="dict in item.lableRuleObj" v-for="dict in item.lableRuleObj"
:key="dict.value" :key="dict.value"
@ -69,7 +72,8 @@
<!--</el-form-item>--> <!--</el-form-item>-->
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" <el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)"
class="query-form-item" class="query-form-item"
:label="item.columnDesc+`:`"> :label="item.columnDesc+`:`"
>
<el-date-picker <el-date-picker
:picker-options="pickerOptions" :picker-options="pickerOptions"
v-model="actDateRange" v-model="actDateRange"
@ -83,7 +87,8 @@
</el-form-item> </el-form-item>
<el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)" <el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)"
class="query-form-item" class="query-form-item"
:label="item.columnDesc+`:`"> :label="item.columnDesc+`:`"
>
<el-date-picker <el-date-picker
v-model="codeQuery[item.columnName]" v-model="codeQuery[item.columnName]"
:style="`width:${item.width+'px'}`" :style="`width:${item.width+'px'}`"
@ -102,7 +107,7 @@
<div class="top-right-btn"> <div class="top-right-btn">
<el-button-group> <el-button-group>
<el-button icon="el-icon-view" type="primary" @click="hideSearch"></el-button> <el-button icon="el-icon-view" type="primary" @click="hideSearch"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="addBind" <el-button type="primary" icon="el-icon-plus" @click="addBind()"
>维护绑定关系 >维护绑定关系
</el-button> </el-button>
<el-button <el-button
@ -127,7 +132,7 @@
<!--<el-table-column label="产品ID" prop="relId" show-overflow-tooltip width="160"></el-table-column>--> <!--<el-table-column label="产品ID" prop="relId" show-overflow-tooltip width="160"></el-table-column>-->
<el-table-column label="产品标识" prop="nameCode" show-overflow-tooltip width="160"></el-table-column> <el-table-column label="产品标识" prop="nameCode" show-overflow-tooltip width="160"></el-table-column>
<el-table-column label="产品通用名" prop="cpmctymc" show-overflow-tooltip width="160"></el-table-column> <el-table-column label="产品通用名" prop="cpmctymc" show-overflow-tooltip width="160"></el-table-column>
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip width="160"></el-table-column> <el-table-column label="规格" prop="ggxh" show-overflow-tooltip width="160"></el-table-column>
<el-table-column label="所属取货架编号" prop="freightCode" show-overflow-tooltip width="160"></el-table-column> <el-table-column label="所属取货架编号" prop="freightCode" show-overflow-tooltip width="160"></el-table-column>
<el-table-column label="所属摆货层编号" prop="layerCode" show-overflow-tooltip width="160"></el-table-column> <el-table-column label="所属摆货层编号" prop="layerCode" show-overflow-tooltip width="160"></el-table-column>
<!--<el-table-column label="格数" prop="grid" show-overflow-tooltip width="160"></el-table-column>--> <!--<el-table-column label="格数" prop="grid" show-overflow-tooltip width="160"></el-table-column>-->
@ -148,7 +153,7 @@
<el-button <el-button
type="text" type="text"
size="small" size="small"
@click.native.stop="removeRelId(scope.row)" @click.native.stop="selectBind()"
:disabled="scope.row.nameCode" :disabled="scope.row.nameCode"
>绑定产品 >绑定产品
</el-button> </el-button>
@ -166,7 +171,6 @@
</el-card> </el-card>
<el-dialog <el-dialog
title="维护绑定关系" title="维护绑定关系"
:visible.sync="addBindVisible" :visible.sync="addBindVisible"
@ -177,7 +181,8 @@
append-to-body append-to-body
> >
<el-form :model="addBindData" ref="stockCompare" class="query-form" <el-form :model="addBindData" ref="stockCompare" class="query-form"
size="mini" label-width="auto"> size="mini" label-width="auto"
>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
<el-form-item prop="code" label="出货槽位编号:" class="query-form-item"> <el-form-item prop="code" label="出货槽位编号:" class="query-form-item">
@ -198,10 +203,10 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item prop="udiCode" label="" class="query-form-item"> <el-form-item prop="udiCode" label="" class="query-form-item">
<el-descriptions class="margin-top" title="" :column="3" border style="width: 80%"> <el-descriptions class="margin-top" title="" :column="3" border style="width: 80%">
<el-descriptions-item label="出货槽编号">{{sysWorkplaceQueue.code}}</el-descriptions-item> <el-descriptions-item label="出货槽编号">{{ sysWorkplaceQueue.code }}</el-descriptions-item>
<el-descriptions-item label="货架名称">{{sysWorkplaceQueue.name}}</el-descriptions-item> <el-descriptions-item label="货架名称">{{ sysWorkplaceQueue.name }}</el-descriptions-item>
<el-descriptions-item label="备注">{{sysWorkplaceQueue.remark}}</el-descriptions-item> <el-descriptions-item label="备注">{{ sysWorkplaceQueue.remark }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -224,28 +229,50 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item prop="udiCode" label="" class="query-form-item"> <el-form-item prop="udiCode" label="" class="query-form-item">
<el-descriptions class="margin-top" title="" :column="3" border style="width: 80%"> <el-descriptions class="margin-top" title="" :column="3" border style="width: 80%">
<el-descriptions-item label="产品标识">{{product.nameCode}}</el-descriptions-item> <el-descriptions-item label="产品标识">{{ product.nameCode }}</el-descriptions-item>
<el-descriptions-item label="产品通用名">{{product.cpmctymc}}</el-descriptions-item> <el-descriptions-item label="产品通用名">{{ product.cpmctymc }}</el-descriptions-item>
<el-descriptions-item label="规格型号">{{product.ggxh}}</el-descriptions-item> <el-descriptions-item v-if="product.productsType === 2" label="包装规格">{{
product.bzgg
}}
</el-descriptions-item>
<el-descriptions-item v-else label="规格型号">{{ product.ggxh }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div class="center-button">
<div style="text-align: right; margin-bottom: 10px;margin-top: 18px ;margin-right: 18px ;"> <!--<div style="text-align: right; margin-bottom: 10px;margin-top: 18px ;margin-right: 18px ;">-->
<el-button @click="closeAddBindData"></el-button>
<el-button type="primary" @click="submitAddBindData"></el-button> <el-button type="primary" @click="submitAddBindData"></el-button>
<!--</div>-->
</div> </div>
</el-form> </el-form>
</el-dialog> </el-dialog>
<el-dialog
title="绑定产品"
:visible.sync="selectBindVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="selectBindVisible"
width="65%"
append-to-body
>
<selectDrugDialog>
</selectDrugDialog>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import {isBlank} from "@/utils/strUtil"; import { isBlank } from '@/utils/strUtil'
import { import {
getQueueListPage, getQueueListPage,
getInfoByCode, getInfoByCode,
@ -254,28 +281,21 @@ import {
removeProduct removeProduct
} from '@/api/basic/workPlace/SysWorkplaceQueue' } from '@/api/basic/workPlace/SysWorkplaceQueue'
import { executeFuc, getHead } from '@/utils/customConfig' import { executeFuc, getHead } from '@/utils/customConfig'
import selectDrugDialog from "./selectDrugDialog"
const formJson = { const formJson = {
site_id: "", site_id: '',
site_name: "", site_name: '',
describe: "", describe: '',
ads: [], ads: []
}; }
export default { export default {
name: "workplaceQueue", name: 'workplaceQueue',
components:{selectDrugDialog},
data() { data() {
return { return {
//
executeFuc(row, type, clickFuc, value) {
return executeFuc(this, row, type, clickFuc, value);
},
executeEval(row, expression, defaultRet) {
if (expression) {
return eval(expression);
}
return defaultRet;
},
tableObj: [], tableObj: [],
queryList: [], queryList: [],
tableHeader: [], tableHeader: [],
@ -289,24 +309,24 @@ export default {
index: null, index: null,
enableDept: false, enableDept: false,
fromTypeMap: { fromTypeMap: {
"1": "UDIMS平台", '1': 'UDIMS平台',
"2": "网页新增", '2': '网页新增',
"3": "pda即时校验", '3': 'pda即时校验',
"4": "pda未校验", '4': 'pda未校验',
"5": "pc端扫码精灵", '5': 'pc端扫码精灵',
"6": "流转自动补单", '6': '流转自动补单',
"7": "UDI供应商平台", '7': 'UDI供应商平台',
"8": "平衡补录单据", '8': '平衡补录单据',
"10": "手动补单", '10': '手动补单',
"11": "仓库盘点", '11': '仓库盘点',
"12": "采购计划", '12': '采购计划',
"13": "领用单据", '13': '领用单据',
"14": "第三方系统单据", '14': '第三方系统单据'
}, },
deleteData: { deleteData: {
orderId: null, orderId: null
}, },
addBindData:{ addBindData: {
id: null, id: null,
code: null, code: null,
relId: null, relId: null,
@ -317,6 +337,7 @@ export default {
dialogTableVisible: false, dialogTableVisible: false,
radio: 1, radio: 1,
addBindVisible: false, addBindVisible: false,
selectBindVisible: false,
formLoading: false, formLoading: false,
dialogVisible: false, dialogVisible: false,
formData: formJson, formData: formJson,
@ -327,33 +348,33 @@ export default {
pickerOptions: { pickerOptions: {
shortcuts: [ shortcuts: [
{ {
text: "最近一周", text: '最近一周',
onClick(picker) { onClick(picker) {
const end = new Date(); const end = new Date()
const start = new Date(); const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
picker.$emit("pick", [start, end]); picker.$emit('pick', [start, end])
}, }
}, },
{ {
text: "最近一个月", text: '最近一个月',
onClick(picker) { onClick(picker) {
const end = new Date(); const end = new Date()
const start = new Date(); const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
picker.$emit("pick", [start, end]); picker.$emit('pick', [start, end])
}, }
}, },
{ {
text: "最近三个月", text: '最近三个月',
onClick(picker) { onClick(picker) {
const end = new Date(); const end = new Date()
const start = new Date(); const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
picker.$emit("pick", [start, end]); picker.$emit('pick', [start, end])
}, }
}, }
], ]
}, },
codeQuery: { codeQuery: {
scanCode: null, scanCode: null,
@ -369,7 +390,7 @@ export default {
zczbhhzbapzbh: null, zczbhhzbapzbh: null,
page: 1, page: 1,
limit: 20, limit: 20,
keyWords:"" keyWords: ''
}, },
codeTotal: 0, codeTotal: 0,
codeDetailLoading: false, codeDetailLoading: false,
@ -380,109 +401,118 @@ export default {
auditDateRange: [], auditDateRange: [],
showSup: false, showSup: false,
statusMap: { statusMap: {
1: "在库", 1: '在库',
2: "已使用", 2: '已使用',
3: "已退回", 3: '已退回'
} },
}; }
}, },
components: {},
methods: { methods: {
//
executeFuc(row, type, clickFuc, value) {
return executeFuc(this, row, type, clickFuc, value)
},
executeEval(row, expression, defaultRet) {
if (expression) {
return eval(expression)
}
return defaultRet
},
onReset() { onReset() {
this.$router.push({ this.$router.push({
path: "", path: ''
}); })
this.getList(); this.getList()
}, },
onSubmit() { onSubmit() {
this.loading = true; this.loading = true
if (this.auditDateRange !== null) { if (this.auditDateRange !== null) {
this.codeQuery.startAduditTime = this.auditDateRange[0]; this.codeQuery.startAduditTime = this.auditDateRange[0]
this.codeQuery.endAduditTime = this.auditDateRange[1]; this.codeQuery.endAduditTime = this.auditDateRange[1]
} else { } else {
this.codeQuery.startAduditTime = null; this.codeQuery.startAduditTime = null
this.codeQuery.endAduditTime = null; this.codeQuery.endAduditTime = null
} }
this.codeQuery.page = 1; this.codeQuery.page = 1
this.getList(); this.getList()
}, },
hideSearch() { hideSearch() {
this.showSearch = !this.showSearch; this.showSearch = !this.showSearch
}, },
getInputFocus(event) { getInputFocus(event) {
event.currentTarget.select(); event.currentTarget.select()
}, },
enterKey1(){ enterKey1() {
//1 //1
if(isBlank(this.addBindData.code)){ if (isBlank(this.addBindData.code)) {
return this.$message.error("出货槽位编码不可以为空") return this.$message.error('出货槽位编码不可以为空')
} }
getInfoByCode({code:this.addBindData.code}).then( getInfoByCode({ code: this.addBindData.code }).then(
(response) => { (response) => {
if (response.code === 20000) { if (response.code === 20000) {
this.sysWorkplaceQueue = response.data; this.sysWorkplaceQueue = response.data
if (this.sysWorkplaceQueue.relId != null){ if (this.sysWorkplaceQueue.relId != null) {
// //
this.$confirm("出货槽位编码已绑定产品, 是否继续?", "提示", { this.$confirm('出货槽位编码已绑定产品, 是否继续?', '提示', {
confirmButtonText: "确定", confirmButtonText: '确定',
cancelButtonText: "取消", cancelButtonText: '取消',
type: "warning", type: 'warning'
}) })
.then(() => { .then(() => {
this.product.nameCode = this.sysWorkplaceQueue.nameCode this.product.nameCode = this.sysWorkplaceQueue.nameCode
this.product.ggxh = this.sysWorkplaceQueue.ggxh this.product.ggxh = this.sysWorkplaceQueue.ggxh
this.product.cpmctymc = this.sysWorkplaceQueue.cpmctymc this.product.cpmctymc = this.sysWorkplaceQueue.cpmctymc
this.addBindData.id = this.sysWorkplaceQueue.id this.addBindData.id = this.sysWorkplaceQueue.id
this.addBindData.codeFlag = true this.addBindData.codeFlag = true
this.addBindData.udiCodeFlag = true this.addBindData.udiCodeFlag = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.inputRef2.focus(); // this.$refs.inputRef2.focus() //
}); })
}) })
.catch(() => { .catch(() => {
}); })
}else { } else {
this.addBindData.id = this.sysWorkplaceQueue.id this.addBindData.id = this.sysWorkplaceQueue.id
this.addBindData.codeFlag = true this.addBindData.codeFlag = true
this.addBindData.udiCodeFlag = true this.addBindData.udiCodeFlag = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.inputRef2.focus(); // this.$refs.inputRef2.focus() //
}); })
} }
} else { } else {
this.$message.error(response.message) this.$message.error(response.message)
} }
}).catch((error) => { }).catch((error) => {
this.$message.error(error.message) this.$message.error(error.message)
}); })
}, },
enterKey2() { enterKey2() {
if(isBlank(this.addBindData.udiCode)){ if (isBlank(this.addBindData.udiCode)) {
return this.$message.error("UDI码不可以为空") return this.$message.error('UDI码不可以为空')
} }
getProductByCode({udiCode:this.addBindData.udiCode}).then( getProductByCode({ udiCode: this.addBindData.udiCode }).then(
(response) => { (response) => {
if (response.code === 20000) { if (response.code === 20000) {
this.product = response.data; this.product = response.data
if (this.product.relId != null){ if (this.product.relId != null) {
// //
this.$confirm("当前出货槽位编码将绑定绑定产品, 是否提交?", "提示", { this.$confirm('当前出货槽位编码将绑定绑定产品, 是否提交?', '提示', {
confirmButtonText: "确定", confirmButtonText: '确定',
cancelButtonText: "取消", cancelButtonText: '取消',
type: "warning", type: 'warning'
}).then(() => { }).then(() => {
this.addBindData.relId = this.product.relId this.addBindData.relId = this.product.relId
this.submitAddBindData() this.submitAddBindData()
}) })
.catch(() => { .catch(() => {
}); })
}else { } else {
} }
} else { } else {
@ -490,117 +520,130 @@ export default {
} }
}).catch((error) => { }).catch((error) => {
this.$message.error(error.message) this.$message.error(error.message)
}); })
}, },
submitAddBindData(){ submitAddBindData() {
if (this.addBindData.id == null || this.addBindData.code == null) {
return this.$message.error('请添加槽位')
}
if (this.addBindData.udiCode == null) {
return this.$message.error('请添加产品!')
}
this.addBindData.relId = this.product.relId
bind(this.addBindData).then( bind(this.addBindData).then(
(response) => { (response) => {
if (response.code === 20000) { if (response.code === 20000) {
this.$message.success("绑定成功") this.$message.success('绑定成功')
this.addBindData = { this.addBindData = {
code: null, code: null,
codeFlag: false, codeFlag: false,
udiCode: null, udiCode: null,
udiCodeFlag: false udiCodeFlag: false
} }
this.sysWorkplaceQueue = {}, this.sysWorkplaceQueue = {}
this.product = {}, this.product = {}
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.inputRef1.focus(); // this.$refs.inputRef1.focus() //
}); })
} else { } else {
this.$message.error(response.message) this.$message.error(response.message)
this.$refs.inputRef1.select(); this.$nextTick(() => {
this.$refs.inputRef1.focus() //
})
} }
}).catch((error) => { }).catch((error) => {
this.$message.error(error.message) this.$message.error(error.message)
this.$refs.inputRef1.select(); this.$refs.inputRef1.select()
}); })
}, },
closeAddBindData() {
this.addBindVisible = false
this.getCodeDetailList()
},
enterKey() { enterKey() {
this.getOrderDetails() this.getOrderDetails()
}, },
getBusType() { getBusType() {
let query = { let query = {
code: this.filterQuery.invCode, code: this.filterQuery.invCode,
enabled: true, enabled: true
}; }
getLocalJoinByUser(query) getLocalJoinByUser(query)
.then((response) => { .then((response) => {
this.busTypes = response.data.list || []; this.busTypes = response.data.list || []
this.filterQuery.action = this.busTypes[0].action; this.filterQuery.action = this.busTypes[0].action
}) })
.catch(() => { .catch(() => {
}); })
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.currentRow = val; this.currentRow = val
this.getOrderDetails(); this.getOrderDetails()
}, },
getOrderDetails() { getOrderDetails() {
this.codeQuery.page = 1; this.codeQuery.page = 1
this.getCodeDetailList(); this.getCodeDetailList()
}, },
clearDetailList() { clearDetailList() {
this.codeDetailList = []; this.codeDetailList = []
this.codeTotal = 0; this.codeTotal = 0
}, },
// //
getList() { getList() {
this.loading = true; this.loading = true
getSysWorkplaceLayerList(this.codeQuery) getSysWorkplaceLayerList(this.codeQuery)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false
if (response.code === 20000) { if (response.code === 20000) {
this.list = response.data.list || []; this.list = response.data.list || []
this.total = response.data.total || 0; this.total = response.data.total || 0
} else { } else {
this.$message.error(response.message); this.$message.error(response.message)
} }
}) })
.catch((error) => { .catch((error) => {
this.$message.error(error.message) this.$message.error(error.message)
this.loading = false; this.loading = false
this.list = []; this.list = []
this.total = 0; this.total = 0
}); })
}, },
deleteOrders(data) { deleteOrders(data) {
this.loading = true; this.loading = true
let delQuery = { let delQuery = {
billNo: data, billNo: data
} }
deleterPrein(delQuery) deleterPrein(delQuery)
.then((response) => { .then((response) => {
if (response.code == 20000) { if (response.code == 20000) {
this.getList(); this.getList()
this.$message({ this.$message({
type: "success", type: 'success',
message: "删除成功!", message: '删除成功!'
}); })
} else if (response.code == 520) { } else if (response.code == 520) {
this.$message.error("新增扫码单据列表已不存在该扫码单据!"); this.$message.error('新增扫码单据列表已不存在该扫码单据!')
this.getList(); this.getList()
} }
}) })
.catch(() => { .catch(() => {
}); })
}, },
deleteDialog(row) { deleteDialog(row) {
this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", { this.$confirm('此操作将永久删除该订单, 是否继续?', '提示', {
confirmButtonText: "确定", confirmButtonText: '确定',
cancelButtonText: "取消", cancelButtonText: '取消',
type: "warning", type: 'warning'
}) })
.then(() => { .then(() => {
this.deleteOrders(row.billNo); this.deleteOrders(row.billNo)
}) })
.catch(() => { .catch(() => {
}); })
}, },
onCodeReset() { onCodeReset() {
this.codeQuery = { this.codeQuery = {
@ -618,91 +661,118 @@ export default {
zczbhhzbapzbh: null, zczbhhzbapzbh: null,
page: 1, page: 1,
limit: 20, limit: 20,
keyWords:"" keyWords: ''
}; }
this.getCodeDetailList(); this.getCodeDetailList()
}, },
keyup_submit(event) { keyup_submit(event) {
this.filterQuery.page = 1; this.filterQuery.page = 1
this.getList(); this.getList()
event.target.select(); event.target.select()
}, },
onCodeSubmit() { onCodeSubmit() {
this.codeQuery.page = 1; this.codeQuery.page = 1
this.getCodeDetailList(); this.getCodeDetailList()
}, },
addBind() { addBind() {
this.addBindData = { this.addBindData = {
code: null, code: null,
codeFlag: false, codeFlag: false,
udiCode: null, udiCode: null,
udiCodeFlag: false udiCodeFlag: false
} }
this.sysWorkplaceQueue = {}
this.product = {}
this.addBindVisible = true this.addBindVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.inputRef1.focus(); // this.$refs.inputRef1.focus() //
}); })
// else {
// this.addBindData = {
// code: null,
// codeFlag: true,
// udiCode: null,
// udiCodeFlag: true
// }
// this.bindType = 2
// this.titleName = "2"
// this.sysWorkplaceQueue.code = row.code
// this.sysWorkplaceQueue.remark = row.remark
// this.addBindData.code = row.code
// this.addBindData.id = row.id
// this.product = {}
// this.addBindVisible = true
// this.$nextTick(() => {
// this.$refs.inputRef2.focus();
// });
//
// }
},
selectBind(){
this.selectBindVisible = true
}, },
getCodeDetailList() { getCodeDetailList() {
this.codeDetailLoading = true; this.codeDetailLoading = true
getQueueListPage(this.codeQuery).then((res) => { getQueueListPage(this.codeQuery).then((res) => {
this.codeDetailLoading = false; this.codeDetailLoading = false
if (res.code === 20000) { if (res.code === 20000) {
this.codeDetailList = res.data.list || []; this.codeDetailList = res.data.list || []
this.codeTotal = res.data.total || 0; this.codeTotal = res.data.total || 0
} else { } else {
this.$message.error(res.message); this.$message.error(res.message)
this.codeDetailList = []; this.codeDetailList = []
this.codeTotal = 0; this.codeTotal = 0
} }
}).catch((error) => { }).catch((error) => {
this.codeDetailLoading = true; this.codeDetailLoading = true
this.$message.error(error.message); this.$message.error(error.message)
this.codeDetailList = []; this.codeDetailList = []
this.codeTotal = 0; this.codeTotal = 0
}) })
}, },
findMethod(query) { findMethod(query) {
this.fromOptions = []; this.fromOptions = []
let cQuery = { let cQuery = {
key: query, key: query,
corpType: 2, corpType: 2,
page: 1, page: 1,
limit: 10, limit: 10
}; }
getBasicUnitMaintains(cQuery) getBasicUnitMaintains(cQuery)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false
this.fromOptions = response.data.list || []; this.fromOptions = response.data.list || []
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false
this.fromOptions = []; this.fromOptions = []
}); })
}, },
removeRelId(row){ removeRelId(row) {
let query = { let query = {
code : row.code, code: row.code,
relId: row.relId relId: row.relId
} }
this.$confirm("此操作将解绑该槽位与产品, 是否继续?", "提示", { this.$confirm('此操作将解绑该槽位与产品, 是否继续?', '提示', {
confirmButtonText: "确定", confirmButtonText: '确定',
cancelButtonText: "取消", cancelButtonText: '取消',
type: "warning", type: 'warning'
}).then(() => { }).then(() => {
removeProduct(query).then(res => { removeProduct(query).then(res => {
if (res.code == 20000){ if (res.code == 20000) {
this.$message.success("解绑成功") this.$message.success('解绑成功')
this.getCodeDetailList(); this.getCodeDetailList()
}else { } else {
this.$message.error("解绑失败") this.$message.error('解绑失败')
this.getCodeDetailList(); this.getCodeDetailList()
} }
}) })
}).catch(() => {}) }).catch(() => {
})
} }
@ -710,37 +780,46 @@ export default {
filters: { filters: {
statusFilterType(status) { statusFilterType(status) {
const statusMap = { const statusMap = {
false: "success", false: 'success',
true: "warning", true: 'warning'
}; }
return statusMap[status]; return statusMap[status]
}, }
}, },
mounted() { mounted() {
document.body.ondrop = function (event) { document.body.ondrop = function(event) {
event.preventDefault(); event.preventDefault()
event.stopPropagation(); event.stopPropagation()
}; }
}, },
created() { created() {
getHead("workplaceQueue-cwgl", "1").then((re) => { getHead('workplaceQueue-cwgl', '1').then((re) => {
// //
this.tableObj = re.data; this.tableObj = re.data
this.tableHeader = re.data.tableList; this.tableHeader = re.data.tableList
this.queryList = re.data.queryList; this.queryList = re.data.queryList
this.fromList = re.data.fromList; this.fromList = re.data.fromList
}); })
this.getCodeDetailList(); this.getCodeDetailList()
}, }
}; }
</script> </script>
<style type="text/scss" lang="scss"> <style type="text/scss" lang="scss">
.el-radio__original { .el-radio__original {
display: none !important; /* 隐藏原生 radio 输入,但仍然允许交互 */ display: none !important; /* 隐藏原生 radio 输入,但仍然允许交互 */
} }
.el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner { .el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner {
box-shadow: none !important; box-shadow: none !important;
} }
.center-button {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
margin-bottom: 10px;
margin-top: 18px;
}
</style> </style>

Loading…
Cancel
Save