1、工位上货页面搬移一份新的器械用
parent
626b37edee
commit
83cb777212
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">-->
|
||||
<!-- <!– 关键字搜索 按需配置 –>-->
|
||||
<!-- <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,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">-->
|
||||
<!-- <!– 关键字搜索 按需配置 –>-->
|
||||
<!-- <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); // 创建一个临时的url指向blob对象
|
||||
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
Loading…
Reference in New Issue