init project
This commit is contained in:
182
pages/mes/mesJobSingleReportSign/inEnsure.vue
Normal file
182
pages/mes/mesJobSingleReportSign/inEnsure.vue
Normal file
@@ -0,0 +1,182 @@
|
||||
<template>
|
||||
<view>
|
||||
<uni-collapse>
|
||||
<uni-forms ref="form" :modelValue="formData" :rules="rules">
|
||||
<uni-forms-item label="合并标签码" :labelWidth='90' name="singleReportSign">
|
||||
<uni-easyinput suffixIcon="scan" @iconClick="scanBar" @confirm="query"
|
||||
v-model="formData.singleReportSign" type="text" />
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
<u-button type="primary" @click="query">查询</u-button>
|
||||
<uni-collapse-item :open="true">
|
||||
<uni-card :is-shadow="false" is-full v-for="item,index in reportList" :key="item.id">
|
||||
<div><strong>合并标签号</strong>:{{item.singleReportSign}}</div>
|
||||
<div><strong>物料编码</strong>:{{item.ptNoTar}}</div>
|
||||
<div><strong>物料名称</strong>:{{item.ptTitleTar}}</div>
|
||||
<div><strong>物料规格</strong>:{{item.specification1}}</div>
|
||||
<div><strong>数量</strong>:{{item.reportNumber}}</div>
|
||||
<div><strong>仓库</strong>:{{item.whName?item.whName:item.whCode}}</div>
|
||||
<div><strong>状态</strong>:检验未入库</div>
|
||||
</uni-card>
|
||||
<!-- <u-checkbox-group v-model="checked" @change="getCheckedList" :borderBottom="true" placement="column"
|
||||
iconPlacement="right">
|
||||
<u-checkbox size="25" iconSize="25" activeColor="green" v-for="(item, index) in reportList"
|
||||
:key="index" :disabled="item.disabled" :name="item.id" :label="'\n'+' 序号 : '+(index+1)+'\n\n'+
|
||||
'合并标签号 : '+(item.singleReportSign? item.singleReportSign:'')+'\n\n'+
|
||||
'物料编码 : '+(item.ptNoTar?item.ptNoTar:'')+'\n\n'+
|
||||
'物料名称 : '+(item.ptTitleTar?item.ptTitleTar:'')+'\n\n'+
|
||||
'物料规格 : '+(item.specification1?item.specification1:'')+'\n\n'+
|
||||
'数量 : '+(item.reportNumber?item.reportNumber:'')+'\n\n'+
|
||||
'仓库 : '+(item.whCode?item.whCode:'')+'\n\n'+
|
||||
'状态 : '+returnStatus(item.status)+'\n\n'
|
||||
">
|
||||
</u-checkbox>
|
||||
</u-checkbox-group> -->
|
||||
</uni-collapse-item>
|
||||
<u-button type="primary" @click="submit" v-if="reportList.length>0">提交</u-button>
|
||||
</uni-collapse>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listMesJobSingleReportSign,
|
||||
advListMesJobSingleReportSign,
|
||||
getMesJobSingleReportSign,
|
||||
delMesJobSingleReportSign,
|
||||
addMesJobSingleReportSign,
|
||||
updateMesJobSingleReportSign,
|
||||
reportConfirm,
|
||||
qualityConfirm,
|
||||
whInConfirm
|
||||
} from "@/api/mes/mesJobSingleReportSign";
|
||||
import {
|
||||
listWarehouse
|
||||
} from "@/api/wms/pdcIn.js";
|
||||
import {
|
||||
getDicts
|
||||
} from "@/api/system/dict/dictData.js";
|
||||
export default {
|
||||
mounted() {
|
||||
getDicts("mes_job_single_report_sign_status").then(res => {
|
||||
this.mes_job_single_report_sign_status = res.data.map(dict => {
|
||||
return {
|
||||
text: dict.dictLabel,
|
||||
value: dict.dictValue,
|
||||
diasble: false
|
||||
}
|
||||
});
|
||||
})
|
||||
listWarehouse().then(res => {
|
||||
this.whList = res.rows
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
whList: [],
|
||||
mes_job_single_report_sign_status: [],
|
||||
selectAllChecked: false,
|
||||
checked: [],
|
||||
reportList: [],
|
||||
formData: {
|
||||
singleReportSign: null
|
||||
},
|
||||
ids: [],
|
||||
rules: {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
returnStatus(i) {
|
||||
console.log(i)
|
||||
let obj = this.mes_job_single_report_sign_status.find(dict => dict.value == i)
|
||||
console.log(obj)
|
||||
if (obj)
|
||||
return obj.text
|
||||
else
|
||||
return ''
|
||||
},
|
||||
getCheckedList(e) {
|
||||
this.ids = e;
|
||||
// 判断当前选中的复选框数量,决定全选框的状态
|
||||
if (this.ids.length === this.reportList.length) {
|
||||
this.selectAllChecked = true;
|
||||
} else {
|
||||
this.selectAllChecked = false;
|
||||
}
|
||||
},
|
||||
//物料编码
|
||||
scanBar() {
|
||||
const _this = this;
|
||||
uni.scanCode({
|
||||
scanType: ['barCode', 'qrCode'],
|
||||
success: function(res) {
|
||||
_this.formData.singleReportSign = res.result;
|
||||
}
|
||||
});
|
||||
},
|
||||
query() {
|
||||
listMesJobSingleReportSign(this.formData).then(res => {
|
||||
if (res.rows.length > 0) {
|
||||
if (res.rows[0].status != 2) {
|
||||
let text = this.returnStatus(res.rows[0].status)
|
||||
this.$modal.msg("查询的记录当前处于'" + text + "'状态!");
|
||||
} else {
|
||||
if (!res.rows[0].whCode) {
|
||||
this.reportList = res.rows
|
||||
} else {
|
||||
let obj = this.whList.find(item => item.warehouseCode == res.rows[0].whCode)
|
||||
if (obj) {
|
||||
console.log(obj)
|
||||
res.rows[0].whName = obj.warehouseName
|
||||
}
|
||||
this.reportList = res.rows
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
this.$modal.msg("未查询到相关记录!");
|
||||
}
|
||||
})
|
||||
},
|
||||
selectAll() {
|
||||
// 点击全选按钮时,更新所有复选框的选中状态
|
||||
if (this.checked.length === this.reportList.length) {
|
||||
this.checked = [];
|
||||
this.selectAllChecked = false; // 全选框不选中
|
||||
} else {
|
||||
this.checked = this.reportList.map(item => item.id);
|
||||
this.selectAllChecked = true; // 全选框选中
|
||||
}
|
||||
},
|
||||
submit() {
|
||||
const _this = this;
|
||||
_this.$refs.form.validate().then(res => {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您确定完成该入库确认吗?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
_this.$modal.loading('提交中')
|
||||
whInConfirm([_this.reportList[0].id]).then(res => {
|
||||
_this.$modal.closeLoading();
|
||||
_this.$modal.msgSuccess("上传入库确认成功!");
|
||||
setTimeout(() => {
|
||||
_this.$tab.switchTab(
|
||||
"/pages/work/index");
|
||||
}, 500);
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
111
pages/mes/mesJobSingleReportSign/inFailRecord.vue
Normal file
111
pages/mes/mesJobSingleReportSign/inFailRecord.vue
Normal file
@@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<view style="background-color: #fff" v-if="reportList.length>0">
|
||||
<u-checkbox size="25" iconSize="25" activeColor="green" labelSize='40rpx' :label="'全选'" @change="selectAll"
|
||||
v-if="reportList.length>0" :checked="selectAllChecked">
|
||||
</u-checkbox>
|
||||
<u-checkbox-group v-model="checked" @change="getCheckedList" :borderBottom="true" placement="column"
|
||||
iconPlacement="right" style="height: 80vh;overflow: scroll;overflow-wrap:anywhere">
|
||||
<div v-for="(item, index) in reportList" :key="index">
|
||||
<u-checkbox size="25" iconSize="25" activeColor="green" :disabled="item.disabled" :name="item.id"
|
||||
:label="'\n'+' 序号 : '+(index+1)+'\n\n'+
|
||||
'物料编码 : '+(item.ptNoTar?item.ptNoTar:'')+'\n\n'+
|
||||
'物料名称 : '+(item.ptTitleTar?item.ptTitleTar:'')+'\n\n'+
|
||||
'物料规格 : '+(item.specification1?item.specification1:'')+'\n\n'+
|
||||
'数量 : '+(item.reportNumber?item.reportNumber:'')+'\n\n'+
|
||||
'仓库 : '+(item.whCode?item.whCode:'')+'\n\n'+
|
||||
'合并标签号 : '+(item.singleReportSign? item.singleReportSign:'')+'\n\n'+
|
||||
'失败原因 : '+(item.remark? item.remark:'')+'\n\n'
|
||||
">
|
||||
|
||||
</u-checkbox>
|
||||
<u-button type="success" @click="updateStatus(item)">强制入库</u-button>
|
||||
</div>
|
||||
|
||||
</u-checkbox-group>
|
||||
<u-button type="primary" @click="submit" v-if="reportList.length>0">提交</u-button>
|
||||
</view>
|
||||
<view v-else style="text-align: center;">
|
||||
查询无记录
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listMesJobSingleReportSign,
|
||||
advListMesJobSingleReportSign,
|
||||
getMesJobSingleReportSign,
|
||||
delMesJobSingleReportSign,
|
||||
addMesJobSingleReportSign,
|
||||
updateMesJobSingleReportSign,
|
||||
reportConfirm,
|
||||
qualityConfirm,
|
||||
whInConfirm
|
||||
} from "@/api/mes/mesJobSingleReportSign";
|
||||
|
||||
export default {
|
||||
mounted() {
|
||||
this.query()
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selectAllChecked: false,
|
||||
checked: [],
|
||||
ids: [],
|
||||
reportList: [],
|
||||
rightOptions: [{
|
||||
text: '删除',
|
||||
style: {
|
||||
backgroundColor: '#ff2a17'
|
||||
}
|
||||
}, ],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//强制入库
|
||||
updateStatus(item) {
|
||||
item.status = 3
|
||||
updateMesJobSingleReportSign(item).then(res => {
|
||||
this.$modal.msgSuccess("强制入库成功!");
|
||||
this.query()
|
||||
})
|
||||
},
|
||||
getCheckedList(e) {
|
||||
this.ids = e;
|
||||
// 判断当前选中的复选框数量,决定全选框的状态
|
||||
if (this.ids.length === this.reportList.length) {
|
||||
this.selectAllChecked = true;
|
||||
} else {
|
||||
this.selectAllChecked = false;
|
||||
}
|
||||
},
|
||||
selectAll() {
|
||||
// 点击全选按钮时,更新所有复选框的选中状态
|
||||
if (this.checked.length === this.reportList.length) {
|
||||
this.checked = [];
|
||||
this.selectAllChecked = false; // 全选框不选中
|
||||
} else {
|
||||
this.checked = this.reportList.map(item => item.id);
|
||||
this.selectAllChecked = true; // 全选框选中
|
||||
}
|
||||
},
|
||||
query() {
|
||||
listMesJobSingleReportSign({
|
||||
errStatus: 1,
|
||||
status: 2
|
||||
}).then(res => {
|
||||
this.reportList = res.rows
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
// let ids = this.reportList.map(item => item.id)
|
||||
whInConfirm(this.ids)
|
||||
this.$tab.switchTab(
|
||||
"/pages/work/index");
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
136
pages/mes/mesJobSingleReportSign/inQuery.vue
Normal file
136
pages/mes/mesJobSingleReportSign/inQuery.vue
Normal file
@@ -0,0 +1,136 @@
|
||||
<template>
|
||||
<view>
|
||||
<uni-collapse>
|
||||
<uni-forms ref="form" :modelValue="formData" :rules="rules">
|
||||
<uni-forms-item label="日期范围" :labelWidth='90' name="updateTime">
|
||||
<uni-datetime-picker v-model="formData.updateTime" type="daterange" rangeSeparator="至" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="物料编码" :labelWidth='90' name="ptNoTar">
|
||||
<uni-easyinput suffixIcon="scan" @iconClick="scanBar" @confirm="scanBarCode"
|
||||
v-model="formData.ptNoTar" type="text" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="物料名称" :labelWidth='90' name="ptTitleTar">
|
||||
<uni-easyinput v-model="formData.ptTitleTar" type="text" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="物料规格" :labelWidth='90' name="specification1">
|
||||
<uni-easyinput v-model="formData.specification1" type="text" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="仓库" :labelWidth='90' name="formData.whCode">
|
||||
<zxz-uni-data-select v-model="formData.whCode" :localdata="whOptions"
|
||||
:filterable="true"></zxz-uni-data-select>
|
||||
<!-- <uni-data-select v-model="formData.whCode" :localdata="whOptions"></uni-data-select> -->
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
<u-button type="primary" @click="query">查询</u-button>
|
||||
<uni-collapse-item :open="true">
|
||||
<uni-card :is-shadow="false" is-full v-for="item,index in reportList" :key="item.id">
|
||||
<div><strong>合并标签号</strong>:{{item.singleReportSign}}</div>
|
||||
<div><strong>物料编码</strong>:{{item.ptNoTar}}</div>
|
||||
<div><strong>物料名称</strong>:{{item.ptTitleTar}}</div>
|
||||
<div><strong>物料规格</strong>:{{item.specification1}}</div>
|
||||
<div><strong>数量</strong>:{{item.reportNumber}}</div>
|
||||
<div><strong>仓库</strong>:{{item.whName?item.whName:item.whCode}}</div>
|
||||
<div><strong>状态</strong>:入库完成</div>
|
||||
</uni-card>
|
||||
</uni-collapse-item>
|
||||
</uni-collapse>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listMesJobSingleReportSign,
|
||||
advListMesJobSingleReportSign,
|
||||
getMesJobSingleReportSign,
|
||||
delMesJobSingleReportSign,
|
||||
addMesJobSingleReportSign,
|
||||
updateMesJobSingleReportSign,
|
||||
reportConfirm,
|
||||
qualityConfirm,
|
||||
whInConfirm
|
||||
} from "@/api/mes/mesJobSingleReportSign";
|
||||
import {
|
||||
listWarehouse
|
||||
} from "@/api/wms/pdcIn.js";
|
||||
export default {
|
||||
mounted() {
|
||||
listWarehouse().then(res => {
|
||||
this.whList = res.rows;
|
||||
this.whOptions = res.rows.map(item => {
|
||||
return {
|
||||
text: item.warehouseCode + ':' + item.warehouseName,
|
||||
value: item.warehouseCode,
|
||||
diasble: false
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
whOptions: [],
|
||||
whList: [],
|
||||
datetimerange: [],
|
||||
reportList: [],
|
||||
formData: {
|
||||
ptNoTar: null,
|
||||
ptTitleTar: null,
|
||||
updateTime: [],
|
||||
specification1: null,
|
||||
whCode: null
|
||||
},
|
||||
rules: {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//物料编码
|
||||
scanBar() {
|
||||
const _this = this;
|
||||
uni.scanCode({
|
||||
scanType: ['barCode', 'qrCode'],
|
||||
success: function(res) {
|
||||
_this.formData.ptNoTar = res.result;
|
||||
}
|
||||
});
|
||||
},
|
||||
query() {
|
||||
let obj = {
|
||||
['A.ptNoTar-0']: this.formData.ptNoTar,
|
||||
['A.ptNoTar-op']: 'ct',
|
||||
['A.ptTitleTar-0']: this.formData.ptTitleTar,
|
||||
['A.ptTitleTar-op']: 'ct',
|
||||
['A.specification1-0']: this.formData.specification1,
|
||||
['A.specification1-op']: 'ct',
|
||||
['A.updateTime-0']: this.formData.updateTime.length > 0 ? (this.formData.updateTime[0] +
|
||||
' 00:00:00') : null,
|
||||
['A.updateTime-1']: this.formData.updateTime.length > 0 ? (this.formData.updateTime[1] +
|
||||
' 00:00:00') : null,
|
||||
['A.updateTime-op']: 'bt',
|
||||
['A.whCode-0']: this.formData.whCode,
|
||||
['A.whCode-op']: 'eq',
|
||||
['A.status-op']: 'eq',
|
||||
['A.status-0']: 3,
|
||||
gexpr: 'A',
|
||||
pageNum: 0,
|
||||
pageSize: 100
|
||||
}
|
||||
console.log(obj)
|
||||
advListMesJobSingleReportSign(obj).then(res => {
|
||||
this.reportList = res.rows.map(item => {
|
||||
let obj = this.whList.find(i => i.warehouseCode == item.whCode)
|
||||
if (obj) {
|
||||
console.log(obj)
|
||||
item.whName = obj.warehouseName
|
||||
}
|
||||
return item
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
145
pages/mes/mesJobSingleReportSign/notInQuery.vue
Normal file
145
pages/mes/mesJobSingleReportSign/notInQuery.vue
Normal file
@@ -0,0 +1,145 @@
|
||||
<template>
|
||||
<view>
|
||||
<uni-collapse>
|
||||
<uni-forms ref="form" :modelValue="formData" :rules="rules">
|
||||
<uni-forms-item label="物料编码" :labelWidth='90' name="ptNoTar">
|
||||
<uni-easyinput suffixIcon="scan" @iconClick="scanBar" @confirm="scanBarCode"
|
||||
v-model="formData.ptNoTar" type="text" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="物料名称" :labelWidth='90' name="ptTitleTar">
|
||||
<uni-easyinput v-model="formData.ptTitleTar" type="text" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="物料规格" :labelWidth='90' name="specification1">
|
||||
<uni-easyinput v-model="formData.specification1" type="text" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="状态" :labelWidth='90' name="status">
|
||||
<uni-data-select v-model="formData.status" :localdata="range"></uni-data-select>
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
<u-button type="primary" @click="query">查询</u-button>
|
||||
<uni-collapse-item :open="true">
|
||||
<uni-card :is-shadow="false" is-full v-for="item,index in reportList" :key="item.id">
|
||||
<div><strong>合并标签号</strong>:{{item.singleReportSign}}</div>
|
||||
<div><strong>物料编码</strong>:{{item.ptNoTar}}</div>
|
||||
<div><strong>物料名称</strong>:{{item.ptTitleTar}}</div>
|
||||
<div><strong>物料规格</strong>:{{item.specification1}}</div>
|
||||
<div><strong>数量</strong>:{{item.reportNumber}}</div>
|
||||
<div><strong>仓库</strong>:{{item.whName?item.whName:item.whCode}}</div>
|
||||
<div><strong>状态</strong>:{{returnStatus(item.status)}}</div>
|
||||
</uni-card>
|
||||
</uni-collapse-item>
|
||||
</uni-collapse>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listMesJobSingleReportSign,
|
||||
advListMesJobSingleReportSign,
|
||||
getMesJobSingleReportSign,
|
||||
delMesJobSingleReportSign,
|
||||
addMesJobSingleReportSign,
|
||||
updateMesJobSingleReportSign,
|
||||
reportConfirm,
|
||||
qualityConfirm,
|
||||
whInConfirm
|
||||
} from "@/api/mes/mesJobSingleReportSign";
|
||||
import {
|
||||
getDicts
|
||||
} from "@/api/system/dict/dictData.js";
|
||||
import {
|
||||
listWarehouse
|
||||
} from "@/api/wms/pdcIn.js";
|
||||
export default {
|
||||
mounted() {
|
||||
getDicts("mes_job_single_report_sign_status").then(res => {
|
||||
this.mes_job_single_report_sign_status = res.data.map(dict => {
|
||||
return {
|
||||
text: dict.dictLabel,
|
||||
value: dict.dictValue,
|
||||
diasble: false
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
listWarehouse().then(res => {
|
||||
this.whList = res.rows
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
whList: [],
|
||||
mes_job_single_report_sign_status: [],
|
||||
datetimerange: [],
|
||||
reportList: [],
|
||||
formData: {
|
||||
ptNoTar: null,
|
||||
ptTitleTar: null,
|
||||
status: 1,
|
||||
specification1: null,
|
||||
},
|
||||
range: [{
|
||||
value: 1,
|
||||
text: "报工未检验"
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
text: "检验未入库"
|
||||
}
|
||||
],
|
||||
rules: {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
returnStatus(i) {
|
||||
console.log(i)
|
||||
let obj = this.mes_job_single_report_sign_status.find(dict => dict.value == i)
|
||||
console.log(obj)
|
||||
if (obj)
|
||||
return obj.text
|
||||
else
|
||||
return ''
|
||||
},
|
||||
//物料编码
|
||||
scanBar() {
|
||||
const _this = this;
|
||||
uni.scanCode({
|
||||
scanType: ['barCode', 'qrCode'],
|
||||
success: function(res) {
|
||||
_this.formData.ptNoTar = res.result;
|
||||
}
|
||||
});
|
||||
},
|
||||
query() {
|
||||
let obj = {
|
||||
['A.ptNoTar-0']: this.formData.ptNoTar,
|
||||
['A.ptTitleTar-0']: this.formData.ptTitleTar,
|
||||
['A.specification1-0']: this.formData.specification1,
|
||||
['A.status-0']: this.formData.status,
|
||||
['A.ptNoTar-op']: 'ct',
|
||||
['A.ptTitleTar-op']: 'ct',
|
||||
['A.specification1-op']: 'ct',
|
||||
['A.status-op']: 'eq',
|
||||
gexpr: 'A',
|
||||
pageNum: 0,
|
||||
pageSize: 100
|
||||
}
|
||||
advListMesJobSingleReportSign(obj).then(res => {
|
||||
this.reportList = res.rows.map(item => {
|
||||
let obj = this.whList.find(i => i.warehouseCode == item.whCode)
|
||||
if (obj) {
|
||||
console.log(obj)
|
||||
item.whName = obj.warehouseName
|
||||
}
|
||||
return item
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
161
pages/mes/mesJobSingleReportSign/qualityEnsure.vue
Normal file
161
pages/mes/mesJobSingleReportSign/qualityEnsure.vue
Normal file
@@ -0,0 +1,161 @@
|
||||
<template>
|
||||
<view>
|
||||
<uni-collapse>
|
||||
<uni-forms ref="form" :modelValue="formData" :rules="rules">
|
||||
<uni-forms-item label="物料编码" :labelWidth='90' name="ptNoTar">
|
||||
<uni-easyinput suffixIcon="scan" @iconClick="scanBar" @confirm="scanBarCode"
|
||||
v-model="formData.ptNoTar" type="text" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="物料名称" :labelWidth='90' name="ptTitleTar">
|
||||
<uni-easyinput v-model="formData.ptTitleTar" type="text" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="物料规格" :labelWidth='90' name="specification1">
|
||||
<uni-easyinput v-model="formData.specification1" type="text" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="仓库" :labelWidth='90' name="formData.whCode">
|
||||
<zxz-uni-data-select v-model="formData.whCode" :localdata="whOptions"
|
||||
:filterable="true"></zxz-uni-data-select>
|
||||
<!-- <uni-data-select v-model="formData.whCode" :localdata="whOptions"></uni-data-select> -->
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
<u-button type="primary" @click="query">查询</u-button>
|
||||
<uni-collapse-item :open="true">
|
||||
<u-checkbox size="25" iconSize="25" activeColor="green" labelSize='40rpx' :label="'全选'"
|
||||
@change="selectAll" v-if="reportList.length>0" :checked="selectAllChecked">
|
||||
</u-checkbox>
|
||||
<u-checkbox-group v-model="checked" @change="getCheckedList" :borderBottom="true" placement="column"
|
||||
iconPlacement="right" style="height: 50vh;overflow: scroll;">
|
||||
<u-checkbox size="25" iconSize="25" activeColor="green" v-for="(item, index) in reportList"
|
||||
:key="index" :disabled="item.disabled" :name="item.id" :label="'\n'+' 序号 : '+(index+1)+'\n\n'+
|
||||
'物料编码 : '+(item.ptNoTar?item.ptNoTar:'')+'\n\n'+
|
||||
'物料名称 : '+(item.ptTitleTar?item.ptTitleTar:'')+'\n\n'+
|
||||
'物料规格 : '+(item.specification1?item.specification1:'')+'\n\n'+
|
||||
'数量 : '+(item.reportNumber?item.reportNumber:'')+'\n\n'+
|
||||
'仓库 : '+(item.whCode?item.whCode:'')+'\n\n'+
|
||||
'合并标签号 : '+(item.singleReportSign? item.singleReportSign:'')+'\n'
|
||||
">
|
||||
</u-checkbox>
|
||||
</u-checkbox-group>
|
||||
</uni-collapse-item>
|
||||
<u-button type="primary" @click="submit" v-if="reportList.length>0">提交</u-button>
|
||||
</uni-collapse>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listMesJobSingleReportSign,
|
||||
advListMesJobSingleReportSign,
|
||||
getMesJobSingleReportSign,
|
||||
delMesJobSingleReportSign,
|
||||
addMesJobSingleReportSign,
|
||||
updateMesJobSingleReportSign,
|
||||
reportConfirm,
|
||||
qualityConfirm,
|
||||
whInConfirm
|
||||
} from "@/api/mes/mesJobSingleReportSign";
|
||||
import {
|
||||
listWarehouse
|
||||
} from "@/api/wms/pdcIn";
|
||||
|
||||
export default {
|
||||
mounted() {
|
||||
listWarehouse().then(res => {
|
||||
this.whOptions = res.rows.map(item => {
|
||||
return {
|
||||
text: item.warehouseCode + ':' + item.warehouseName,
|
||||
value: item.warehouseCode,
|
||||
diasble: false
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selectAllChecked: false,
|
||||
checked: [],
|
||||
whOptions: [],
|
||||
reportList: [],
|
||||
formData: {
|
||||
ptNoTar: null,
|
||||
ptTitleTar: null,
|
||||
specification1: null,
|
||||
whCode: null,
|
||||
//报工未检验
|
||||
status: 1
|
||||
},
|
||||
ids: [],
|
||||
rules: {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getCheckedList(e) {
|
||||
this.ids = e;
|
||||
console.log(this.ids)
|
||||
// 判断当前选中的复选框数量,决定全选框的状态
|
||||
if (this.ids.length === this.reportList.length) {
|
||||
this.selectAllChecked = true;
|
||||
} else {
|
||||
this.selectAllChecked = false;
|
||||
}
|
||||
},
|
||||
//物料编码
|
||||
scanBar() {
|
||||
const _this = this;
|
||||
uni.scanCode({
|
||||
scanType: ['barCode', 'qrCode'],
|
||||
success: function(res) {
|
||||
_this.formData.ptNoTar = res.result;
|
||||
}
|
||||
});
|
||||
},
|
||||
query() {
|
||||
listMesJobSingleReportSign(this.formData).then(res => {
|
||||
this.reportList = res.rows
|
||||
})
|
||||
},
|
||||
selectAll() {
|
||||
// 点击全选按钮时,更新所有复选框的选中状态
|
||||
if (this.checked.length === this.reportList.length) {
|
||||
this.checked = [];
|
||||
this.ids = this.checked;
|
||||
this.selectAllChecked = false; // 全选框不选中
|
||||
} else {
|
||||
this.checked = this.reportList.map(item => item.id);
|
||||
this.ids = this.checked
|
||||
this.selectAllChecked = true; // 全选框选中
|
||||
}
|
||||
},
|
||||
submit() {
|
||||
const _this = this;
|
||||
_this.$refs.form.validate().then(res => {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您确定完成该质检确认吗?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
_this.$modal.loading('提交中')
|
||||
console.log(_this.ids)
|
||||
qualityConfirm(_this.ids).then(res => {
|
||||
_this.$modal.closeLoading();
|
||||
_this.$modal.msgSuccess("上传质检确认成功!");
|
||||
setTimeout(() => {
|
||||
_this.$tab.switchTab(
|
||||
"/pages/work/index");
|
||||
}, 500);
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
173
pages/mes/mesJobSingleReportSign/reportContEnsure.vue
Normal file
173
pages/mes/mesJobSingleReportSign/reportContEnsure.vue
Normal file
@@ -0,0 +1,173 @@
|
||||
<template>
|
||||
<view>
|
||||
<uni-collapse>
|
||||
<uni-forms ref="form" :modelValue="formData" :rules="rules">
|
||||
<uni-forms-item label="物料编码" :labelWidth='90' name="ptNoTar">
|
||||
<uni-easyinput suffixIcon="scan" @iconClick="scanBar" @confirm="scanBarCode"
|
||||
v-model="formData.ptNoTar" type="text" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="物料名称" :labelWidth='90' name="ptTitleTar">
|
||||
<uni-easyinput v-model="formData.ptTitleTar" type="text" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="物料规格" :labelWidth='90' name="specification1">
|
||||
<uni-easyinput v-model="formData.specification1" type="text" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="仓库" :labelWidth='90' name="formData.whCode">
|
||||
<zxz-uni-data-select v-model="formData.whCode" :localdata="whOptions"
|
||||
:filterable="true"></zxz-uni-data-select>
|
||||
<!-- <uni-data-select v-model="formData.whCode" :localdata="whOptions"></uni-data-select> -->
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
<u-button type="primary" @click="query" style="margin-bottom: 10px;">查询</u-button>
|
||||
<!-- <uni-collapse-item :open="true"> -->
|
||||
<u-checkbox size="25" iconSize="25" activeColor="green" labelSize='40rpx' :label="'全选'" @change="selectAll"
|
||||
v-if="reportList.length>0" :checked="selectAllChecked">
|
||||
</u-checkbox>
|
||||
<u-checkbox-group v-model="checked" @change="getCheckedList" :borderBottom="true" placement="column"
|
||||
iconPlacement="right" style="height: 63vh;overflow: scroll;">
|
||||
<u-checkbox size="25" iconSize="25" activeColor="green" v-for="(item, index) in reportList" :key="index"
|
||||
:disabled="item.disabled" :name="item.id" :label="'\n'+' 序号 : '+(index+1)+'\n\n'+
|
||||
'物料编码 : '+(item.ptNoTar?item.ptNoTar:'')+'\n\n'+
|
||||
'物料名称 : '+(item.ptTitleTar?item.ptTitleTar:'')+'\n\n'+
|
||||
'物料规格 : '+(item.specification1?item.specification1:'')+'\n\n'+
|
||||
'数量 : '+(item.reportNumber?item.reportNumber:'')+'\n\n'+
|
||||
'仓库 : '+(item.whCode?item.whCode:'')+'\n\n'+
|
||||
'合并标签号 : '+(item.singleReportSign? item.singleReportSign:'')+'\n'
|
||||
">
|
||||
</u-checkbox>
|
||||
</u-checkbox-group>
|
||||
<!-- </uni-collapse-item> -->
|
||||
<u-button type="primary" @click="submit" v-if="reportList.length>0">提交</u-button>
|
||||
</uni-collapse>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listMesJobSingleReportSign,
|
||||
advListMesJobSingleReportSign,
|
||||
getMesJobSingleReportSign,
|
||||
delMesJobSingleReportSign,
|
||||
addMesJobSingleReportSign,
|
||||
updateMesJobSingleReportSign,
|
||||
reportConfirm,
|
||||
qualityConfirm,
|
||||
whInConfirm
|
||||
} from "@/api/mes/mesJobSingleReportSign";
|
||||
import {
|
||||
listWarehouse
|
||||
} from "@/api/wms/pdcIn";
|
||||
|
||||
export default {
|
||||
mounted() {
|
||||
listWarehouse().then(res => {
|
||||
this.whOptions = res.rows.map(item => {
|
||||
return {
|
||||
text: item.warehouseCode + ':' + item.warehouseName,
|
||||
value: item.warehouseCode,
|
||||
diasble: false
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selectAllChecked: false,
|
||||
checked: [],
|
||||
whOptions: [],
|
||||
reportList: [],
|
||||
formData: {
|
||||
ptNoTar: null,
|
||||
ptTitleTar: null,
|
||||
specification1: null,
|
||||
whCode: null,
|
||||
status: 0
|
||||
},
|
||||
ids: [],
|
||||
rules: {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getCheckedList(e) {
|
||||
this.ids = e;
|
||||
console.log(this.ids)
|
||||
// 判断当前选中的复选框数量,决定全选框的状态
|
||||
if (this.ids.length === this.reportList.length) {
|
||||
this.selectAllChecked = true;
|
||||
} else {
|
||||
this.selectAllChecked = false;
|
||||
}
|
||||
},
|
||||
//物料编码
|
||||
scanBar() {
|
||||
const _this = this;
|
||||
uni.scanCode({
|
||||
scanType: ['barCode', 'qrCode'],
|
||||
success: function(res) {
|
||||
_this.formData.ptNoTar = res.result;
|
||||
}
|
||||
});
|
||||
},
|
||||
query() {
|
||||
listMesJobSingleReportSign(this.formData).then(res => {
|
||||
if (res.rows.length === 0) {
|
||||
this.$modal.msg("未查询到相关记录!");
|
||||
return;
|
||||
}
|
||||
|
||||
this.reportList = res.rows.map(item => {
|
||||
let obj = this.whOptions.find(item => item.warehouseCode == item.whCode)
|
||||
if (obj) {
|
||||
item.whName = obj.warehouseName
|
||||
}
|
||||
return item
|
||||
});
|
||||
|
||||
})
|
||||
},
|
||||
selectAll() {
|
||||
// 点击全选按钮时,更新所有复选框的选中状态
|
||||
if (this.checked.length === this.reportList.length) {
|
||||
this.checked = [];
|
||||
this.ids = this.checked;
|
||||
this.selectAllChecked = false; // 全选框不选中
|
||||
} else {
|
||||
this.checked = this.reportList.map(item => item.id);
|
||||
this.ids = this.checked
|
||||
this.selectAllChecked = true; // 全选框选中
|
||||
}
|
||||
},
|
||||
submit() {
|
||||
const _this = this;
|
||||
_this.$refs.form.validate().then(res => {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您确定完成该质检确认吗?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
console.log(_this.ids)
|
||||
// let ids = this.reportList.map(item => item.id)
|
||||
reportConfirm(_this.ids)
|
||||
_this.$modal.msg("报工确认已提交!");
|
||||
_this.formData = {
|
||||
ptNoTar: null,
|
||||
ptTitleTar: null,
|
||||
specification1: null,
|
||||
whCode: null,
|
||||
}
|
||||
_this.reportList = [];
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
157
pages/mes/mesJobSingleReportSign/reportEnsure.vue
Normal file
157
pages/mes/mesJobSingleReportSign/reportEnsure.vue
Normal file
@@ -0,0 +1,157 @@
|
||||
<template>
|
||||
<view>
|
||||
<uni-forms ref="form" :modelValue="formData">
|
||||
<uni-forms-item label="合并标签码" :labelWidth='90' name="singleReportSign">
|
||||
<uni-easyinput suffixIcon="scan" @iconClick="scanBar" @confirm="scanBarCode"
|
||||
v-model="formData.singleReportSign" type="text" />
|
||||
</uni-forms-item>
|
||||
<uni-swipe-action style="height: 88vh;overflow: scroll;">
|
||||
<uni-swipe-action-item :rightOptions="rightOptions" :key="index"
|
||||
@click="(data) => clickDetail(index,data)" v-for="(item, index) in reportList">
|
||||
<uni-card :is-shadow="false" is-full>
|
||||
<div><strong>物料编码</strong>:{{item.ptNoTar}}</div>
|
||||
<div><strong>物料名称</strong>:{{item.ptTitleTar}}</div>
|
||||
<div><strong>物料规格</strong>:{{item.specification1}}</div>
|
||||
<div><strong>数量</strong>:{{item.reportNumber}}</div>
|
||||
<div><strong>仓库</strong>:{{item.whName?item.whName:item.whCode}}</div>
|
||||
<div><strong>合并标签码</strong>:{{item.singleReportSign}}</div>
|
||||
</uni-card>
|
||||
</uni-swipe-action-item>
|
||||
</uni-swipe-action>
|
||||
</uni-forms>
|
||||
<u-button type="primary" @click="submit">提交</u-button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listMesJobSingleReportSign,
|
||||
advListMesJobSingleReportSign,
|
||||
getMesJobSingleReportSign,
|
||||
delMesJobSingleReportSign,
|
||||
addMesJobSingleReportSign,
|
||||
updateMesJobSingleReportSign,
|
||||
reportConfirm,
|
||||
qualityConfirm,
|
||||
whInConfirm
|
||||
} from "@/api/mes/mesJobSingleReportSign";
|
||||
import {
|
||||
listWarehouse
|
||||
} from "@/api/wms/pdcIn.js";
|
||||
export default {
|
||||
mounted() {
|
||||
listWarehouse().then(res => {
|
||||
this.whList = res.rows
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
whList: [],
|
||||
reportList: [],
|
||||
formData: {
|
||||
singleReportSign: null
|
||||
},
|
||||
rightOptions: [{
|
||||
text: '删除',
|
||||
style: {
|
||||
backgroundColor: '#ff2a17'
|
||||
}
|
||||
}, ],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
deleteDetail(index) {
|
||||
this.reportList.splice(index, 1);
|
||||
},
|
||||
clickDetail(itemIndex, {
|
||||
position,
|
||||
index
|
||||
}) {
|
||||
if (index == 0) {
|
||||
this.deleteDetail(itemIndex);
|
||||
}
|
||||
},
|
||||
submit() {
|
||||
let ids = this.reportList.map(item => item.id)
|
||||
reportConfirm(ids)
|
||||
this.$modal.msg("报工确认已提交!");
|
||||
this.reportCode = null;
|
||||
this.reportList = [];
|
||||
},
|
||||
scanBarCode() {
|
||||
listMesJobSingleReportSign(this.formData).then(res => {
|
||||
if (res.rows.length === 0) {
|
||||
this.$modal.msg("未查询到相关记录!");
|
||||
return;
|
||||
}
|
||||
const row = res.rows[0];
|
||||
if (row.status !== 0) {
|
||||
this.$modal.msg("该记录当前不在'未上传报工'状态!");
|
||||
} else {
|
||||
if (this.reportList.some(item => item.id == row.id)) {
|
||||
this.$modal.msg("数据已存在,无需重复添加。");
|
||||
return;
|
||||
}
|
||||
|
||||
let obj = this.whList.find(item => item.warehouseCode == row.whCode)
|
||||
if (obj) {
|
||||
row.whName = obj.warehouseName
|
||||
}
|
||||
this.reportList.push(row);
|
||||
}
|
||||
this.formData.singleReportSign = null;
|
||||
})
|
||||
},
|
||||
scanBar() {
|
||||
const _this = this;
|
||||
uni.scanCode({
|
||||
scanType: ['qrCode', 'barCode'],
|
||||
success: function(res) {
|
||||
_this.formData.singleReportSign = res.result;
|
||||
_this.scanBarCode();
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
// 搜索框
|
||||
.search-bar {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
margin-top: 2%;
|
||||
}
|
||||
|
||||
.search-bar-box {
|
||||
display: flex;
|
||||
margin: 0 auto;
|
||||
width: 620rpx;
|
||||
height: 74rpx;
|
||||
border: 5rpx solid #00a8cc;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
|
||||
.search-text {
|
||||
width: 100%;
|
||||
margin-top: 10rpx;
|
||||
margin-left: 20rpx;
|
||||
font-size: 30rpx;
|
||||
color: #7f7f81;
|
||||
}
|
||||
|
||||
.search-btn {
|
||||
background-color: #00a8cc;
|
||||
/* Green */
|
||||
color: white;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
font-size: 35rpx;
|
||||
width: 240rpx;
|
||||
height: 70rpx;
|
||||
line-height: 65rpx;
|
||||
border-radius: 30rpx;
|
||||
letter-spacing: 3rpx;
|
||||
}
|
||||
</style>
|
||||
98
pages/mes/mesJobSingleReportSign/reportFailRecord.vue
Normal file
98
pages/mes/mesJobSingleReportSign/reportFailRecord.vue
Normal file
@@ -0,0 +1,98 @@
|
||||
<template>
|
||||
<view style="background-color: #fff" v-if="reportList.length>0">
|
||||
<u-checkbox size="25" iconSize="25" activeColor="green" labelSize='40rpx' :label="'全选'" @change="selectAll"
|
||||
v-if="reportList.length>0" :checked="selectAllChecked">
|
||||
</u-checkbox>
|
||||
<u-checkbox-group v-model="checked" @change="getCheckedList" :borderBottom="true" placement="column"
|
||||
iconPlacement="right" style="height: 80vh;overflow: scroll;overflow-wrap:anywhere">
|
||||
<u-checkbox size="25" iconSize="25" activeColor="green" v-for="(item, index) in reportList" :key="index"
|
||||
:disabled="item.disabled" :name="item.id" :label="'\n'+' 序号 : '+(index+1)+'\n\n'+
|
||||
'物料编码 : '+(item.ptNoTar?item.ptNoTar:'')+'\n\n'+
|
||||
'物料名称 : '+(item.ptTitleTar?item.ptTitleTar:'')+'\n\n'+
|
||||
'物料规格 : '+(item.specification1?item.specification1:'')+'\n\n'+
|
||||
'数量 : '+(item.reportNumber?item.reportNumber:'')+'\n\n'+
|
||||
'仓库 : '+(item.whCode?item.whCode:'')+'\n\n'+
|
||||
'合并标签号 : '+(item.singleReportSign? item.singleReportSign:'')+'\n\n'+
|
||||
'失败原因 : '+(item.remark? item.remark:'')+'\n'
|
||||
">
|
||||
</u-checkbox>
|
||||
</u-checkbox-group>
|
||||
<u-button type="primary" @click="submit" v-if="reportList.length>0">提交</u-button>
|
||||
</view>
|
||||
<view v-else style="text-align: center;">
|
||||
查询无记录
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listMesJobSingleReportSign,
|
||||
advListMesJobSingleReportSign,
|
||||
getMesJobSingleReportSign,
|
||||
delMesJobSingleReportSign,
|
||||
addMesJobSingleReportSign,
|
||||
updateMesJobSingleReportSign,
|
||||
reportConfirm,
|
||||
qualityConfirm,
|
||||
whInConfirm
|
||||
} from "@/api/mes/mesJobSingleReportSign";
|
||||
|
||||
export default {
|
||||
mounted() {
|
||||
this.query()
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selectAllChecked: false,
|
||||
checked: [],
|
||||
ids: [],
|
||||
reportList: [],
|
||||
rightOptions: [{
|
||||
text: '删除',
|
||||
style: {
|
||||
backgroundColor: '#ff2a17'
|
||||
}
|
||||
}, ],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getCheckedList(e) {
|
||||
this.ids = e;
|
||||
// 判断当前选中的复选框数量,决定全选框的状态
|
||||
if (this.ids.length === this.reportList.length) {
|
||||
this.selectAllChecked = true;
|
||||
} else {
|
||||
this.selectAllChecked = false;
|
||||
}
|
||||
},
|
||||
selectAll() {
|
||||
// 点击全选按钮时,更新所有复选框的选中状态
|
||||
if (this.checked.length === this.reportList.length) {
|
||||
this.checked = [];
|
||||
this.selectAllChecked = false; // 全选框不选中
|
||||
} else {
|
||||
this.checked = this.reportList.map(item => item.id);
|
||||
this.selectAllChecked = true; // 全选框选中
|
||||
}
|
||||
},
|
||||
query() {
|
||||
listMesJobSingleReportSign({
|
||||
errStatus: 1,
|
||||
status: 0
|
||||
}).then(res => {
|
||||
this.reportList = res.rows
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
// let ids = this.reportList.map(item => item.id)
|
||||
reportConfirm(this.ids)
|
||||
this.$tab.switchTab(
|
||||
"/pages/work/index");
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
131
pages/mes/mesJobSingleReportSign/statusQuery.vue
Normal file
131
pages/mes/mesJobSingleReportSign/statusQuery.vue
Normal file
@@ -0,0 +1,131 @@
|
||||
<template>
|
||||
<view>
|
||||
<uni-collapse>
|
||||
<uni-forms ref="form" :modelValue="formData" :rules="rules">
|
||||
<uni-forms-item label="合并标签码" :labelWidth='90' name="singleReportSign">
|
||||
<uni-easyinput suffixIcon="scan" @iconClick="scanBar" @confirm="query"
|
||||
v-model="formData.singleReportSign" type="text" />
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
<u-button type="primary" @click="query">查询</u-button>
|
||||
<uni-collapse-item :open="true">
|
||||
<uni-card :is-shadow="false" is-full v-for="item,index in reportList" :key="item.id">
|
||||
<div><strong>合并标签号</strong>:{{item.singleReportSign}}</div>
|
||||
<div><strong>物料编码</strong>:{{item.ptNoTar}}</div>
|
||||
<div><strong>物料名称</strong>:{{item.ptTitleTar}}</div>
|
||||
<div><strong>物料规格</strong>:{{item.specification1}}</div>
|
||||
<div><strong>数量</strong>:{{item.reportNumber}}</div>
|
||||
<div><strong>仓库</strong>:{{item.whName?item.whName:item.whCode}}</div>
|
||||
<div><strong>失败原因</strong>:{{item.remark?item.remark:''}}</div>
|
||||
<div><strong>状态</strong>:{{returnStatus(item.status)}}</div>
|
||||
</uni-card>
|
||||
</uni-collapse-item>
|
||||
</uni-collapse>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listMesJobSingleReportSign,
|
||||
advListMesJobSingleReportSign,
|
||||
getMesJobSingleReportSign,
|
||||
delMesJobSingleReportSign,
|
||||
addMesJobSingleReportSign,
|
||||
updateMesJobSingleReportSign,
|
||||
reportConfirm,
|
||||
qualityConfirm,
|
||||
whInConfirm
|
||||
} from "@/api/mes/mesJobSingleReportSign";
|
||||
import {
|
||||
listWarehouse
|
||||
} from "@/api/wms/pdcIn.js";
|
||||
import {
|
||||
getDicts
|
||||
} from "@/api/system/dict/dictData.js";
|
||||
export default {
|
||||
mounted() {
|
||||
getDicts("mes_job_single_report_sign_status").then(res => {
|
||||
this.mes_job_single_report_sign_status = res.data.map(dict => {
|
||||
return {
|
||||
text: dict.dictLabel,
|
||||
value: dict.dictValue,
|
||||
diasble: false
|
||||
}
|
||||
});
|
||||
})
|
||||
listWarehouse().then(res => {
|
||||
this.whList = res.rows
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
whList: [],
|
||||
mes_job_single_report_sign_status: [],
|
||||
reportList: [],
|
||||
formData: {
|
||||
singleReportSign: null
|
||||
},
|
||||
rules: {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
returnStatus(i) {
|
||||
console.log(i)
|
||||
let obj = this.mes_job_single_report_sign_status.find(dict => dict.value == i)
|
||||
console.log(obj)
|
||||
if (obj)
|
||||
return obj.text
|
||||
else
|
||||
return ''
|
||||
},
|
||||
//合并标签编码
|
||||
scanBar() {
|
||||
const _this = this;
|
||||
uni.scanCode({
|
||||
scanType: ['barCode', 'qrCode'],
|
||||
success: function(res) {
|
||||
_this.formData.singleReportSign = res.result;
|
||||
}
|
||||
});
|
||||
},
|
||||
query() {
|
||||
let obj = {
|
||||
['A.singleReportSign-0']: this.formData.singleReportSign,
|
||||
['A.singleReportSign-op']: 'ct',
|
||||
gexpr: 'A'
|
||||
}
|
||||
advListMesJobSingleReportSign(obj).then(res => {
|
||||
this.reportList = res.rows.map(item => {
|
||||
let obj = this.whList.find(i => i.warehouseCode == item.whCode)
|
||||
if (obj) {
|
||||
console.log(obj)
|
||||
item.whName = obj.warehouseName
|
||||
}
|
||||
return item
|
||||
})
|
||||
})
|
||||
// listMesJobSingleReportSign(this.formData).then(res => {
|
||||
// if (res.rows.length > 0) {
|
||||
// if (!res.rows[0].whCode) {
|
||||
// this.reportList = res.rows
|
||||
// } else {
|
||||
// let obj = this.whList.find(item => item.warehouseCode == res.rows[0].whCode)
|
||||
// if (obj) {
|
||||
// console.log(obj)
|
||||
// res.rows[0].whName = obj.warehouseName
|
||||
// }
|
||||
// this.reportList = res.rows
|
||||
// }
|
||||
// } else {
|
||||
// this.$modal.msg("未查询到相关记录!");
|
||||
// }
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user