1、工位上货页面搬移一份新的器械用

20240912_adapter
qiuyt 1 month ago
parent 626b37edee
commit 83cb777212

@ -128,44 +128,82 @@
<!-- <i class="el-icon-s-platform"></i>-->
<!-- <span>工位管理</span>-->
<!-- </template>-->
<div v-if=" productType != 1">
<el-menu-item :index=1 @click="clickMenuItem(1)" v-if="workPlaceClass == 2" >
<!-- <i class="el-icon-s-unfold"></i>-->
<span slot="title">工位上货</span>
</el-menu-item>
<el-menu-item :index=13 @click="clickMenuItem(13)" v-if="workPlaceClass == 2">
<!-- <i class="el-icon-edit-outline"></i>-->
<span slot="title">工位剔除</span>
</el-menu-item>
<el-menu-item :index=8 @click="clickMenuItem(8)" v-if="workPlaceClass == 2" >
<!-- <i class="el-icon-warning"></i>-->
<span slot="title">上货推荐</span>
</el-menu-item>
<el-menu-item :index=13 @click="clickMenuItem(13)" v-if="workPlaceClass == 2">
<!-- <i class="el-icon-edit-outline"></i>-->
<span slot="title">工位剔除</span>
</el-menu-item>
<el-menu-item :index=8 @click="clickMenuItem(8)" v-if="workPlaceClass == 2" >
<!-- <i class="el-icon-warning"></i>-->
<span slot="title">上货推荐</span>
</el-menu-item>
<el-menu-item :index=3 @click="clickMenuItem(3)" v-if="workPlaceClass == 2 || workPlaceClass == 1" >
<!-- <i class="el-icon-s-platform"></i>-->
<!-- <i class="el-icon-s-platform"></i>-->
<span slot="title">工位库存</span>
</el-menu-item>
<el-menu-item :index=7 @click="clickMenuItem(7)" v-if="workPlaceClass == 2" >
<!-- <i class="el-icon-s-help"></i>-->
<span slot="title">拆零管理</span>
</el-menu-item>
<el-menu-item :index=2 @click="clickMenuItem(2)" v-if="workPlaceClass == 2" >
<!-- <i class="el-icon-s-fold"></i>-->
<span slot="title">工位退货</span>
</el-menu-item>
<el-menu-item :index=12 @click="clickMenuItem(12)" v-if="workPlaceClass == 2" >
<!-- <i class="el-icon-s-fold"></i>-->
<span slot="title">上货记录</span>
</el-menu-item>
<el-menu-item :index=14 @click="clickMenuItem(14)" v-if="workPlaceClass == 1" >
<!-- <i class="el-icon-s-platform"></i>-->
<span slot="title">处理预验收</span>
</el-menu-item>
<el-menu-item :index=7 @click="clickMenuItem(7)" v-if="workPlaceClass == 2" >
<!-- <i class="el-icon-s-help"></i>-->
<span slot="title">拆零管理</span>
</el-menu-item>
<el-menu-item :index=2 @click="clickMenuItem(2)" v-if="workPlaceClass == 2" >
<!-- <i class="el-icon-s-fold"></i>-->
<span slot="title">工位退货</span>
</el-menu-item>
<el-menu-item :index=12 @click="clickMenuItem(12)" v-if="workPlaceClass == 2" >
<!-- <i class="el-icon-s-fold"></i>-->
<span slot="title">上货记录</span>
</el-menu-item>
<el-menu-item :index=14 @click="clickMenuItem(14)" v-if="workPlaceClass == 1" >
<!-- <i class="el-icon-s-platform"></i>-->
<span slot="title">处理预验收</span>
</el-menu-item>
</div>
<div v-if=" productType == 1">
<el-menu-item :index=1 @click="clickMenuItem(10000)" v-if="workPlaceClass == 2" >
<!-- <i class="el-icon-s-unfold"></i>-->
<span slot="title">工位上货</span>
</el-menu-item>
<el-menu-item :index=13 @click="clickMenuItem(1300)" v-if="workPlaceClass == 2">
<!-- <i class="el-icon-edit-outline"></i>-->
<span slot="title">工位剔除</span>
</el-menu-item>
<el-menu-item :index=8 @click="clickMenuItem(800)" v-if="workPlaceClass == 2" >
<!-- <i class="el-icon-warning"></i>-->
<span slot="title">上货推荐</span>
</el-menu-item>
<!-- </el-submenu>-->
<el-menu-item :index=3 @click="clickMenuItem(300)" v-if="workPlaceClass == 2 || workPlaceClass == 1" >
<!-- <i class="el-icon-s-platform"></i>-->
<span slot="title">工位库存</span>
</el-menu-item>
<el-menu-item :index=7 @click="clickMenuItem(700)" v-if="workPlaceClass == 2" >
<!-- <i class="el-icon-s-help"></i>-->
<span slot="title">拆零管理</span>
</el-menu-item>
<el-menu-item :index=2 @click="clickMenuItem(200)" v-if="workPlaceClass == 2" >
<!-- <i class="el-icon-s-fold"></i>-->
<span slot="title">工位退货</span>
</el-menu-item>
<el-menu-item :index=12 @click="clickMenuItem(1200)" v-if="workPlaceClass == 2" >
<!-- <i class="el-icon-s-fold"></i>-->
<span slot="title">上货记录</span>
</el-menu-item>
<el-menu-item :index=14 @click="clickMenuItem(1400)" v-if="workPlaceClass == 1" >
<!-- <i class="el-icon-s-platform"></i>-->
<span slot="title">处理预验收</span>
</el-menu-item>
</div>
<!-- </el-submenu>-->
<!--<el-submenu index="22" v-if="autoTag == 1">-->
@ -334,6 +372,17 @@ import IoSplitFifoRemind from '@/views/collect/IoSplitFifoRemind.vue'
import IocCollectOrderCheckCode from '@/views/collect/IocCollectOrderCheckCode.vue'
import IocCollectOrderVerify from "@/views/collect/IocCollectOrderVerify.vue"
import IoSplitFifoRemove from "@/views/collect/IoSplitFifoRemove.vue"
//
import DevicesIoCreateOrderOut from "@/views/collect/device/DevicesIoCreateOrder.vue"
import DevicesIoSplitFifoRemove from "@/views/collect/device/DevicesIoSplitFifoRemove.vue"
import DevicesIoSplitFifoRemind from "@/views/collect/device/DevicesIoSplitFifoRemind.vue"
import DevicesIoSplitFifoCode from "@/views/collect/device/DevicesIoSplitFifoCode.vue"
import DevicesIoDestroyOrder from "@/views/collect/device/DevicesIoDestroyOrder.vue"
import DevicesIoCreateOrderReturn from "@/views/collect/device/DevicesIoCreateOrder.vue"
import DevicesIoCreateOrderOutRecord from "@/views/collect/device/DevicesIoCreateOrderOutRecord.vue"
import DevicesDealOrderPre from "@/views/collect/device/DevicesDealOrderPre.vue"
import {listPage, switchWorkplaceStatus} from "@/api/basic/workPlace/sysWorkplaceManage";
import {
filterListByWorkplace,
@ -371,7 +420,17 @@ export default {
DevicesIocCollectOrderCheckCode,
DevicesCollectOrderAllot,
DevicesCollectOrderEnd,
DevicesCollectOrderUpload
DevicesCollectOrderUpload,
DevicesIoCreateOrderOut,
DevicesIoSplitFifoRemove,
DevicesIoSplitFifoRemind,
DevicesIoSplitFifoCode,
DevicesIoDestroyOrder,
DevicesIoCreateOrderReturn,
DevicesIoCreateOrderOutRecord,
DevicesDealOrderPre,
},
name: 'CollectOrderTabs',
data() {
@ -586,6 +645,77 @@ export default {
//
componentProps: {}
},
{
number: 10000,
title: '工位上货(器械)',
name: 'DevicesIoCreateOrderOut',
component: DevicesIoCreateOrderOut,
//
componentProps: {
fromSplitType: "out"
}
},
{
number: 1300,
title: '工位剔除(器械)',
name: 'DevicesIoSplitFifoRemove',
component: DevicesIoSplitFifoRemove,
//
componentProps: {
message : ""
}
},
{
number: 800,
title: '上货推荐(器械)',
name: 'DevicesIoSplitFifoRemind',
component: DevicesIoSplitFifoRemind,
//
componentProps: {}
},
{
number: 300,
title: '工位库存(器械)',
name: 'DevicesIoSplitFifoCode',
component: DevicesIoSplitFifoCode,
//
componentProps: {}
},
{
number: 700,
title: '拆零管理(器械)',
name: 'DevicesIoDestroyOrder',
component: DevicesIoDestroyOrder,
//
componentProps: {}
},
{
number: 200,
title: '工位退货(器械)',
name: 'DevicesIoCreateOrderReturn',
component: DevicesIoCreateOrderReturn,
//
componentProps: {
fromSplitType: "return"
}
},
{
number: 1200,
title: '上货记录(器械)',
name: 'DevicesIoCreateOrderOutRecord',
component: DevicesIoCreateOrderOutRecord,
//
componentProps: {}
},
{
number: 1400,
title: '处理预验收(器械)',
name: 'DevicesDealOrderPre',
component: DevicesDealOrderPre,
//
componentProps: {
}
},
],
editableTabs: [{
number: 0,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,215 @@
<template>
<div>
<el-card style="margin-top: -20px">
<!--<div style=" float: right;-->
<!-- text-align: right;-->
<!-- margin-bottom: 8px;">-->
<!-- <el-button type="primary" size="mini" icon="search" @click="addDrugLevel"-->
<!-- style="text-align:right">新增药品层级-->
<!-- </el-button>-->
<!--</div>-->
<el-descriptions title="产品信息" :column="2" border style="margin-top: 5px">
<el-descriptions-item label="UDI码" v-if="destroyType == 2">
{{ prescribeData.code }}
</el-descriptions-item>
<el-descriptions-item label="产品名称">{{ prescribeData.cpmctymc }}</el-descriptions-item>
<el-descriptions-item label="产品标识">{{ prescribeData.nameCode }}</el-descriptions-item>
<el-descriptions-item label="产品规格">{{ prescribeData.ggxh }}</el-descriptions-item>
<el-descriptions-item label="批次号">{{ prescribeData.batchNo }}</el-descriptions-item>
<el-descriptions-item label="计量单位">{{ prescribeData.measname }}</el-descriptions-item>
<el-descriptions-item label="剩余数量" custom-style class="custom-label">
<span :style="{ color: 'red' }">
{{ prescribeData.reCount }}
</span>
<!--{{ prescribeData.reCount }}-->
<!--<el-tag type="danger">{{ prescribeData.reCount}}</el-tag>-->
</el-descriptions-item>
<el-descriptions-item label="生产日期">{{ produceDate }}</el-descriptions-item>
<el-descriptions-item label="失效日期">{{ expireDate }}</el-descriptions-item>
<el-descriptions-item label="生产企业">{{ prescribeData.manufactory }}</el-descriptions-item>
<!--<el-descriptions-item label="供应商">{{ prescribeData.supName }}</el-descriptions-item>-->
<el-descriptions-item label="医保编码">{{ prescribeData.ybbm }}</el-descriptions-item>
</el-descriptions>
<!--<el-button type="primary" icon="el-icon-plus" sty>提交</el-button>-->
<el-form :inline="true" :model="formData" class="demo-form-inline" style="margin-top: 30px" :rules="rules"
ref="formRef"
>
<el-row :gutter="24">
<el-col :span="10">
<el-form-item label="损耗出库数量:" prop="count">
<el-input v-model.number="formData.count" placeholder="请填写损耗出库数量" type="number" :min="1"
@input="checkCount"
></el-input>
<!--<span v-if="countExceeded" class="exceeded-message">10</span>-->
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="损耗出库说明:">
<el-input v-model="formData.remark" placeholder="请填写损耗出库说明" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<!--<el-form-item>-->
<!-- <el-button type="primary" @click="onSubmit"></el-button>-->
<!--</el-form-item>-->
</el-form>
<div style="text-align: center; margin-top: 20px;">
<el-button type="primary" @click="destroyOutOrder" :loading="saveLoading">提交</el-button>
<el-button @click="closeAddDialog"></el-button>
</div>
</el-card>
</div>
</template>
<script>
import { destroyOut, destroyOutByCode, destroySplitOut } from '@/api/collect/IoDestroy'
export default {
name: 'DevicesDestroyOutDialog',
props: {
prescribeData: {
type: Object,
required: true
},
destroyType: {
type: Object,
required: true
},
closeDialog: {
type: Function,
required: true
}
},
data() {
return {
formData: {},
produceDate: null,
expireDate: null,
saveLoading: false,
rules: {
count: [
{ validator: this.validateCount, message: '损耗出库数量不能超出剩余数量', trigger: 'blur' }
]
}
}
},
methods: {
conversionDate(dateString) {
const parts = dateString.split('')
const year = '20' + parts.slice(0, 2).join('')
const month = parts[2] + parts[3]
const day = parts[4] + parts[5]
return `${year}-${month}-${day}`
},
validateCount(rule, value, callback) {
if (value > this.prescribeData.reCount) {
callback(new Error('损耗出库数量超出剩余数量'))
} else {
callback()
}
},
checkCount() {
//
this.$refs.formRef.validateField('count')
},
closeAddDialog() {
this.closeDialog()
},
//
destroyOutOrder() {
if (this.formData.count == null) {
return this.$message.error('请输入损耗数量')
}
if (this.formData.count > this.prescribeData.reCount) {
return this.$message.error('损耗出库数量不能超出剩余数量')
}
let query = {
outCount: this.formData.count,
remark: this.formData.remark,
updateUser: this.$store.getters.adminId,
createUser: this.$store.getters.adminId,
splitFifoInv: this.prescribeData,
code: this.prescribeData.code
}
if (this.destroyType == 1) {
destroyOut(query).then(res => {
if (res.code == 20000) {
this.closeDialog()
return this.$message.success('损耗出库成功')
} else {
return this.$message.error(res.message)
}
})
} else if (this.destroyType == 2) {
destroyOutByCode(query).then(res => {
if (res.code == 20000) {
this.closeDialog()
return this.$message.success('损耗出库成功')
} else {
return this.$message.error(res.message)
}
})
} else if (this.destroyType == 3) {
destroySplitOut(query).then(res => {
if (res.code == 20000) {
this.closeDialog()
this.$message.success('损耗出库成功')
} else {
this.$message.error(res.message)
}
}).catch(() => {
})
}
},
destroyOutByCodeOrder() {
if (this.formData.count == null) {
return this.$message.error('请输入损耗数量')
}
let query = {
outCount: this.formData.count,
remark: this.formData.remark,
updateUser: this.$store.getters.adminId,
createUser: this.$store.getters.adminId,
splitFifoInv: this.prescribeData,
code: this.formData.code
}
}
},
created() {
if (this.prescribeData.produceDate != null) {
this.produceDate = this.conversionDate(this.prescribeData.produceDate)
}
if (this.prescribeData.expireDate != null) {
this.expireDate = this.conversionDate(this.prescribeData.expireDate)
}
if (this.destroyType == 2) {
this.prescribeData.reCount = this.prescribeData.totalCount
}
if (this.destroyType == 3) {
this.prescribeData.reCount = this.prescribeData.remainCount
this.prescribeData.cpmctymc = this.prescribeData.productName
}
}
}
</script>
<style scoped>
/* 添加自定义样式 */
.custom-label {
background-color: #f56c6c; /* 选择你想要的背景色 */
color: white; /* 文字颜色,根据背景色调整 */
/*padding: 5px 10px; !* 内边距 *!*/
/*border-radius: 4px; !* 边框圆角 *!*/
}
</style>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,479 @@
<template>
<div>
<el-card>
<el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form"
size="mini" 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' && executeEval(row,item.expression,true)"
class="query-form-item"
:label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc == '模糊查询' ? '产品通用名/规格/批次号' : 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 == 'select' && executeEval(row,item.expression,true)"
class="query-form-item"
:label="item.columnDesc+`:`">
<el-select v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
clearable>
<el-option
v-for="dict in item.lableRuleObj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)"
class="query-form-item"
: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)"
filterable
remote
: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"
/>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)"
class="query-form-item"
: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)"
class="query-form-item"
: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="left-search" v-if="!showSearch">-->
<!-- &lt;!&ndash; 关键字搜索 按需配置 &ndash;&gt;-->
<!-- <el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form" size="mini"-->
<!-- label-width="100px">-->
<!-- <el-row style=" display:flex; flex-wrap: wrap; ">-->
<!-- <template v-for="(item, index) in queryList">-->
<!-- <el-form-item-->
<!-- v-if="item.columnType == 'input' && executeEval(row,item.expression,true) && item.columnName == 'keywords'"-->
<!-- class="query-form-item"-->
<!-- :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>-->
<!-- </template>-->
<!-- </el-row>-->
<!-- </el-form>-->
<!-- </div>-->
<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(this)"
>查询
</el-button
>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%;" border highlight-current-row
@row-click="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)" ref="multipleTable"
:default-sort="defaultSort"
:row-style="{ height: '32px' }"
@sort-change="handleSortChange">
<template v-for="(item, index) in tableHeader">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
type="selection"
:width="item.width"
:selectable="(row,number) => executeFuc(row,'3',item.clickFuc)"
></el-table-column>
<el-table-column
v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{
item.lableRuleObj[scope.row[item.columnName]]
}}</span>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-tag
:type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])">
<span>{{
item.lableRuleObj ? item.lableRuleObj[scope.row[item.columnName]] : scope.row[item.columnName]
}}</span>
</el-tag>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:width="item.width"
:key="item.columnName"
fixed="right"
>
<template slot-scope="scope">
<el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj"
:type="buttonItem.type"
:size="buttonItem.size"
:style="buttonItem.style"
:key="buttonItem"
v-if="executeEval(scope.row,buttonItem.hasPermi,true)"
:disabled="executeEval(scope.row,buttonItem.disabledFuc,false)"
@click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)"
>{{ buttonItem.name }}
</el-button>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'text' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{
scope.row[item.columnName]
}}</span>
</template>
</el-table-column>
</template>
</el-table>
<pagination
v-show="total>0"
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="handleCurrentChange"
></pagination>
</el-card>
</div>
</template>
<script>
import {executeFuc, getHead} from "@/utils/customConfig";
import {convertDate} from "@/utils/date";
import {getInvListByUserOptimize} from "@/api/system/invWarehouse";
import {filterWorkOptimize, listPage} from '@/api/basic/workPlace/sysWorkplaceManage'
import {getWorkBindBusTypes, removeBusTypeById} from '@/api/basic/workPlace/sysWorkplaceDocuments'
import {orderOutRecordPage} from '@/api/inout/orderDetailBiz'
export default {
name: "DevicesIoCreateOrderOutRecord",
props: {
workPlaceCode: {
type: Number,
default: null,
required: true
},
},
data() {
return {
busQuery: {
busKey: '',
workplaceCode: null,
page: 1,
limit: 100
},
viewType: null,
isLinkDisabled: false,
//
//
tableHeader: [],
queryList: [],
tableObj: [],
fromList: [],
tableHeader4: [],
queryList4: [],
fromList4: [],
convertDateFun: convertDate,
//-------------end
options: {
getInvList: [],
getDeptList: [],
getBusType: [],
findWorkPlace: [],
},
showSearch: false,
filterQuery: {
busType: null,
action: "SC72197936495755",
fifoSplit: null,
workPlaceCode: null,
code: null,
billNo: null,
page: 1,
limit: 10,
remind: 'yj',
// key: null
},
defaultSort: {prop: 'createTime', order: 'desc'},
loading: false,
list: [],
total: 0,
resultQuery: {
billNo: null,
code: null,
page: 1,
limit: 10
},
currentRow: {},
resultTotal: 0,
resultDetailLoading: false,
resultDetailList: [],
}
},
components: {},
methods: {
changePlace(_this, query) {
_this.getWorkBindBusTypes(_this, query)
},
getWorkBindBusTypes(_this, query) {
_this.busQuery.workplaceCode = query
getWorkBindBusTypes(this.busQuery).then(res => {
if (res.code == 20000) {
let busTypes = res.data.list || [];
// _this.options.getWorkPlace = res.data.list || [];
let getWorkPlace = busTypes.map(busType => {
return {
code: busType.documentTypeCode,
label: busType.busName
};
});
_this.options.getBusType = getWorkPlace
if (_this.options.getBusType.length == 1) {
_this.filterQuery.busType = _this.options.getBusType[0].code
} else {
_this.filterQuery.busType = null
}
}
return
})
},
//------------
executeFuc(row, type, clickFuc, value) {
return executeFuc(this, row, type, clickFuc, value);
},
executeEval(row, expression, defaultRet) {
if (expression) {
return eval(expression);
}
return defaultRet;
},
handleSortChange(column, prop, order) {
if (column.order === 'descending') {
this.query.sort = 'desc'
} else {
this.query.sort = 'asc'
}
this.query.orderBy = column.prop;
this.getList();
},
///------------end
getInvList(_this) {
getInvListByUserOptimize()
.then((response) => {
_this.options.getInvList = response.data || [];
_this.getList();
})
.catch(() => {
});
},
hideSearch() {
this.showSearch = !this.showSearch;
},
onReset() {
this.filterQuery = {
fifoSplit: null,
workPlaceCode: null,
action: "SC72197936495755",
code: null,
billNo: null,
page: 1,
limit: 10,
remind: 'yj',
};
this.actDateRange = [];
this.getList();
},
onSubmit(_this) {
if (_this == null)
_this = this
_this.filterQuery.page = 1;
_this.getList();
},
getList() {
this.loading = true;
orderOutRecordPage(this.filterQuery).then(res => {
this.loading = false
this.list = res.data.list || []
this.total = res.data.total || 0
}).catch(() => {
this.loading = false
this.list = []
this.total = 0
})
},
handleCurrentChange(val) {
this.filterQuery.page = val.page;
this.getList();
},
getInputFocus(event) {
event.currentTarget.select();
},
enterKey(_this, event) {
_this.onSubmit();
},
findWorkPlace(_this, val) {
let query = {
// chargeUser: _this.$store.getters.userId,
userIdFlag: true,
key: val,
page: 1,
limit: 10,
workPlaceClass:2
}
filterWorkOptimize(query)
.then((response) => {
_this.loading = false;
_this.options.findWorkPlace = response.data || [];
if (_this.options.findWorkPlace.length == 1) {
_this.filterQuery.workPlaceCode = _this.options.findWorkPlace[0].code;
_this.getWorkBindBusTypes(_this, _this.filterQuery.workPlaceCode)
}
})
.catch(() => {
_this.loading = false;
_this.options.findWorkPlace = [];
});
},
},
created() {
if (this.$route.query.workplaceId != null) {
this.filterQuery.workPlaceCode = Number(this.$route.query.workplaceId)
this.viewType = 1
this.isLinkDisabled = true
}
this.findWorkPlace(this, "")
this.getWorkBindBusTypes(this, "")
getHead("IoCreateOrderOutRecord", "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>
.query-form {
display: flex;
flex-wrap: wrap;
width: 100%;
}
.query-form-item {
margin-right: 5px;
margin-bottom: 6px;
}
</style>

@ -0,0 +1,517 @@
<template>
<div>
<el-card>
<el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form"
size="mini" 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' && executeEval(row,item.expression,true)"
class="query-form-item"
:label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc == '模糊查询' ? '产品通用名/规格/批次号' : 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 == 'select' && executeEval(row,item.expression,true)"
class="query-form-item"
:label="item.columnDesc+`:`">
<el-select v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
clearable>
<el-option
v-for="dict in item.lableRuleObj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)"
class="query-form-item"
: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)"
filterable
remote
: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"
/>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)"
class="query-form-item"
: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)"
class="query-form-item"
: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="left-search" v-if="!showSearch">-->
<!-- &lt;!&ndash; 关键字搜索 按需配置 &ndash;&gt;-->
<!-- <el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form" size="mini"-->
<!-- label-width="100px">-->
<!-- <el-row style=" display:flex; flex-wrap: wrap; ">-->
<!-- <template v-for="(item, index) in queryList">-->
<!-- <el-form-item-->
<!-- v-if="item.columnType == 'input' && executeEval(row,item.expression,true) && item.columnName == 'keywords'"-->
<!-- class="query-form-item"-->
<!-- :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>-->
<!-- </template>-->
<!-- </el-row>-->
<!-- </el-form>-->
<!-- </div>-->
<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(this)"
>查询
</el-button
>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row
border :default-sort="defaultSort"
:row-style="{ height: '32px' }"
@row-click="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)"
@sort-change="handleSortChange"
>
<!--<el-table-column label="操作" width="100" fixed="right" v-if="splitType!='search'">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="editOrder(scope.row)"-->
<!-- >编辑-->
<!-- </el-button-->
<!-- >-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="deleteDialog(scope.row)"-->
<!-- >删除-->
<!-- </el-button-->
<!-- >-->
<!-- </template>-->
<!--</el-table-column>-->
<template v-for="(item, index) in tableHeader">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
type="selection"
:width="item.width"
:selectable="(row,number) => executeFuc(row,'3',item.clickFuc)"
></el-table-column>
<el-table-column
v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{
item.lableRuleObj[scope.row[item.columnName]]
}}</span>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-tag
:type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])">
<span>{{
item.lableRuleObj ? item.lableRuleObj[scope.row[item.columnName]] : scope.row[item.columnName]
}}</span>
</el-tag>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:width="item.width"
:key="item.columnName"
fixed="right"
>
<template slot-scope="scope">
<el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj"
:type="buttonItem.type"
:size="buttonItem.size"
:style="buttonItem.style"
:key="buttonItem"
v-if="executeEval(scope.row,buttonItem.hasPermi,true)"
:disabled="executeEval(scope.row,buttonItem.disabledFuc,false)"
@click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)"
>{{ buttonItem.name }}
</el-button>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'text' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{
scope.row[item.columnName]
}}</span>
</template>
</el-table-column>
</template>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="filterQuery.page"
:limit.sync="filterQuery.limit"
@pagination="getList"
/>
</el-card>
<el-dialog
title="损耗出库"
:visible.sync="destroyOutDialogVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="60%"
v-if="destroyOutDialogVisible"
>
<destroyOutDialog
:prescribeData="prescribeData"
:destroyType="destroyType"
:closeDialog="closeDialog"
>
</destroyOutDialog>
</el-dialog>
</div>
</template>
<script>
import destroyOutDialog from "./DevicesDestroyOutDialog.vue";
import {getUserBindWork} from '@/api/basic/collectPoint/userWorkplace'
import {executeFuc, getHead} from '@/utils/customConfig'
import {getSplitCode} from '@/api/collect/collectOrder'
import {getWorkBindBusTypes} from '@/api/basic/workPlace/sysWorkplaceDocuments'
import {filterWorkOptimize} from '@/api/basic/workPlace/sysWorkplaceManage'
export default {
name: 'DevicesIoDestroyOrder',
data() {
return {
busQuery: {
busKey: '',
workplaceCode: null,
page: 1,
limit: 100
},
viewType: null,
tableHeader: [],
queryList: [],
tableObj: [],
fromList: [],
defaultSort: {prop: 'createTime', order: 'desc'},
showSearch: false,
filterQuery: {
workPlaceCode: null,
busType: null,
page: 1,
limit: 10,
startTime: null,
endTime: null,
keywords: null,
},
options: {
getWorkPlaceList: [],
getBusType: [],
findWorkPlace: [],
},
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]);
},
},
],
},
list: [],
showType: 1,
isLinkDisabled: false,
destroyOutDialogVisible: false,
prescribeData: {},
destroyType: 3,//1 2.code3
}
},
components: {destroyOutDialog},
methods: {
changePlace(_this, query) {
_this.getWorkBindBusTypes(_this, query)
},
getWorkBindBusTypes(_this, query) {
_this.busQuery.workplaceCode = query
getWorkBindBusTypes(this.busQuery).then(res => {
if (res.code == 20000) {
let busTypes = res.data.list || [];
// _this.options.getWorkPlace = res.data.list || [];
let getWorkPlace = busTypes.map(busType => {
return {
code: busType.documentTypeCode,
label: busType.busName
};
});
_this.options.getBusType = getWorkPlace
if (_this.options.getBusType.length == 1) {
_this.filterQuery.busType = _this.options.getBusType[0].code
} else {
_this.filterQuery.busType = null
}
}
return
})
},
executeFuc(row, type, clickFuc, value) {
return executeFuc(this, row, type, clickFuc, value);
},
executeEval(row, expression, defaultRet) {
if (expression) {
return eval(expression);
}
return defaultRet;
},
handleSortChange(column, prop, order) {
if (column.order === 'descending') {
this.filterQuery.sort = 'desc'
} else {
this.filterQuery.sort = 'asc'
}
this.filterQuery.orderBy = column.prop;
this.getList();
},
hideSearch() {
this.showSearch = !this.showSearch;
},
onReset() {
this.filterQuery = {
...this.filterQuery,
workPlaceCode: null,
page: 1,
limit: 10,
startTime: null,
endTime: null,
keyWords: null,
busType: null
};
this.actDateRange = [];
this.getList();
},
onSubmit(_this) {
if (_this == null)
_this = this
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();
},
getList() {
getSplitCode(this.filterQuery).then(res => {
if (res.code == 20000) {
if (res.code === 20000) {
this.list = res.data.list || [];
this.total = res.data.total || 0;
} else {
this.$message.error(res.message);
}
}
})
.catch((error) => {
this.$message.error(error.message)
this.loading = false;
this.list = [];
this.total = 0;
});
},
//
destroyOut(_this, row) {
_this.prescribeData = row
_this.prescribeData.busType = _this.$route.query.busType
_this.destroyType = 3
_this.destroyOutDialogVisible = true;
},
closeDialog() {
this.destroyOutDialogVisible = false
this.getList()
},
findWorkPlace(_this, val) {
let query = {
// chargeUser: _this.$store.getters.userId,
userIdFlag: true,
key: val,
page: 1,
limit: 10,
workPlaceClass:2
}
filterWorkOptimize(query)
.then((response) => {
_this.loading = false;
_this.options.findWorkPlace = response.data || [];
if (_this.options.findWorkPlace.length == 1) {
_this.filterQuery.workPlaceCode = _this.options.findWorkPlace[0].code;
_this.getWorkBindBusTypes(_this, _this.filterQuery.workPlaceCode)
}
})
.catch(() => {
_this.loading = false;
_this.options.findWorkPlace = [];
});
},
},
filters: {},
created() {
if (this.$route.query.workplaceId != null) {
this.isLinkDisabled = true
this.filterQuery.workPlaceCode = this.$route.query.workplaceId
this.showType = 2
}
this.findWorkPlace(this, "")
this.getWorkBindBusTypes(this, "")
getHead("ioSplitCode", "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>
.query-form-item {
margin-right: 5px;
margin-bottom: 6px;
}
</style>

@ -0,0 +1,63 @@
<template>
<div>
<!-- <el-tabs type="border-card" style="margin: 15px">
<el-tab-pane label="拆零库存">
<fifoPanel
style="margin: -15px"
:panelType="1"
:workPlaceCode="workPlaceCode"
></fifoPanel>
</el-tab-pane>
<el-tab-pane label="整取库存">
<fifoPanel
style="margin: -15px"
:panelType="2"
:workPlaceCode="workPlaceCode"
></fifoPanel>
</el-tab-pane>
</el-tabs>-->
<fifoPanel
:workPlaceCode="workPlaceCode"
></fifoPanel>
</div>
</template>
<script>
import fifoPanel from "./DevicesIoSplitFifoCodePanel";
export default {
name: "DevicesPrescribeTagCode",
components: {
fifoPanel
},
data() {
return {
isLinkDisabled: false,
workPlaceCode: null,
userInfo: {
inv: this.$store.getters.locInvName,
deptName: this.$store.getters.locDeptName,
userName: this.$store.getters.name,
companyName: this.$store.getters.companyName,
},
}
},
created() {
if (this.$route.query.workplaceId != null) {
this.isLinkDisabled = true
this.workPlaceCode = Number(this.$route.query.workplaceId);
}
}
}
</script>
<style scoped>
</style>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,145 @@
<template>
<div>
<el-form :model="formData" label-width="200px">
<el-row>
<el-col :span="10">
<el-form-item class="query-form-item" label="当前工位:">
<el-input v-model="formData.workPlaceName" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item class="query-form-item" label="产品名称:">
<el-input v-model="formData.cpmctymc" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item class="query-form-item" label="产品规格:">
<el-input v-model="formData.ggxh" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item class="query-form-item" label="批次号:">
<el-input v-model="formData.batchNo" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item class="query-form-item" label="业务类型:">
<el-input v-model="formData.busTypeName" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-divider></el-divider>
<el-row>
<el-col :span="10">
<el-form-item class="query-form-item" label="是否开启库存预警">
<el-select v-model="formData.enableRemind">
<el-option :value="true" label="开启"></el-option>
<el-option :value="false" label="关闭"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item class="query-form-item" label="库存预警数量:">
<el-input v-model="formData.invRemindCount" ></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click.native="addInvRemindSet()" :loading="formLoading"
>提交
</el-button>
<el-button @click.native="closeDialog">取消</el-button>
</div>
</div>
</template>
<script>
import {remindSet} from "@/api/inout/splitInv";
export default {
name: "DevicesIoSplitFifoCodeRemindSetDialog",
props: {
prescribeData: {
type: Object,
required: true
},
closeDialog: {
type: Function,
required: true
}
},
data() {
return {
formData: {
workPlaceName: null,
ggxh: null,
cpmctymc: null,
batchNo: null,
enableRemind:null,
invRemindCount:null,
id:null
},
formLoading: false
};
},
methods: {
getRemindSetInfo() {
this.formData = this.prescribeData;
if (this.prescribeData.monopoly == 0){
this.formData.busTypeName = '共享库存'
}else {
this.formData.busTypeName = this.prescribeData.busName
}
},
addInvRemindSet() {
this.formLoading = true
let param = {
id:this.formData.id,
enableRemind:this.formData.enableRemind,
invRemindCount:this.formData.invRemindCount
}
remindSet(param).then((res) => {
this.formLoading = false
if (res.code === 20000) {
this.closeDialog();
} else {
this.$message.error(res.message);
}
}).catch((error) => {
this.formLoading = false
this.$message.error(error.message);
this.closeDialog();
})
},
},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
},
created() {
this.getRemindSetInfo();
},
};
</script>
<style type="text/scss" lang="scss">
.dialog-footer {
display: flex;
justify-content: center;
margin-top: 20px;
}
</style>

@ -0,0 +1,495 @@
<template>
<div>
<el-card>
<el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form"
size="mini" 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' && executeEval(row,item.expression,true)"
class="query-form-item"
:label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc == '模糊查询' ? '产品通用名/规格/批次号' : 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 == 'select' && executeEval(row,item.expression,true)"
class="query-form-item"
:label="item.columnDesc+`:`">
<el-select v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
clearable>
<el-option
v-for="dict in item.lableRuleObj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)"
class="query-form-item"
: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)"
filterable
remote
: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"
/>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)"
class="query-form-item"
: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)"
class="query-form-item"
: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="left-search" v-if="!showSearch">-->
<!-- &lt;!&ndash; 关键字搜索 按需配置 &ndash;&gt;-->
<!-- <el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form" size="mini"-->
<!-- label-width="100px">-->
<!-- <el-row style=" display:flex; flex-wrap: wrap; ">-->
<!-- <template v-for="(item, index) in queryList">-->
<!-- <el-form-item-->
<!-- v-if="item.columnType == 'input' && executeEval(row,item.expression,true) && item.columnName == 'keywords'"-->
<!-- class="query-form-item"-->
<!-- :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>-->
<!-- </template>-->
<!-- </el-row>-->
<!-- </el-form>-->
<!-- </div>-->
<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(this)"
>查询
</el-button
>
<el-button type="primary" icon="el-icon-printer" @click="allExport()"
>导出上货推荐单
</el-button
>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%;" border highlight-current-row
@row-click="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)" ref="multipleTable"
:default-sort="defaultSort"
:row-style="{ height: '32px' }"
@sort-change="handleSortChange">
<template v-for="(item, index) in tableHeader">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
type="selection"
:width="item.width"
:selectable="(row,number) => executeFuc(row,'3',item.clickFuc)"
></el-table-column>
<el-table-column
v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{
item.lableRuleObj[scope.row[item.columnName]]
}}</span>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-tag
:type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])">
<span>{{
item.lableRuleObj ? item.lableRuleObj[scope.row[item.columnName]] : scope.row[item.columnName]
}}</span>
</el-tag>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:width="item.width"
:key="item.columnName"
fixed="right"
>
<template slot-scope="scope">
<el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj"
:type="buttonItem.type"
:size="buttonItem.size"
:style="buttonItem.style"
:key="buttonItem"
v-if="executeEval(scope.row,buttonItem.hasPermi,true)"
:disabled="executeEval(scope.row,buttonItem.disabledFuc,false)"
@click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)"
>{{ buttonItem.name }}
</el-button>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'text' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{
scope.row[item.columnName]
}}</span>
</template>
</el-table-column>
</template>
</el-table>
<pagination
v-show="total>0"
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="handleCurrentChange"
></pagination>
</el-card>
</div>
</template>
<script>
import {executeFuc, getHead} from "@/utils/customConfig";
import {convertDate} from "@/utils/date";
import {splitFifoPage,exportExcel} from "@/api/inout/splitInv";
import {getInvListByUserOptimize} from "@/api/system/invWarehouse";
import {filterWorkOptimize, listPage} from '@/api/basic/workPlace/sysWorkplaceManage'
import {getWorkBindBusTypes, removeBusTypeById} from '@/api/basic/workPlace/sysWorkplaceDocuments'
export default {
name: "DevicesIoSplitFifoRemind",
props: {
workPlaceCode: {
type: Number,
default: null,
required: true
},
},
data() {
return {
busQuery: {
busKey: '',
workplaceCode: null,
page: 1,
limit: 100
},
viewType: null,
isLinkDisabled: false,
//
//
tableHeader: [],
queryList: [],
tableObj: [],
fromList: [],
tableHeader4: [],
queryList4: [],
fromList4: [],
convertDateFun: convertDate,
//-------------end
options: {
getInvList: [],
getDeptList: [],
getBusType: [],
findWorkPlace: [],
},
showSearch: false,
filterQuery: {
busType: null,
fifoSplit: null,
workPlaceCode: null,
code: null,
billNo: null,
page: 1,
limit: 10,
remind: 'yj',
// key: null
},
defaultSort: {prop: 'createTime', order: 'desc'},
loading: false,
list: [],
total: 0,
resultQuery: {
billNo: null,
code: null,
page: 1,
limit: 10
},
currentRow: {},
resultTotal: 0,
resultDetailLoading: false,
resultDetailList: [],
}
},
components: {},
methods: {
allExport() {
exportExcel(this.filterQuery).then((response) => {
const currentDate = new Date().toISOString().slice(0, 10).replace(/-/g, ''); // YYYYMMDD
const filename = `上货推荐单_${currentDate}.xlsx`;
let blob = new Blob([response], {type: "application/vnd.ms-excel"});
let url = window.URL.createObjectURL(blob); // urlblob
let a = document.createElement("a");
a.download = filename;
a.href = url;
a.click();
this.$message.success("导出文件成功!")
})
},
changePlace(_this, query) {
_this.getWorkBindBusTypes(_this, query)
},
getWorkBindBusTypes(_this, query) {
_this.busQuery.workplaceCode = query
getWorkBindBusTypes(this.busQuery).then(res => {
if (res.code == 20000) {
let busTypes = res.data.list || [];
// _this.options.getWorkPlace = res.data.list || [];
let getWorkPlace = busTypes.map(busType => {
return {
code: busType.documentTypeCode,
label: busType.busName
};
});
_this.options.getBusType = getWorkPlace
if (_this.options.getBusType.length == 1) {
_this.filterQuery.busType = _this.options.getBusType[0].code
} else {
_this.filterQuery.busType = null
}
}
return
})
},
//------------
executeFuc(row, type, clickFuc, value) {
return executeFuc(this, row, type, clickFuc, value);
},
executeEval(row, expression, defaultRet) {
if (expression) {
return eval(expression);
}
return defaultRet;
},
handleSortChange(column, prop, order) {
if (column.order === 'descending') {
this.query.sort = 'desc'
} else {
this.query.sort = 'asc'
}
this.query.orderBy = column.prop;
this.getList();
},
///------------end
getInvList(_this) {
getInvListByUserOptimize()
.then((response) => {
_this.options.getInvList = response.data || [];
_this.getList();
})
.catch(() => {
});
},
hideSearch() {
this.showSearch = !this.showSearch;
},
onReset() {
this.filterQuery = {
fifoSplit: null,
workPlaceCode: null,
code: null,
billNo: null,
page: 1,
limit: 10,
remind: 'yj',
};
this.actDateRange = [];
this.getList();
},
onSubmit(_this) {
if (_this == null)
_this = this
_this.filterQuery.page = 1;
_this.getList();
},
getList() {
this.loading = true;
splitFifoPage(this.filterQuery).then(res => {
this.loading = false
this.list = res.data.list || []
this.total = res.data.total || 0
}).catch(() => {
this.loading = false
this.list = []
this.total = 0
})
},
handleCurrentChange(val) {
this.filterQuery.page = val.page;
this.getList();
},
getInputFocus(event) {
event.currentTarget.select();
},
enterKey(_this, event) {
_this.onSubmit();
},
findWorkPlace(_this, val) {
let query = {
// chargeUser: _this.$store.getters.userId,
userIdFlag: true,
key: val,
page: 1,
limit: 10,
workPlaceClass:2
}
filterWorkOptimize(query)
.then((response) => {
_this.loading = false;
_this.options.findWorkPlace = response.data || [];
if (_this.options.findWorkPlace.length == 1) {
_this.filterQuery.workPlaceCode = _this.options.findWorkPlace[0].code;
_this.getWorkBindBusTypes(_this, _this.filterQuery.workPlaceCode)
}
})
.catch(() => {
_this.loading = false;
_this.options.findWorkPlace = [];
});
},
},
created() {
if (this.$route.query.workplaceId != null) {
this.filterQuery.workPlaceCode = Number(this.$route.query.workplaceId)
this.viewType = 1
this.isLinkDisabled = true
}
this.findWorkPlace(this, "")
this.getWorkBindBusTypes(this, "")
getHead("ioSplitFifoRemind", "1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
this.getList();
});
this.filterQuery.workPlaceCode = this.workPlaceCode
}
}
</script>
<style scoped>
.query-form {
display: flex;
flex-wrap: wrap;
width: 100%;
}
.query-form-item {
margin-right: 5px;
margin-bottom: 6px;
}
</style>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,310 @@
<template>
<div>
<el-row :gutter="30">
<el-col :span="15"
style="border: 1px solid #e3dfe1; padding:15px; height: 400px; margin-left: 20px; overflow-y: scroll;">
<!-- <h2 style="font-weight: bold;">上货信息</h2>-->
<span style="font-weight: bold;font-size: 18px"> 上货信息</span>
<div v-for="(item, index) in detailList" :key="index" class="product-info">
<div class="info-item">
<p class="p-title">产品通用名 {{ item.coName }}</p>
<p class="p-title">制剂规格&nbsp;{{ item.prepnSpec }}</p>
<p class="p-title">包装规格&nbsp;{{ item.bzgg }}</p>
<!--<p class="p-title">产品标识: {{ item.nameCode }}</p>-->
<p class="p-title">批次号&nbsp;&nbsp;&nbsp;&nbsp;{{ item.batchNo }}</p>
<p class="p-title">生产日期&nbsp;{{ item.productDate }}</p>
<p class="p-title">失效日期&nbsp;{{ item.expireDate }}</p>
</div>
<div class="count-items">
<p class="p-title">扫码数量&nbsp; <span class="scan-count">{{ item.count }}</span></p>
<p class="p-title">实际数量&nbsp;<span class="actual-count">{{ item.reCount }}{{ item.prepnUnit }}</span></p>
</div>
</div>
</el-col>
<el-col :span="8" style="border: 1px solid #e3dfe1; margin-left: 20px; padding: 15px;height: 400px;">
<!-- <h2 style="font-weight: bold;">扫码明细({{ codeCount }})</h2>-->
<span style="font-weight: bold;font-size: 18px">扫码明细({{ codeCount }})</span>
<!--<el-divider></el-divider>-->
<div style=" border-top: 1px solid #ccc;margin-top: 3px">
<el-table v-loading="loading" :data="codeArray" style="width: 100%; margin-top: 20px" max-height="280px"
ref="multipleTable">
<!-- <el-table-column-->
<!-- type="selection"-->
<!-- width="55">-->
<!-- </el-table-column>-->
<el-table-column label="序号" type="index" width="55" style="text-align: right;">
</el-table-column>
<el-table-column
label="追溯码"
prop="code"
show-overflow-tooltip
style="text-align: right;">
<template slot-scope="scope">
<div style="font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
{{ scope.row.code }}
</div>
</template>
</el-table-column>
<!-- <el-table-column label="操作" width="100" fixed="right">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="deleteCode(scope.$index, scope.row)"-->
<!-- >减一-->
<!-- </el-button-->
<!-- >-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="editCode(scope.row)"-->
<!-- >编辑-->
<!-- </el-button-->
<!-- >-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
</div>
</el-col>
</el-row>
<el-dialog
title="编辑条码"
:visible.sync="editCodeVisible"
append-to-body width="70%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="editCodeVisible"
>
<editCodeDialog
editType="2"
:closeCodeDialog="closeCodeDialog"
:codeDetail="codeDetail">
</editCodeDialog>
</el-dialog>
</div>
</template>
<script>
import {convertDate} from "@/utils/date";
import {getCheckDetailCodes, getDetailCodes, updateBizProduct, updateCodeProduct} from '@/api/inout/orderDetailCode'
import {deleteCodesTempById, errorCodeList} from '@/api/inout/order'
import editCodeDialog from "@/views/inout/DialogEditCode";
export default {
name: "DevicesNewCreateCodeDetail",
props: {
idQuery: {
type: Object,
required: true,
},
viewType: {
type: Object,
required: true,
},
curAction: {
type: Object,
required: true,
},
status: {
type: Object,
required: true,
},
},
components: {editCodeDialog},
data() {
return {
convertDateFun: convertDate,
loading: false,
query: {
orderId: null,
code: "",
corpOrderId: "",
},
detailList: [],
total: 0,
selectRlVisible: false,
dialogTableVisible: false,
editCodeVisible: false,
orderDetail: null,
codeArray: [],
codeCount: 0,
codeDetail: null,
}
},
watch: {
"curAction": {
handler(newVal, oldVal) {
},
immediate: true
}
},
methods: {
getOrderDetails() {
this.loading = true;
this.query.orderId = this.idQuery.billNo;
getDetailCodes(this.query) //
.then((response) => {
this.detailList = response.data.list || [];
this.total = response.data.total || 0;
this.loading = false;
if (this.detailList.length > 0 && this.status == false) {
this.orderDetail = this.detailList[0]
this.$emit('getOrderData', this.orderDetail)
}
this.$emit('clearBillNo', this.detailList.length > 0 ? false : true);
let count = 0;
if (this.detailList && this.detailList.length > 0) {
this.detailList.forEach(item => {
count += item.reCount;
});
this.$emit('getCount', count);
} else {
this.$emit('getCount', count);
}
})
.catch(() => {
this.loading = false;
this.detailList = [];
this.total = 0;
});
},
rowStyle({row, rowIndex}) {
let rowBackground = {};
if (this.viewType == 3 && !row.checkSuccess) {
rowBackground.color = '#f60303';
}
return rowBackground;
},
saveChange(row) {
if (row.batchNo == '') {
row.batchNo = null;
}
updateCodeProduct(row)
.then((response) => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("保存成功!");
this.selectedIndex = null;
this.refreshPanel();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.dataList = [];
this.pageTotal = 0;
});
},
rowChange(val) {
this.currentRow = val;
if (this.currentRow.batchNo == '')
this.currentRow.batchNo = null;
this.selectedIndex = val.index;
},
getCodeList() {
this.loading = true;
this.query.orderId = this.idQuery.billNo
errorCodeList(this.query) //
.then((response) => {
this.codeArray = response.data.list || [];
this.codeCount = this.codeArray.length
this.loading = false;
})
.catch(() => {
this.loading = false;
});
},
deleteCode(index, row) {
this.$confirm("是否确定移除一个条码?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
let tQuery = {
id: row.id
}
deleteCodesTempById(tQuery)
.then((response) => {
if (response.code === 20000) {
this.getOrderDetails();
this.getCodeList()
} else {
this.$message.error(response.message);
}
});
}).catch(() => {
});
},
editCode(row) {
this.codeDetail = row;
this.editCodeVisible = true;
},
closeCodeDialog() {
this.editCodeVisible = false;
this.getOrderDetails();
this.getCodeList()
},
},
created() {
if (this.idQuery.billNo != null)
this.getOrderDetails();
this.getCodeList()
},
}
</script>
<style scoped>
.product-info {
display: flex;
justify-content: space-between;
border-top: 1px solid #ccc;
align-items: center;
padding: 10px;
margin-top: 3px;
margin-bottom: 10px;
}
.info-item {
flex: 1;
}
.count-items {
flex: 0 0 auto; /* This ensures that count items do not grow or shrink */
}
.count-item {
margin: 0; /* Remove default margin */
}
.scan-count {
color: red;
font-size: 65px;
font-weight: bold; /* 添加这行代码,使字体加粗 */
}
.actual-count {
color: green;
font-size: 38px;
}
.p-title {
font-size: 18px;
}
</style>

@ -0,0 +1,344 @@
<template>
<div>
<el-table v-loading="codeLoading" :data="codeDetailList" style="width: 100%" :row-style="{height:'32px'}" border>
<template v-for="(item, index) in tableHeader2">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
type="selection"
:width="item.width"
:selectable="(row,number) => executeFuc(row,'3',item.clickFuc)"
></el-table-column>
<el-table-column
v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{
item.lableRuleObj[scope.row[item.columnName]]
}}</span>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-tag
:type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])">
<span>{{
item.lableRuleObj ? item.lableRuleObj[scope.row[item.columnName]] : scope.row[item.columnName]
}}</span>
</el-tag>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:width="item.width"
:key="item.columnName"
fixed="right"
>
<template slot-scope="scope">
<el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj"
:type="buttonItem.type"
:size="buttonItem.size"
:style="buttonItem.style"
:key="buttonItem"
v-if="executeEval(scope.row,buttonItem.hasPermi,true)"
:disabled="executeEval(scope.row,buttonItem.disabledFuc,false)"
@click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)"
>{{ buttonItem.name }}
</el-button>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'text' && !(item.columnName == 'productDate' || item.columnName == 'expireDate') && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{
scope.row[item.columnName]
}}</span>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'text' && (item.columnName == 'productDate' || item.columnName == 'expireDate') && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{
convertDateFun(scope.row[item.columnName])
}}</span>
</template>
</el-table-column>
</template>
</el-table>
<pagination
v-show="codeTotal>0"
:total="codeTotal"
:limit.sync="codeQuery.limit"
:page.sync="codeQuery.page"
@pagination="getList"
></pagination>
</div>
</template>
<script>
import {convertDate} from "@/utils/date";
import {executeFuc, getHead} from "@/utils/customConfig";
import {autoCodeDetail, autoCodeResult, manualCodeDetail, codeRemove} from "@/api/collect/collectOrder";
export default {
/**
* 手动扫码
*/
name: "DevicesPanelOrderManuTagCode",
props: {
refreshPanel: {
type: Function,
required: true,
},
closeScanDialog: {
type: Function,
required: true,
},
prescribeData: {
type: Object,
default: null,
required: true
},
bizId: {
type: Object,
default: null,
required: true
},
//1:2:;3
fifoSplit: {
type: Object,
default: null,
required: true
},
},
data() {
return {
//
//
tableHeader2: [],
queryList2: [],
tableObj2: [],
fromList2: [],
convertDateFun: convertDate,
//-------------end
codeLoading: false,
codeDetailList: [],
codeTotal: 0,
codeQuery: {
fifoSplit: null,
page: 1,
limit: 10,
},
splitType: true,
}
},
methods: {
deleteMan(_this, row) {
_this.$confirm("是否确定删除该条扫码?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
_this.loading = true;
_this.codeRemoveMan(row.id, 2);
})
},
deleteCode(_this, row) {
_this.$confirm("是否确定移除一个条码?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
_this.loading = true;
_this.codeRemoveMan(row.id, 1);
})
},
codeRemoveMan(codeManId, delType) {
let post = {
codeManId: codeManId,
delType: delType
}
codeRemove(post).then((response) => {
if (response.code === 20000) {
this.$message.success("操作成功!");
// this.refreshPanel(this)
this.getList();
this.closeScanDialog()
} else {
this.$message.error(response.message);
}
this.loading = false;
}).catch(() => {
this.loading = false;
})
},
//------------
executeFuc(row, type, clickFuc, value) {
return executeFuc(this, row, type, clickFuc, value);
},
executeEval(row, expression, defaultRet) {
if (expression) {
return eval(expression);
}
return defaultRet;
},
handleSortChange(column, prop, order) {
if (column.order === 'descending') {
this.query.sort = 'desc'
} else {
this.query.sort = 'asc'
}
this.query.orderBy = column.prop;
this.getList();
},
///------------end
getList() {
if (this.prescribeData == null)
return
if (this.prescribeData != null) {
// this.codeQuery.page = 1
this.codeQuery.orderIdFk = this.prescribeData.billNo
this.codeQuery.bizIdFk = this.bizId
}
this.codeLoading = true;
if (this.fifoSplit == 3) {
manualCodeDetail(this.codeQuery).then(res => {
this.codeLoading = false
if (res.code != 20000) {
this.$message.error(res.message)
return
}
this.codeDetailList = res.data.list
this.codeTotal = res.data.total || 0
this.codeLoading = false
}).catch(() => {
this.codeLoading = false
this.codeTotal = res.data.total || 0
this.$message.error("数据加载失败")
})
} else {
this.codeQuery.fifoSplit = this.fifoSplit
autoCodeResult(this.codeQuery).then(res => {
this.codeLoading = false
if (res.code != 20000) {
this.$message.error(res.message)
return
}
this.codeDetailList = res.data.list
this.codeTotal = res.data.total || 0
this.codeLoading = false
}).catch(() => {
this.codeLoading = false
this.$message.error("数据加载失败")
})
}
},
codeHandleCurrentChange(val) {
this.filterQuery.page = val.page;
this.getCodeDetail(this, null);
},
rowStyle({row, rowIndex}) {
let rowBackground = {};
if (row.count != row.scanCount) {
rowBackground.color = '#f60303';
}
rowBackground.height = "32px"
return rowBackground;
},
/**
* 扫码减一
*/
removeOneDialog() {
//todo
},
/**
* 删除条码
*/
deleteDialog() {
//todo
},
},
created() {
if (this.fifoSplit == 2 || this.fifoSplit == 1) {
this.splitType = false
}
if (this.tableHeader2 == null || this.tableHeader2.length == 0) {
getHead("PanelOrderManuTagCode", "1").then((re) => {
//
this.tableObj2 = re.data;
this.tableHeader2 = re.data.tableList;
this.queryList2 = re.data.queryList;
this.fromList2 = re.data.fromList;
this.getList();
});
} else {
this.getList();
}
}
}
</script>
<style scoped>
</style>

@ -0,0 +1,274 @@
<template>
<div>
<el-table v-loading="codeLoading" :data="codeDetailList" style="width: 100%" :row-style="{height:'38px'}" border>
<template v-for="(item, index) in tableHeader2">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
type="selection"
:width="item.width"
:selectable="(row,number) => executeFuc(row,'3',item.clickFuc)"
></el-table-column>
<el-table-column
v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{
item.lableRuleObj[scope.row[item.columnName]]
}}</span>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-tag
:type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])">
<span>{{
item.lableRuleObj ? item.lableRuleObj[scope.row[item.columnName]] : scope.row[item.columnName]
}}</span>
</el-tag>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:width="item.width"
:key="item.columnName"
fixed="right"
>
<template slot-scope="scope">
<el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj"
:type="buttonItem.type"
:size="buttonItem.size"
:style="buttonItem.style"
:key="buttonItem"
v-if="executeEval(scope.row,buttonItem.hasPermi,true)"
:disabled="executeEval(scope.row,buttonItem.disabledFuc,false)"
@click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)"
>{{ buttonItem.name }}
</el-button>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'text' && !(item.columnName == 'productDate' || item.columnName == 'expireDate') && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{
scope.row[item.columnName]
}}</span>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'text' && (item.columnName == 'productDate' || item.columnName == 'expireDate') && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{
convertDateFun(scope.row[item.columnName])
}}</span>
</template>
</el-table-column>
</template>
</el-table>
<pagination
v-show="codeTotal>0"
:total="codeTotal"
:limit.sync="codeQuery.limit"
:page.sync="codeQuery.page"
@pagination="codeHandleCurrentChange"
></pagination>
</div>
</template>
<script>
import {convertDate} from "@/utils/date";
import {executeFuc, getHead} from "@/utils/customConfig";
import {autoCodeDetail, autoCodeResult, manualCodeDetail} from "@/api/collect/collectOrder";
export default {
/**
* 处方赋码明细
*/
name: "DevicesPrescribeCodePanel",
props: {
prescribeData: {
type: Object,
default: null,
required: true
},
//1:2:;3
fifoSplit: {
type: Object,
default: null,
required: true
},
},
data() {
return {
//
//
tableHeader2: [],
queryList2: [],
tableObj2: [],
fromList2: [],
convertDateFun: convertDate,
//-------------end
codeLoading: false,
codeDetailList: [],
codeTotal: 0,
codeQuery: {
fifoSplit: null,
page: 1,
limit: 10,
},
splitType: true,
}
},
methods: {
//------------
executeFuc(row, type, clickFuc, value) {
return executeFuc(this, row, type, clickFuc, value);
},
executeEval(row, expression, defaultRet) {
if (expression) {
return eval(expression);
}
return defaultRet;
},
handleSortChange(column, prop, order) {
if (column.order === 'descending') {
this.query.sort = 'desc'
} else {
this.query.sort = 'asc'
}
this.query.orderBy = column.prop;
this.getList(this);
},
///------------end
getList(_this) {
if (_this.prescribeData == null)
return
if (_this.prescribeData != null) {
_this.codeQuery.page = 1
_this.codeQuery.orderIdFk = this.prescribeData.billNo
}
_this.codeLoading = true;
if (_this.fifoSplit == 3) {
manualCodeDetail(_this.codeQuery).then(res => {
_this.codeLoading = false
if (res.code != 20000) {
_this.$message.error(res.message)
return
}
_this.codeDetailList = res.data.list
_this.codeLoading = false
}).catch(() => {
_this.codeLoading = false
_this.$message.error("数据加载失败")
})
} else {
_this.codeQuery.fifoSplit = this.fifoSplit
autoCodeResult(_this.codeQuery).then(res => {
_this.codeLoading = false
if (res.code != 20000) {
_this.$message.error(res.message)
return
}
_this.codeDetailList = res.data.list
_this.codeLoading = false
}).catch(() => {
_this.codeLoading = false
_this.$message.error("数据加载失败")
})
}
},
codeHandleCurrentChange(val) {
this.filterQuery.page = val.page;
this.getCodeDetail(this, null);
},
rowStyle({row, rowIndex}) {
let rowBackground = {};
if (row.count != row.scanCount) {
rowBackground.color = '#f60303';
}
rowBackground.height = "32px"
return rowBackground;
},
},
created() {
if (this.fifoSplit == 2 || this.fifoSplit == 1) {
this.splitType = false
}
if (this.tableHeader2 == null || this.tableHeader2.length == 0) {
getHead("prescribePanel-2", "1").then((re) => {
//
this.tableObj2 = re.data;
this.tableHeader2 = re.data.tableList;
this.queryList2 = re.data.queryList;
this.fromList2 = re.data.fromList;
this.getList(this);
});
} else {
this.getList(this);
}
}
}
</script>
<style scoped>
</style>
Loading…
Cancel
Save