Commit ce3a4b8b authored by 张海景's avatar 张海景

update:修改质量列表和延迟时间

parent 7a07fb8c
...@@ -7,9 +7,9 @@ export default { ...@@ -7,9 +7,9 @@ export default {
// #endif // #endif
}, },
//把想要全局的数据放在globalData对象里,globalData是uniapp的不可以自定义命名。 //把想要全局的数据放在globalData对象里,globalData是uniapp的不可以自定义命名。
globalData:{ globalData: {
printSocket:null printSocket: null
}, },
onShow: function () {}, onShow: function () {},
onHide: function () {} onHide: function () {}
}; };
...@@ -25,4 +25,9 @@ export default { ...@@ -25,4 +25,9 @@ export default {
/deep/ .times .uni-date-picker__container { /deep/ .times .uni-date-picker__container {
height: 275px !important; height: 275px !important;
} }
/deep/ .uni-pagination__num-tag {
width: 60rpx !important;
height: 60rpx !important;
}
</style> </style>
...@@ -63,15 +63,15 @@ export default { ...@@ -63,15 +63,15 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
handleClick( ){ handleClick() {
if (this.tableParams.userName) { if (this.tableParams.userName) {
this.params.userName = this.tableParams.userName; this.params.userName = this.tableParams.userName;
} }
if (this.tableParams.nickName) { if (this.tableParams.nickName) {
this.params.nickName = this.tableParams.nickName; this.params.nickName = this.tableParams.nickName;
} }
this.params.pageNum = 1 this.params.pageNum = 1;
this.getList() this.getList();
}, },
async getList() { async getList() {
const res = await this.$u.api.getUserList(this.params); const res = await this.$u.api.getUserList(this.params);
...@@ -83,8 +83,8 @@ export default { ...@@ -83,8 +83,8 @@ export default {
}, },
// 分页触发 // 分页触发
change(e) { change(e) {
this.params.pageNum = e.current this.params.pageNum = e.current;
this.getList() this.getList();
}, },
toggleRowSelection(checked, arr) { toggleRowSelection(checked, arr) {
this.tableSelectData = arr; this.tableSelectData = arr;
......
<template> <template>
<view class="dmodel-table"> <view class="dmodel-table">
<view class="search"> <view class="search">
<u-form :model="tableParams" labelAlign="right" class="tableForm"> <u-form :model="tableParams" labelAlign="right" class="tableForm">
<u-form-item label="编号" label-width="60px" name="userName"> <u-form-item label="编号" label-width="60px" name="userName">
<uni-easyinput type="text" v-model="tableParams.userName" placeholder="请输入编号" /> <uni-easyinput type="text" v-model="tableParams.userName" placeholder="请输入编号" />
</u-form-item> </u-form-item>
<u-form-item label="名称" label-width="60px" name="nickName"> <u-form-item label="名称" label-width="60px" name="nickName">
<uni-easyinput type="text" v-model="tableParams.nickName" placeholder="请输入名称" /> <uni-easyinput type="text" v-model="tableParams.nickName" placeholder="请输入名称" />
</u-form-item> </u-form-item>
<u-form-item> <u-form-item>
<u-button class="btn" @click="handleClick" type="primary" size="medium">搜索</u-button> <u-button class="btn" @click="handleClick" type="primary" size="medium">搜索</u-button>
</u-form-item> </u-form-item>
</u-form> </u-form>
</view> </view>
<view> <view>
<zb-table ref="zbTable" rowKey="userName" <zb-table ref="zbTable" rowKey="userName" :columns="tableColumn" :data="tableData" :stripe="true" @toggleRowSelection="toggleRowSelection"></zb-table>
:columns="tableColumn" :data="tableData" :stripe="true" </view>
@toggleRowSelection="toggleRowSelection"> <view class="uni-pagination-box"><uni-pagination show-icon :page-size="params.pageSize" :current="params.pageNum" :total="total" @change="change" /></view>
</zb-table> </view>
</view>
<view class="uni-pagination-box"><uni-pagination show-icon :page-size="params.pageSize" :current="params.pageNum" :total="total" @change="change" /></view>
</view>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
data: { data: {
type: Object, type: Object,
default: () => {} default: () => {}
} }
}, },
data() { data() {
return { return {
params: { params: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
workstationId: this.data?.workstationId || null workstationId: this.data?.workstationId || null
}, },
total: 0, total: 0,
tableParams: { tableParams: {
nickName: null, nickName: null,
userName: null, userName: null
}, },
tableData: [], tableData: [],
tableSelectData: [], tableSelectData: [],
tableColumn: [{ tableColumn: [
type: 'radio', {
width: 40 type: 'radio',
}, width: 40
{ },
name: 'userName', {
label: '编号', name: 'userName',
width: 160, label: '编号',
}, width: 160
{ },
name: 'nickName', {
label: '名称', name: 'nickName',
width: 200, label: '名称',
}, width: 200
},
{ {
name: 'workstationName', name: 'workstationName',
label: '工作站', label: '工作站',
width: 160, width: 160
}, }
], ]
} };
}, },
// computed: { // computed: {
// tableData() { // tableData() {
// return this.data || [] // return this.data || []
// } // }
// }, // },
mounted() { mounted() {
this.getList() this.getList();
// this.data.workstationName // this.data.workstationName
}, },
methods: { methods: {
handleClick( ){ handleClick() {
if (this.tableParams.userName) { if (this.tableParams.userName) {
this.params.userName = this.tableParams.userName; this.params.userName = this.tableParams.userName;
} }
if (this.tableParams.nickName) { if (this.tableParams.nickName) {
this.params.nickName = this.tableParams.nickName; this.params.nickName = this.tableParams.nickName;
} }
this.params.pageNum = 1 this.params.pageNum = 1;
this.getList() this.getList();
}, },
async getList() { async getList() {
const res = await this.$u.api.userQuery(this.params) const res = await this.$u.api.userQuery(this.params);
console.log(res, 'res') console.log(res, 'res');
if (res.code == 200) { if (res.code == 200) {
this.tableData= res.rows.map(item => { this.tableData = res.rows.map((item) => {
return { return {
...item, ...item,
workstationName: this.data?.workstationName || null workstationName: this.data?.workstationName || null
} };
}) });
this.total = res.total this.total = res.total;
} }
}, },
// 分页触发 // 分页触发
change(e) { change(e) {
this.params.pageNum = e.current this.params.pageNum = e.current;
this.getList() this.getList();
}, },
toggleRowSelection(checked, arr) { toggleRowSelection(checked, arr) {
this.tableSelectData = arr this.tableSelectData = arr;
}, }
} }
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.dmodel-table { .dmodel-table {
height: 1200rpx; height: 1200rpx;
margin-top: 20rpx; margin-top: 20rpx;
padding: 0 20rpx; padding: 0 20rpx;
position: relative; position: relative;
} }
.tableForm{ .tableForm {
display: flex; display: flex;
margin-bottom:20rpx; margin-bottom: 20rpx;
} }
.btn{ .btn {
margin-left:10px; margin-left: 10px;
} }
.uni-pagination-box{ .uni-pagination-box {
position: absolute; position: absolute;
right:20rpx; right: 20rpx;
bottom:40rpx; bottom: 40rpx;
} }
</style> </style>
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
</view> </view>
<u-button type="primary" @click="commonClick('Refresh')">刷新</u-button> <u-button type="primary" @click="commonClick('Refresh')">刷新</u-button>
<u-button type="success" @click="commonClick('StartTask')">开始作业</u-button> <u-button type="success" @click="commonClick('StartTask')">开始作业</u-button>
<u-button type="warning" @click="commonClick('StopTask')">暂停作业</u-button> <u-button type="warning" @click="commonClick('StopTask')">暂停作业</u-button>
<u-button type="success" @click="commonClick('Prod')">生产报工</u-button> <u-button type="success" @click="commonClick('Prod')">生产报工</u-button>
<u-button type="primary" @click="commonClick('FinshTask')">完成作业</u-button> <u-button type="primary" @click="commonClick('FinshTask')">完成作业</u-button>
<u-button type="primary" @click="commonClick('KnifeTemp')">刀模版上下机</u-button> <u-button type="primary" @click="commonClick('KnifeTemp')">刀模版上下机</u-button>
...@@ -282,7 +282,7 @@ ...@@ -282,7 +282,7 @@
v-model="userTempVisible" v-model="userTempVisible"
width="1300rpx" width="1300rpx"
> >
<view class="feedback-card"> <view>
<userPersonnel ref="userPersonnelRef" v-if="userTempVisible" :data="usePersonData" /> <userPersonnel ref="userPersonnelRef" v-if="userTempVisible" :data="usePersonData" />
</view> </view>
</u-modal> </u-modal>
...@@ -439,7 +439,7 @@ ...@@ -439,7 +439,7 @@
<view class="list-bar"> <view class="list-bar">
<u-form label-width="65px" labelAlign="right" :model="curTaskInfo"> <u-form label-width="65px" labelAlign="right" :model="curTaskInfo">
<u-row> <u-row>
<u-col span="3"> <u-col span="3">
<u-form-item label="编排单号"> <u-form-item label="编排单号">
{{ curTaskInfo.arrangeCode }} {{ curTaskInfo.arrangeCode }}
</u-form-item> </u-form-item>
...@@ -449,7 +449,7 @@ ...@@ -449,7 +449,7 @@
<uni-data-select v-model="curTaskInfo.workorderCode" @change="materialReturnWorkorderProcessItem" :localdata="curTaskInfo.workorderOption"></uni-data-select> <uni-data-select v-model="curTaskInfo.workorderCode" @change="materialReturnWorkorderProcessItem" :localdata="curTaskInfo.workorderOption"></uni-data-select>
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col span="4.5"> <u-col span="4.5">
<u-form-item label="领料原因" prop="pickingReason"> <u-form-item label="领料原因" prop="pickingReason">
<uni-data-select v-model="curTaskInfo.pickingReason" :localdata="reasonList" @change="pickingCause"></uni-data-select> <uni-data-select v-model="curTaskInfo.pickingReason" :localdata="reasonList" @change="pickingCause"></uni-data-select>
</u-form-item> </u-form-item>
...@@ -830,8 +830,8 @@ export default { ...@@ -830,8 +830,8 @@ export default {
depletionMethod: 1 depletionMethod: 1
}, },
curTaskInfo: { curTaskInfo: {
pickingReason: null pickingReason: null
}, },
currentType: 0, currentType: 0,
bomFeeData: [], bomFeeData: [],
bomFeeColumn: [ bomFeeColumn: [
...@@ -985,7 +985,7 @@ export default { ...@@ -985,7 +985,7 @@ export default {
viewSop: [], viewSop: [],
reasonList: [], reasonList: [],
causeList: [], causeList: [],
reasonList: [], reasonList: [],
workorderList: [], workorderList: [],
materialUsageRecordList: [], materialUsageRecordList: [],
materialusagerecordLoading: false, materialusagerecordLoading: false,
...@@ -1244,7 +1244,7 @@ export default { ...@@ -1244,7 +1244,7 @@ export default {
break; break;
case 'MaterialRequest': case 'MaterialRequest':
this.materialRequestShow(); this.materialRequestShow();
this.pickingCause(); this.pickingCause();
break; break;
case 'MaterialReturn': case 'MaterialReturn':
this.materialReturnShow(); this.materialReturnShow();
...@@ -1455,25 +1455,25 @@ export default { ...@@ -1455,25 +1455,25 @@ export default {
}); });
}); });
}, },
pickingCause() { pickingCause() {
// 查询原因 // 查询原因
this.$u.api.abnormal this.$u.api.abnormal
.detail({ .detail({
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
abnormalType: 'REASON' abnormalType: 'REASON'
}) })
.then((res) => { .then((res) => {
this.reasonList = res.rows.map((item) => { this.reasonList = res.rows.map((item) => {
return { return {
value: item.abnormalReason, value: item.abnormalReason,
text: item.abnormalReason text: item.abnormalReason
}; };
}); });
}); });
}, },
getWorkorderWithSizeAndDirective(item, index) { getWorkorderWithSizeAndDirective(item, index) {
this.$u.api this.$u.api
.getWorkorderWithSizeAndDirective({ .getWorkorderWithSizeAndDirective({
...@@ -1850,8 +1850,8 @@ export default { ...@@ -1850,8 +1850,8 @@ export default {
this.$u.toast('打印机连接失败'); this.$u.toast('打印机连接失败');
return; return;
} }
console.log(item, 'item') console.log(item, 'item');
debugger debugger;
//工单 //工单
this.$u.api this.$u.api
.feedback({ .feedback({
...@@ -2042,11 +2042,11 @@ export default { ...@@ -2042,11 +2042,11 @@ export default {
this.materialRequestFormVisible = false; this.materialRequestFormVisible = false;
}, },
materialRequestSave() { materialRequestSave() {
if(!this.curTaskInfo.pickingReason){ if (!this.curTaskInfo.pickingReason) {
this.materialRequestVisible = true this.materialRequestVisible = true;
this.$u.toast("原因不能为空!") this.$u.toast('原因不能为空!');
return return;
} }
const rst = []; const rst = [];
const taskInfo = this.tableSelectData[0]; const taskInfo = this.tableSelectData[0];
const t = this; const t = this;
...@@ -2055,7 +2055,7 @@ export default { ...@@ -2055,7 +2055,7 @@ export default {
this.materialRequestArrays.forEach((s) => { this.materialRequestArrays.forEach((s) => {
if (s.applyNum != null) { if (s.applyNum != null) {
rst.push({ rst.push({
pickingReason: this.curTaskInfo.pickingReason, pickingReason: this.curTaskInfo.pickingReason,
itemId: s.itemId, itemId: s.itemId,
taskWorkunitId: this.curTaskInfo.taskWorkunitId, taskWorkunitId: this.curTaskInfo.taskWorkunitId,
workorderCode: items?.text, workorderCode: items?.text,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment