1
This commit is contained in:
parent
2f55d33c89
commit
bbfaad9630
@ -2,7 +2,7 @@ import request from '@/utils/request'
|
||||
|
||||
|
||||
/**
|
||||
* 获取报工工单列表
|
||||
* NODO 获取报工工单列表
|
||||
* @param {Id}
|
||||
*/
|
||||
export function getReportWorkOrderList(quary) {
|
||||
@ -12,6 +12,19 @@ export function getReportWorkOrderList(quary) {
|
||||
data:quary
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工单列表 PDA
|
||||
* @param {Id}
|
||||
*/
|
||||
export function getWorkOrderStatusList(quary) {
|
||||
return request({
|
||||
url: '/kanban/workorderProgress/get_workorder_status_list',
|
||||
method: 'get',
|
||||
params:quary
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 如果没有报工记录,先生成报工记录
|
||||
* @param {Id}
|
||||
|
||||
@ -7,7 +7,7 @@ module.exports = {
|
||||
// 应用名称
|
||||
name: "DOAN-PDA",
|
||||
// 应用版本
|
||||
version: "1.0.0",
|
||||
version: "1.1.4",
|
||||
// 应用logo
|
||||
logo: "/static/logo.png",
|
||||
// 官方网站
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
"name" : "DOAN总装车间PDA",
|
||||
"appid" : "__UNI__EFA389B",
|
||||
"description" : "",
|
||||
"versionName" : "1.1.1",
|
||||
"versionCode" : 111,
|
||||
"versionName" : "1.1.4",
|
||||
"versionCode" : 114,
|
||||
"transformPx" : false,
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
|
||||
@ -33,10 +33,10 @@
|
||||
<uni-forms-item label="计划生产" name="deliveryNum">
|
||||
<span>{{ formData.deliveryNum }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item v-if="formData.status === 2" label="报工数" name="finishedNum">
|
||||
<uni-forms-item v-if="formData.status !==1" label="报工数" name="finishedNum">
|
||||
<uni-number-box class="input-item" :width="200" v-model="finishedNum" placeholder="请输入报工数" :max="99999" ></uni-number-box>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item v-if="formData.status === 2" label="">
|
||||
<uni-forms-item v-if="formData.status !==1" label="">
|
||||
<span class="row-box">
|
||||
<button @click="addFinishedNum">增加</button>
|
||||
<button @click="reduceFinishedNum">减少</button>
|
||||
@ -47,7 +47,7 @@
|
||||
</uni-card>
|
||||
<view class="bottom-box" v-if="formData.workorder">
|
||||
<button v-if="formData.status === 1" :disabled="loading" type="primary" @click="doStartWorkOrder">开始工单</button>
|
||||
<button v-if="formData.status === 2" :disabled="loading" type="warn" @click="doFinfishWorkOrder2">完成工单</button>
|
||||
<button v-if="formData.status === 2 || formData.status === 3" :disabled="loading" type="warn" @click="doFinfishWorkOrder2">报工并完成工单</button>
|
||||
</view>
|
||||
<!-- 报工数自动修改 -->
|
||||
<view>
|
||||
@ -64,19 +64,34 @@
|
||||
></uni-popup-dialog>
|
||||
</uni-popup>
|
||||
</view>
|
||||
<!-- 完成工单校验 -->
|
||||
<!-- <view>
|
||||
<!-- 初次进入校验 -->
|
||||
<view>
|
||||
<uni-popup ref="inputDialog2" type="dialog">
|
||||
<uni-popup-dialog
|
||||
ref="inputClose2"
|
||||
mode="input"
|
||||
title="扫"
|
||||
value=""
|
||||
placeholder="请扫报工码校验"
|
||||
@confirm="dialogInputConfirm2"
|
||||
title="操作提醒"
|
||||
content="工单已完成报工,是否继续报工!"
|
||||
type="warning"
|
||||
cancelText="关闭" confirmText="继续"
|
||||
@confirm="dialogConfirm2"
|
||||
@close="dialogClose2"
|
||||
></uni-popup-dialog>
|
||||
</uni-popup>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- 异常消息3 -->
|
||||
<view>
|
||||
<uni-popup ref="inputDialog3" type="dialog">
|
||||
<uni-popup-dialog
|
||||
ref="inputClose3"
|
||||
title="扫码异常"
|
||||
content="报工号异常,该工单不属于此组"
|
||||
type="error"
|
||||
cancelText="关闭"
|
||||
@confirm="dialogConfirm3"
|
||||
@close="dialogClose3"
|
||||
></uni-popup-dialog>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -102,6 +117,7 @@ export default {
|
||||
numModel:1,
|
||||
inputDialog:null,
|
||||
inputClose:null,
|
||||
dialog2Check:false,
|
||||
inputDialog2:null,
|
||||
inputClose2:null,
|
||||
};
|
||||
@ -131,13 +147,13 @@ export default {
|
||||
return;
|
||||
}
|
||||
if (res1.data.groupCode !== this.groupCode) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '扫码结果异常,该工单不属于此组'
|
||||
});
|
||||
this.$refs.inputDialog3.open()
|
||||
this.loading = false;
|
||||
return;
|
||||
}
|
||||
if(res1.data.status === 3){
|
||||
this.$refs.inputDialog2.open();
|
||||
}
|
||||
this.formData = res1.data;
|
||||
this.finishedNum = res1.data.finishNum ?? 0;
|
||||
this.loading = false;
|
||||
@ -194,6 +210,12 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
// 提示2
|
||||
dialogConfirm2(){
|
||||
},
|
||||
dialogClose2(){
|
||||
uni.navigateBack(-1)
|
||||
},
|
||||
// NODO 打开扫码报工
|
||||
openDialog2() {
|
||||
this.$refs.inputDialog2.open()
|
||||
@ -277,6 +299,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 不放错 报工 + 完成工单
|
||||
doFinfishWorkOrder2(){
|
||||
let that = this
|
||||
@ -320,6 +343,12 @@ export default {
|
||||
this.loading = true;
|
||||
uni.hideLoading();
|
||||
})
|
||||
},
|
||||
dialogConfirm3(){
|
||||
|
||||
},
|
||||
dialogClose3(){
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -14,10 +14,11 @@
|
||||
</uni-forms-item>
|
||||
<button type="primary" plain @click="getList()">
|
||||
<uni-icons color="#2979ff" type="search" size="18"></uni-icons>
|
||||
查询
|
||||
查询工单
|
||||
</button>
|
||||
</uni-forms>
|
||||
</view>
|
||||
<uni-segmented-control :current="current" activeColor="#007aff" :values="selectItems" @clickItem="onClickSelect" />
|
||||
<scroll-view class="scroll-view" scroll-y="true">
|
||||
<uni-list style="width: 100%">
|
||||
<uni-list-item
|
||||
@ -45,7 +46,7 @@
|
||||
// 基础数据
|
||||
import { GetAllRoute, GetAllGroup } from '@/api/workorder/proworkorder.js';
|
||||
// 工单信息
|
||||
import { getReportWorkOrderList } from '@/api/workorder/proreportwork.js';
|
||||
import { getReportWorkOrderList,getWorkOrderStatusList } from '@/api/workorder/proreportwork.js';
|
||||
import { tansParams } from '@/utils/common';
|
||||
export default {
|
||||
data() {
|
||||
@ -54,8 +55,11 @@ export default {
|
||||
query: {
|
||||
lineCode: '',
|
||||
groupCode: '1',
|
||||
status: 1,
|
||||
dateTime: this.$dayjs().format('YYYY-MM-DD')
|
||||
},
|
||||
current:0,
|
||||
selectItems: ['未开始', '进行中', '已完成'],
|
||||
value: '',
|
||||
// 线别
|
||||
lineOptions: [],
|
||||
@ -72,7 +76,8 @@ export default {
|
||||
},
|
||||
onShow: function () {
|
||||
this.getSessionStorage();
|
||||
this.getList();
|
||||
this.current = this.query.status - 1
|
||||
//this.getList();
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
@ -90,6 +95,10 @@ export default {
|
||||
return 'bg-green';
|
||||
}
|
||||
},
|
||||
onClickSelect(e) {
|
||||
this.query.status = e.currentIndex + 1;
|
||||
this.getList()
|
||||
},
|
||||
async getSelectOptions() {
|
||||
uni.showLoading();
|
||||
const res1 = await GetAllRoute();
|
||||
@ -138,18 +147,16 @@ export default {
|
||||
getList() {
|
||||
this.dataList = [];
|
||||
const params = {
|
||||
pageIndex: 1,
|
||||
pageSize: 1000,
|
||||
groupCode: this.query.groupCode,
|
||||
lineCode: null,
|
||||
timeRange: [this.query.dateTime, this.query.dateTime]
|
||||
status: this.query.status,
|
||||
timeRange: [this.query.dateTime,this.query.dateTime]
|
||||
};
|
||||
getReportWorkOrderList(params).then((res) => {
|
||||
let that = this
|
||||
let that = this;
|
||||
if (res.code === 200) {
|
||||
this.setSessionStorage(this.query);
|
||||
this.dataList = res.data.result.map((item) => {
|
||||
let statusStr = that.getWorkOrderStatus(item.status)
|
||||
let statusStr = that.getWorkOrderStatus(item.status);
|
||||
return {
|
||||
id: item.id,
|
||||
workOrderInfo: item,
|
||||
@ -162,12 +169,12 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
getWorkOrderStatus(status = 0){
|
||||
try{
|
||||
getWorkOrderStatus(status = 0) {
|
||||
try {
|
||||
const list = ['', '未开始', '进行中', '已完成'];
|
||||
return list[status * 1]
|
||||
}catch(e){
|
||||
return ''
|
||||
return list[status * 1];
|
||||
} catch (e) {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
WorkOrderStatusColor(status) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user