8*31 优化

20240912_adapter_z
wangwei 7 months ago
parent 4500b55b94
commit 37d5980355

@ -156,6 +156,14 @@
</el-row> </el-row>
<el-row :gutter="24" class="el-row"> <el-row :gutter="24" class="el-row">
<el-col :span="12" class="el-col">
<el-form-item label="独占工位库存:" prop="warnType" class="query-form-item">
<el-select v-model="formData.monopoly" style="width: 80%" placeholder="独占工位库存">
<el-option label="否" :value="0"></el-option>
<el-option label="是" :value="1"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col"> <el-col :span="12" class="el-col">
<el-form-item label="往来类型标题:" prop="unitTittle" class="query-form-item"> <el-form-item label="往来类型标题:" prop="unitTittle" class="query-form-item">
<el-input <el-input
@ -253,6 +261,7 @@ export default {
warnType: 2, warnType: 2,
workplaceType: 3, workplaceType: 3,
autoTag: 0, autoTag: 0,
monopoly: 0,
}, },
invList: [], invList: [],
busTypes: [], busTypes: [],

@ -210,7 +210,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="单据类型" prop="thrBusName" width="140"></el-table-column> <el-table-column label="单据类型" prop="thrBusName" width="140"></el-table-column>
<el-table-column label="工位类型" prop="workplaceType" width="90"> <el-table-column label="作业类型" prop="workplaceType" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ workplaceTypeMap[scope.row.workplaceType] }}</span> <span>{{ workplaceTypeMap[scope.row.workplaceType] }}</span>
</template> </template>
@ -220,6 +220,11 @@
<span>{{ autoTagTypes[scope.row.autoTag] }}</span> <span>{{ autoTagTypes[scope.row.autoTag] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="独占库存" prop="monopoly" width="90">
<template slot-scope="scope">
<span>{{ monopolys[scope.row.monopoly] }}</span>
</template>
</el-table-column>
<el-table-column label="计量单位 " prop="orderCirType" width="100"> <el-table-column label="计量单位 " prop="orderCirType" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ orderCirTypes[scope.row.orderCirType] }}</span> <span>{{ orderCirTypes[scope.row.orderCirType] }}</span>
@ -774,6 +779,10 @@ export default {
1: '是', 1: '是',
0: '否' 0: '否'
}, },
monopolys: {
1: '是',
0: '否'
},
corpTypeMap: { corpTypeMap: {
1: '客户', 1: '客户',
2: '供应商', 2: '供应商',

@ -2,8 +2,9 @@
<div> <div>
<el-card> <el-card>
<el-form v-if="queryList && queryList.length > 0 && showSearch" :model="filterQuery" class="query-form" <el-form v-if="queryList && queryList.length > 0 && showSearch" :model="filterQuery" class="query-form"
size="mini" label-width="100px"> size="mini" label-width="100px"
<el-col :span="20"> >
<el-col :span="20">
<el-form-item prop="code" label="扫描追溯码:"> <el-form-item prop="code" label="扫描追溯码:">
<el-input <el-input
ref="inputRef" ref="inputRef"
@ -15,85 +16,93 @@
clearable clearable
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<template v-for="(item, index) in queryList"> <template v-for="(item, index) in queryList">
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" <el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)"
class="query-form-item" class="query-form-item"
:label="item.columnDesc+`:`" :key="item.id"> :label="item.columnDesc+`:`" :key="item.id"
<el-input >
v-model="filterQuery[item.columnName]" <el-input
:placeholder="item.columnDesc" v-model="filterQuery[item.columnName]"
:disabled="executeEval(null,item.disabledFuc,false)" :placeholder="item.columnDesc"
@keyup.enter.native="executeFuc($event,'5',item.clickFuc)" :disabled="executeEval(null,item.disabledFuc,false)"
clearable @keyup.enter.native="executeFuc($event,'5',item.clickFuc)"
></el-input> clearable
</el-form-item> ></el-input>
<el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)" </el-form-item>
class="query-form-item" <el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`"> class="query-form-item"
<el-select v-model="filterQuery[item.columnName]" :label="item.columnDesc+`:`"
:placeholder="item.columnDesc" >
:disabled="executeEval(null,item.disabledFuc,false)" <el-select v-model="filterQuery[item.columnName]"
clearable> :placeholder="item.columnDesc"
<el-option :disabled="executeEval(null,item.disabledFuc,false)"
v-for="dict in item.lableRuleObj" clearable
:key="dict.value" >
:label="dict.label" <el-option
:value="dict.value" v-for="dict in item.lableRuleObj"
/> :key="dict.value"
</el-select> :label="dict.label"
</el-form-item> :value="dict.value"
<el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)" />
class="query-form-item" </el-select>
:label="item.columnDesc+`:`"> </el-form-item>
<el-select <el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)"
v-model="filterQuery[item.columnName]" class="query-form-item"
:placeholder="item.columnDesc" :label="item.columnDesc+`:`"
@change="executeFuc($event,'5',item.checkRules)" >
:disabled="executeEval(null,item.disabledFuc,false)" <el-select
filterable v-model="filterQuery[item.columnName]"
remote :placeholder="item.columnDesc"
:remote-method="(query) => executeFuc(query,'5',item.clickFuc)" @change="executeFuc($event,'5',item.checkRules)"
clearable> :disabled="executeEval(null,item.disabledFuc,false)"
<el-option filterable
v-for="item in options[item.clickFuc]" remote
:key="item.code" :remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
:label="item.label" clearable
:value="item.code" >
/> <el-option
</el-select> v-for="item in options[item.clickFuc]"
</el-form-item> :key="item.code"
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" :label="item.label"
class="query-form-item" :value="item.code"
:label="item.columnDesc+`:`"> />
<el-date-picker </el-select>
:picker-options="pickerOptions" </el-form-item>
v-model="actDateRange" <el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)"
type="daterange" class="query-form-item"
format="yyyy 年 MM 月 dd 日" :label="item.columnDesc+`:`"
value-format="yyyy-MM-dd" >
range-separator="至" <el-date-picker
start-placeholder="开始日期" :picker-options="pickerOptions"
end-placeholder="结束日期" v-model="actDateRange"
></el-date-picker> type="daterange"
</el-form-item> format="yyyy 年 MM 月 dd 日"
<el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)" value-format="yyyy-MM-dd"
class="query-form-item" range-separator="至"
:label="item.columnDesc+`:`"> start-placeholder="开始日期"
<el-date-picker end-placeholder="结束日期"
v-model="filterQuery[item.columnName]" ></el-date-picker>
:style="`width:${item.width+'px'}`" </el-form-item>
value-format="yyyy-MM-dd" <el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)"
:disabled="executeEval(null,item.disabledFuc,false)" class="query-form-item"
type="date" :label="item.columnDesc+`:`"
:placeholder="item.columnDesc" >
></el-date-picker> <el-date-picker
</el-form-item> v-model="filterQuery[item.columnName]"
</template> :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>
</template>
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
<el-button-group> <el-button-group>
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button> <!--<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>-->
<el-button <el-button
type="primary" type="primary"
icon="el-icon-refresh" icon="el-icon-refresh"
@ -106,117 +115,123 @@
> >
</el-button-group> </el-button-group>
</div> </div>
<el-divider style="margin: 15px"></el-divider> <el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%;" border highlight-current-row <div v-if="false">
@row-click="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)" ref="multipleTable" <el-table v-loading="loading" :data="list" style="width: 100%;" border highlight-current-row
:default-sort="defaultSort" @row-click="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)" ref="multipleTable"
:row-style="{ height: '32px' }" :default-sort="defaultSort"
@selection-change="handleSelectionChange" :row-style="{ height: '32px' }"
@sort-change="handleSortChange"> @selection-change="handleSelectionChange"
<template v-for="(item, index) in tableHeader"> @sort-change="handleSortChange"
<el-table-column >
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)" <template v-for="(item, index) in tableHeader">
type="index" :label="item.columnDesc"></el-table-column> <el-table-column
<el-table-column v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
v-if="item.columnType == 'selection'" type="index" :label="item.columnDesc"
type="selection" ></el-table-column>
:width="item.width" <el-table-column
:selectable="(row,number) => executeFuc(row,'3',item.clickFuc)" v-if="item.columnType == 'selection'"
></el-table-column> type="selection"
:width="item.width"
:selectable="(row,number) => executeFuc(row,'3',item.clickFuc)"
></el-table-column>
<el-table-column <el-table-column
v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)" v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
:prop="item.columnName" :prop="item.columnName"
:label="item.columnDesc" :label="item.columnDesc"
:sortable="item.sort" :sortable="item.sort"
:width="item.width" :width="item.width"
:show-overflow-tooltip="item.tooltip" :show-overflow-tooltip="item.tooltip"
:key="item.columnName" :key="item.columnName"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio> <el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)" v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
:prop="item.columnName" :prop="item.columnName"
:label="item.columnDesc" :label="item.columnDesc"
:sortable="item.sort" :sortable="item.sort"
:width="item.width" :width="item.width"
:show-overflow-tooltip="item.tooltip" :show-overflow-tooltip="item.tooltip"
:key="item.columnName" :key="item.columnName"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{ <span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{
item.lableRuleObj[scope.row[item.columnName]] item.lableRuleObj[scope.row[item.columnName]]
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)" v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
:prop="item.columnName" :prop="item.columnName"
:label="item.columnDesc" :label="item.columnDesc"
:sortable="item.sort" :sortable="item.sort"
:width="item.width" :width="item.width"
:show-overflow-tooltip="item.tooltip" :show-overflow-tooltip="item.tooltip"
:key="item.columnName" :key="item.columnName"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag <el-tag
:type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])"> :type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])"
>
<span>{{ <span>{{
item.lableRuleObj ? item.lableRuleObj[scope.row[item.columnName]] : scope.row[item.columnName] item.lableRuleObj ? item.lableRuleObj[scope.row[item.columnName]] : scope.row[item.columnName]
}}</span> }}</span>
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
v-if="item.columnType == 'button' && executeEval(row,item.expression,true)" v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"
:prop="item.columnName" :prop="item.columnName"
:label="item.columnDesc" :label="item.columnDesc"
:width="item.width" :width="item.width"
:key="item.columnName" :key="item.columnName"
fixed="right" fixed="right"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj" <el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj"
:type="buttonItem.type" :type="buttonItem.type"
:size="buttonItem.size" :size="buttonItem.size"
:style="buttonItem.style" :style="buttonItem.style"
:key="buttonItem" :key="buttonItem"
v-if="executeEval(scope.row,buttonItem.hasPermi,true)" v-if="executeEval(scope.row,buttonItem.hasPermi,true)"
:disabled="executeEval(scope.row,buttonItem.disabledFuc,false)" :disabled="executeEval(scope.row,buttonItem.disabledFuc,false)"
@click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)" @click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)"
>{{ buttonItem.name }} >{{ buttonItem.name }}
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
v-if="item.columnType == 'text' && executeEval(row,item.expression,true)" v-if="item.columnType == 'text' && executeEval(row,item.expression,true)"
:prop="item.columnName" :prop="item.columnName"
:label="item.columnDesc" :label="item.columnDesc"
:sortable="item.sort" :sortable="item.sort"
:width="item.width" :width="item.width"
:show-overflow-tooltip="item.tooltip" :show-overflow-tooltip="item.tooltip"
:key="item.columnName" :key="item.columnName"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{ <span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{
scope.row[item.columnName] scope.row[item.columnName]
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
:limit.sync="filterQuery.limit" :limit.sync="filterQuery.limit"
:page.sync="filterQuery.page" :page.sync="filterQuery.page"
@pagination="handleCurrentChange" @pagination="handleCurrentChange"
></pagination> ></pagination>
</div>
</el-card> </el-card>
<el-dialog <el-dialog
@ -234,14 +249,15 @@
</template> </template>
<script> <script>
import {executeFuc, getHead} from "@/utils/customConfig"; import { executeFuc, getHead } from '@/utils/customConfig'
import {convertDate} from "@/utils/date";; import { convertDate } from '@/utils/date'
import {deleteByOrder, orderPage} from "@/api/collect/collectOrder";
import { deleteByOrder, orderPage } from '@/api/collect/collectOrder'
import { filterWorkOptimize } from '@/api/basic/workPlace/sysWorkplaceManage' import { filterWorkOptimize } from '@/api/basic/workPlace/sysWorkplaceManage'
import { IoCollectCodePage } from '@/api/collect/IoCollectCodeSelect' import { IoCollectCodePage } from '@/api/collect/IoCollectCodeSelect'
export default { export default {
name: "IoCollectCodeSelect", name: 'IoCollectCodeSelect',
data() { data() {
return { return {
// //
@ -256,9 +272,9 @@ export default {
showSearch: true, showSearch: true,
filterQuery: { filterQuery: {
page: 1, page: 1,
limit: 10, limit: 10
}, },
defaultSort: {prop: 'createTime', order: 'desc'}, defaultSort: { prop: 'createTime', order: 'desc' },
loading: false, loading: false,
list: [], list: [],
total: 0, total: 0,
@ -269,7 +285,7 @@ export default {
preQuery: { preQuery: {
prescribeCode: null, prescribeCode: null,
page: 1, page: 1,
limit: 10, limit: 10
}, },
preDiLoading: false, preDiLoading: false,
@ -278,7 +294,7 @@ export default {
preDiQuery: { preDiQuery: {
prescribeCode: null, prescribeCode: null,
page: 1, page: 1,
limit: 10, limit: 10
}, },
curRow: null, curRow: null,
@ -286,32 +302,32 @@ export default {
multiplePreSelection: [], multiplePreSelection: [],
timer: null, // timer: null, //
options: { options: {
findWorkPlace: [], findWorkPlace: []
}, },
checkDetailVisible: false checkDetailVisible: false
} }
}, },
methods: { methods: {
// //
timerAuto() { // timerAuto() {
// // //
this.timer = setInterval(() => { // this.timer = setInterval(() => {
// // //
this.getList() // this.getList()
}, 10000) // }, 10000)
//
// // //
// clearInterval(this.timer) // // clearInterval(this.timer)
}, // },
//------------ //------------
executeFuc(row, type, clickFuc, value) { executeFuc(row, type, clickFuc, value) {
return executeFuc(this, row, type, clickFuc, value); return executeFuc(this, row, type, clickFuc, value)
}, },
executeEval(row, expression, defaultRet) { executeEval(row, expression, defaultRet) {
if (expression) { if (expression) {
return eval(expression); return eval(expression)
} }
return defaultRet; return defaultRet
}, },
handleSortChange(column, prop, order) { handleSortChange(column, prop, order) {
if (column.order === 'descending') { if (column.order === 'descending') {
@ -319,30 +335,31 @@ export default {
} else { } else {
this.query.sort = 'asc' this.query.sort = 'asc'
} }
this.query.orderBy = column.prop; this.query.orderBy = column.prop
this.getList(); this.getList()
}, },
///------------end ///------------end
hideSearch() { hideSearch() {
this.showSearch = !this.showSearch; this.showSearch = !this.showSearch
}, },
onReset() { onReset() {
this.filterQuery = {}; this.filterQuery = {}
this.actDateRange = []; this.actDateRange = []
this.getList(); this.getList()
}, },
closeDialog() { closeDialog() {
this.bindWorkPlaceVisible = false; this.bindWorkPlaceVisible = false
this.getList(); this.getList()
}, },
onSubmit() { onSubmit() {
this.filterQuery.page = 1; this.filterQuery.page = 1
this.getList(); // let h = this.hasOtherProperties(this.filterQuery)
this.getList()
}, },
getList() { getList() {
this.loading = true; this.loading = true
IoCollectCodePage(this.filterQuery).then(res => { IoCollectCodePage(this.filterQuery).then(res => {
this.loading = false this.loading = false
this.list = res.data.list || [] this.list = res.data.list || []
@ -354,26 +371,26 @@ export default {
}) })
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.filterQuery.page = val.page; this.filterQuery.page = val.page
this.getList(); this.getList()
}, },
deleteDialog(_this, row) { deleteDialog(_this, row) {
_this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", { _this.$confirm('此操作将永久删除该订单, 是否继续?', '提示', {
confirmButtonText: "确定", confirmButtonText: '确定',
cancelButtonText: "取消", cancelButtonText: '取消',
type: "warning", type: 'warning'
}) })
.then(() => { .then(() => {
}) })
.catch(() => { .catch(() => {
}); })
}, },
handleCheckDetail(_this, row){ handleCheckDetail(_this, row) {
_this.checkDetailVisible = true _this.checkDetailVisible = true
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multiplePreSelection = val; this.multiplePreSelection = val
}, },
findWorkPlace(_this, val) { findWorkPlace(_this, val) {
@ -381,47 +398,58 @@ export default {
chargeUser: _this.$store.getters.adminId, chargeUser: _this.$store.getters.adminId,
key: val, key: val,
page: 1, page: 1,
limit: 10, limit: 10
} }
filterWorkOptimize(query) filterWorkOptimize(query)
.then((response) => { .then((response) => {
_this.loading = false; _this.loading = false
_this.options.findWorkPlace = response.data || []; _this.options.findWorkPlace = response.data || []
if (_this.options.findWorkPlace .length == 1){ if (_this.options.findWorkPlace.length == 1) {
_this.filterQuery.workPlaceCode = _this.options.findWorkPlace[0].code; _this.filterQuery.workPlaceCode = _this.options.findWorkPlace[0].code
} }
}) })
.catch(() => { .catch(() => {
_this.loading = false; _this.loading = false
_this.options.findWorkPlace = []; _this.options.findWorkPlace = []
}); })
}, },
getInputFocus(event) { getInputFocus(event) {
event.currentTarget.select(); event.currentTarget.select()
}, },
enterKey(event) { enterKey(event) {
this.getList() this.getList()
this.$refs.inputRef.select(); this.$refs.inputRef.select()
}, },
hasOtherProperties(filterQuery) {
//
const keys = Object.keys(filterQuery)
//
const knownKeys = ['page', 'limit']
//
const otherKeys = keys.filter(key => !knownKeys.includes(key))
// truefalse
return otherKeys.length > 0
}
}, },
mounted() { mounted() {
}, },
created() { created() {
getHead("IoCollectCodeSelect", "1").then((re) => { getHead('IoCollectCodeSelect', '1').then((re) => {
// //
this.tableObj = re.data; this.tableObj = re.data
this.tableHeader = re.data.tableList; this.tableHeader = re.data.tableList
this.queryList = re.data.queryList; this.queryList = re.data.queryList
this.fromList = re.data.fromList; this.fromList = re.data.fromList
this.getList(); // this.getList()
this.findWorkPlace(this,""); this.findWorkPlace(this, '')
}); })
this.timerAuto() // this.timerAuto()
}, },
destroyed() { destroyed() {
clearInterval(this.timer) clearInterval(this.timer)
}, }
} }
</script> </script>

@ -429,6 +429,204 @@
@pagination="getResultDetailList" @pagination="getResultDetailList"
/> />
</el-tab-pane> </el-tab-pane>
<el-tab-pane>
<span slot="label"> {{ currentRow.cpmctymc }}-拆零明细</span>
<el-form v-if="queryList5 && queryList5.length > 0" :inline="true" :model="resultQuery" class="query-form"
size="mini">
<el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList5">
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="codeQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
@keyup.enter.native="executeFuc($event,'5',item.clickFuc)"
clearable
></el-input>
</el-form-item>
<el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`">
<el-select v-model="codeQuery[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)"
:label="item.columnDesc+`:`">
<el-select
v-model="codeQuery[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)"
:label="item.columnDesc+`:`">
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`">
<el-date-picker
v-model="codeQuery[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>
</template>
</el-row>
<el-form-item>
<el-button-group>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onCodeResultReset"
>重置
</el-button>
<el-button type="primary" @click="onCodeResultSubmit"
icon="el-icon-search"
>查询
</el-button
>
</el-button-group>
</el-form-item>
</el-form>
<el-table v-loading="resultDetailLoading" :data="apartDetailList" style="width: 100%" border
row-key="id"
>
<template v-for="(item, index) in tableHeader5">
<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="apartTotal>0"
:total="apartTotal"
:page.sync="codeQuery.page"
:limit.sync="codeQuery.limit"
@pagination="getResultDetailList"
/>
</el-tab-pane>
</el-tabs> </el-tabs>
<el-dialog <el-dialog
@ -475,6 +673,7 @@ import { listPage } from '@/api/basic/workPlace/sysWorkplaceManage'
import ioSplitFifoCodeRemindSetDialog from "./ioSplitFifoCodeRemindSetDialog.vue"; import ioSplitFifoCodeRemindSetDialog from "./ioSplitFifoCodeRemindSetDialog.vue";
import destroyOutDialog from "./destroyOutDialog.vue"; import destroyOutDialog from "./destroyOutDialog.vue";
import {getWorkBindBusTypes, removeBusTypeById} from '@/api/basic/workPlace/sysWorkplaceDocuments' import {getWorkBindBusTypes, removeBusTypeById} from '@/api/basic/workPlace/sysWorkplaceDocuments'
import { getSplitCode } from '@/api/collect/collectOrder'
export default { export default {
name: "IoSplitFifoCodePanel", name: "IoSplitFifoCodePanel",
@ -509,6 +708,9 @@ export default {
tableHeader4: [], tableHeader4: [],
queryList4: [], queryList4: [],
fromList4: [], fromList4: [],
tableHeader5: [],
queryList5: [],
fromList5: [],
convertDateFun: convertDate, convertDateFun: convertDate,
//-------------end //-------------end
@ -542,10 +744,17 @@ export default {
page: 1, page: 1,
limit: 10 limit: 10
}, },
codeQuery: {
code: null,
page: 1,
limit: 10
},
currentRow: {}, currentRow: {},
resultTotal: 0, resultTotal: 0,
resultDetailLoading: false, resultDetailLoading: false,
resultDetailList: [], resultDetailList: [],
apartDetailList: [],//
apartTotal: 0,//
addInvRemindSetDialogVisible: false, addInvRemindSetDialogVisible: false,
destroyOutDialogVisible: false, destroyOutDialogVisible: false,
prescribeData: {}, prescribeData: {},
@ -656,6 +865,14 @@ export default {
} }
_this.currentRow = row _this.currentRow = row
_this.getResultDetailList(); _this.getResultDetailList();
_this.codeQuery = {
relId: row.relId,
batchNo: row.batchNo,
workPlaceCode: row.workPlaceCode,
page: 1,
limit: 10
}
_this.getSplitCodeDetail();
}, },
getResultDetailList() { getResultDetailList() {
@ -671,7 +888,41 @@ export default {
}) })
}, },
getSplitCodeDetail(){
getSplitCode(this.codeQuery).then(res => {
if (res.code == 20000){
// this.loading = false
this.apartDetailList = res.data.list || []
this.apartTotal = res.data.total || 0
}
})
.catch(() => {
// this.loading = false
this.apartDetailList = []
this.apartTotal = res.data.total || 0
})
},
onCodeResultSubmit(){
this.codeQuery = {
code: this.codeQuery.code,
relId: this.currentRow.relId,
batchNo: this.currentRow.batchNo,
workPlaceCode: this.currentRow.workPlaceCode,
page: 1,
limit: 10
}
this.getSplitCodeDetail()
},
onCodeResultReset(){
this.codeQuery = {
relId: this.currentRow.relId,
batchNo: this.currentRow.batchNo,
workPlaceCode: this.currentRow.workPlaceCode,
page: 1,
limit: 10
}
this.getSplitCodeDetail()
},
handleCurrentChange(val) { handleCurrentChange(val) {
this.filterQuery.page = val.page; this.filterQuery.page = val.page;
@ -758,6 +1009,13 @@ export default {
this.queryList4 = re.data.queryList; this.queryList4 = re.data.queryList;
this.fromList4 = re.data.fromList; this.fromList4 = re.data.fromList;
}); });
getHead("ioSplitFifoCode-clmx", "1").then((re) => {
//
this.tableObj5 = re.data;
this.tableHeader5 = re.data.tableList;
this.queryList5 = re.data.queryList;
this.fromList5 = re.data.fromList;
});
this.filterQuery.workPlaceCode = this.workPlaceCode this.filterQuery.workPlaceCode = this.workPlaceCode
} }

@ -33,14 +33,14 @@
ref="formRef"> ref="formRef">
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="10"> <el-col :span="10">
<el-form-item label="损耗出库数量" prop="count"> <el-form-item label="损耗出库数量:" prop="count">
<el-input v-model.number="formData.count" placeholder="请填写损耗出库数量" type="number" :min="1" <el-input v-model.number="formData.count" placeholder="请填写损耗出库数量" type="number" :min="1"
@input="checkCount"></el-input> @input="checkCount"></el-input>
<!--<span v-if="countExceeded" class="exceeded-message">10</span>--> <!--<span v-if="countExceeded" class="exceeded-message">10</span>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="损耗出库说明"> <el-form-item label="损耗出库说明:">
<el-input v-model="formData.remark" placeholder="请填写损耗出库说明" clearable></el-input> <el-input v-model="formData.remark" placeholder="请填写损耗出库说明" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -137,8 +137,8 @@ export default {
return this.$message.error(res.message) return this.$message.error(res.message)
} }
}) })
} else if (this.destroyType == 1) { } else if (this.destroyType == 2) {
destroySplitOut(query).then(res => { destroyOutByCode(query).then(res => {
if (res.code == 20000) { if (res.code == 20000) {
this.closeDialog() this.closeDialog()
return this.$message.success("损耗出库成功") return this.$message.success("损耗出库成功")

@ -3,7 +3,7 @@
<el-form :model="formData" label-width="200px"> <el-form :model="formData" label-width="200px">
<el-row> <el-row>
<el-col :span="10"> <el-col :span="10">
<el-form-item class="query-form-item" label="工位:"> <el-form-item class="query-form-item" label="当前工位:">
<el-input v-model="formData.workPlaceName" disabled></el-input> <el-input v-model="formData.workPlaceName" disabled></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -17,7 +17,7 @@
<el-row> <el-row>
<el-col :span="10"> <el-col :span="10">
<el-form-item class="query-form-item" label="规格型号"> <el-form-item class="query-form-item" label="产品规格:">
<el-input v-model="formData.ggxh" disabled></el-input> <el-input v-model="formData.ggxh" disabled></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -27,6 +27,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </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-divider></el-divider>
<el-row> <el-row>
@ -87,9 +94,14 @@ export default {
methods: { methods: {
getRemindSetInfo() { getRemindSetInfo() {
this.formData = this.prescribeData; this.formData = this.prescribeData;
if (this.prescribeData.monopoly == 0){
this.formData.busTypeName = '共享库存'
}else {
this.formData.busTypeName = this.prescribeData.busName
}
}, },
addInvRemindSet() { addInvRemindSet() {
this.formLoading = true this.formLoading = true
let param = { let param = {
id:this.formData.id, id:this.formData.id,

Loading…
Cancel
Save