From 64a7f738aadbf552bfb1ce24c46b1924767bf526 Mon Sep 17 00:00:00 2001
From: Mr.Zhang <710666463@qq.com>
Date: 星期二, 05 九月 2023 16:00:16 +0800
Subject: [PATCH] 小程序
---
minipro_standard/pages_adjust/pages/workOrder/workOrder.vue | 453 ++++++++++++
minipro_standard/store/index.js | 6
minipro_standard/util/api/PlanningAPI.js | 2
minipro_standard/pages_adjust/pages/workOrderReporting/workOrderReporting.vue | 224 +++++
minipro_standard/pages/index/index.vue | 295 ++++---
minipro_standard/common/config.js | 2
minipro_standard/components/LabelSelection.vue | 35
minipro_standard/pages.json | 50
minipro_standard/pages_adjust/pages/spotCheck/spotCheck.vue | 446 ++++++++++++
minipro_standard/components/workOrderInfo.vue | 19
minipro_standard/pages_adjust/pages/manualFeed/manualFeed.vue | 82 +
minipro_standard/util/request/responseInterceptors.js | 12
minipro_standard/components/selectMaterial.vue | 132 ++-
minipro_standard/pages_adjust/pages/OrderDetail/OrderDetail.vue | 22
minipro_standard/util/utils.js | 17
minipro_standard/components/SelectMultipleMaterial.vue | 314 ++++----
16 files changed, 1,651 insertions(+), 460 deletions(-)
diff --git a/minipro_standard/common/config.js b/minipro_standard/common/config.js
index 0d13af6..fced58f 100644
--- a/minipro_standard/common/config.js
+++ b/minipro_standard/common/config.js
@@ -1,7 +1,7 @@
module.exports = {
// baseUrl: 'http://106.14.20.42/test_hfznzz/',
// baseUrl: 'https://hefei.dtkey.cn/test_hfznzz/',
- baseUrl: 'http://192.168.0.15:10021/',
+ baseUrl: 'http://192.168.0.15:10021',
// baseUrl: 'https://dmtest.ahapp.net/doumeeplant_api',
phoneRegular: /^1[3456789]\d{9}$/,
mailboxRegular: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,
diff --git a/minipro_standard/components/LabelSelection.vue b/minipro_standard/components/LabelSelection.vue
index 6a26a84..0bde662 100644
--- a/minipro_standard/components/LabelSelection.vue
+++ b/minipro_standard/components/LabelSelection.vue
@@ -1,10 +1,10 @@
<template>
<scroll-view class="tag" scroll-x>
<view class="tag_list">
- <view v-for="item in TagList"
- :key="item.id"
- :class="{'tag_item': true, 'tagActive': item.id == activeId}"
- @click="change(item)">
+ <view v-for="(item, index) in TagList"
+ :key="index"
+ :class="{'tag_item': true, 'tagActive': index == activeId}"
+ @click="change(item, index)">
<text>{{item.name}}</text>
<text v-if="isShow && item.num">({{item.num}})</text>
</view>
@@ -21,27 +21,27 @@
},
data() {
return {
- activeId: ''
+ activeId: 0
};
},
methods: {
- change(item) {
- if (this.activeId !== item.id) {
- this.activeId = item.id
+ change(item, index) {
+ if (this.activeId !== index) {
+ this.activeId = index
this.$emit('change', item.id)
}
}
},
watch: {
- TagList: {
- immediate: true,
- handler(news, old) {
- let list = news
- if (list && list.length !== 0) {
- this.activeId = list[0].id
- }
- }
- }
+ // TagList: {
+ // immediate: true,
+ // handler(news, old) {
+ // let list = news
+ // if (list && list.length !== 0) {
+ // this.activeId = list[0].id
+ // }
+ // }
+ // }
}
}
</script>
@@ -80,6 +80,7 @@
text {
font-size: 26rpx;
font-weight: 400;
+ line-height: 26rpx;
color: #555555;
}
}
diff --git a/minipro_standard/components/SelectMultipleMaterial.vue b/minipro_standard/components/SelectMultipleMaterial.vue
index 4939502..b081ce0 100644
--- a/minipro_standard/components/SelectMultipleMaterial.vue
+++ b/minipro_standard/components/SelectMultipleMaterial.vue
@@ -6,61 +6,65 @@
</v-Search>
<div class="content_total">鍏眥{pages.total}}鏉℃暟鎹�</div>
<view class="scroll-content">
- <u-list @scrolltoupper="scrolltoupper" @scrolltolower="scrolltolower">
- <u-list-item v-for="(item1, index) in list" :key="index">
- <view class="flex mb20" @click="selectMaterialAction(index)">
- <view class="img36 mr20 pt10">
- <u-checkbox-group style="display: block;" name="" @change="selectMaterialAction(index)">
- <u-checkbox :checked="item1.isActive"></u-checkbox>
- </u-checkbox-group>
- </view>
- <view class="fx1">
- <div class="page_content_title_top">
- <span>{{ item1.materialName + ' | ' + item1.materialCode }}</span>
- </div>
- <div class="page_content_title_bottom">
- <span class="green" v-if="item1.qualityType == 0">
- 鍚堟牸
- <text class="c1" decode>{{ splite }}</text>
- </span>
- <span class="orange" v-else-if="item1.qualityType == 1">
- 涓嶈壇
- <text class="c1" decode>{{ splite }}</text>
- </span>
- <span class="red" v-else-if="item1.qualityType == 2">
- 鎶ュ簾
- <text class="c1" decode>{{ splite }}</text>
- </span>
- <span v-else>
- -
- <text class="c1" decode>{{ splite }}</text>
- </span>
- <span>
- {{item1.procedureName ? item1.procedureName : '-'}}
- <text class="c1" decode>{{ splite }}</text>
- </span>
- <span>{{item1.batch ? item1.batch : '-'}}</span>
- </div>
- <div class="mt20 plr25 ptb20 bg_f7 f26">
- <div class="c2 mb10"><span class="c6">璐т綅锛�</span>{{ item1.locationName }}</div>
- <div class="c2"><span class="c6">鏁伴噺锛�</span>{{ item1.num }}{{ item1.unitName }}</div>
- </div>
- </view>
+ <scroll-view scroll-y="true" refresher-enabled="true" :refresher-triggered="refreshing" @scrolltolower="loadMore"
+ @refresherrefresh="onRefresh">
+ <view v-for="(item1, index) in list" :key="index" class="flex mb20" @click="selectMaterialAction(index)">
+ <view class="img36 mr20 pt10">
+ <u-checkbox-group style="display: block;" name="" @change="selectMaterialAction(index)">
+ <u-checkbox :checked="selectIndex.includes(index)"></u-checkbox>
+ </u-checkbox-group>
</view>
- </u-list-item>
- </u-list>
- </view>
- <view style="height: 98rpx;"></view>
- <!-- <view class="">
- <u-safe-bottom></u-safe-bottom>
- </view> -->
- <view class="fixedBottom bottom cY">
- <view class="fx1 bbox plr30">
- <u-checkbox-group style="display: block;" name="" @change="selectAll()">
- <u-checkbox :checked="isAll" label="鍏ㄩ��"></u-checkbox>
- </u-checkbox-group>
- </view>
- <view class="submit sbtn_green bbox tc">鎻愪氦()</view>
+ <view class="fx1">
+ <div class="page_content_title_top">
+ <span>{{ item1.materialName + ' | ' + item1.materialCode }}</span>
+ </div>
+ <div class="page_content_title_bottom">
+ <span class="green" v-if="item1.qualityType == 0">
+ 鍚堟牸
+ <text class="c1" decode>{{ splite }}</text>
+ </span>
+ <span class="orange" v-else-if="item1.qualityType == 1">
+ 涓嶈壇
+ <text class="c1" decode>{{ splite }}</text>
+ </span>
+ <span class="red" v-else-if="item1.qualityType == 2">
+ 鎶ュ簾
+ <text class="c1" decode>{{ splite }}</text>
+ </span>
+ <span v-else>
+ -
+ <text class="c1" decode>{{ splite }}</text>
+ </span>
+ <span>
+ {{item1.procedureName ? item1.procedureName : '-'}}
+ <text class="c1" decode>{{ splite }}</text>
+ </span>
+ <span>{{item1.batch ? item1.batch : '-'}}</span>
+ </div>
+ <div class="mt20 plr25 ptb20 bg_f7 f26">
+ <div class="c2 mb10"><span class="c6">璐т綅锛�</span>{{ item1.locationName }}</div>
+ <div class="c2"><span class="c6">鏁伴噺锛�</span>{{ item1.num }}{{ item1.unitName }}</div>
+ </div>
+ </view>
+ </view>
+ </scroll-view>
+ <!-- <u-list @scrolltoupper="scrolltoupper" @scrolltolower="scrolltolower">
+ <u-list-item v-for="(item1, index) in list" :key="index">
+
+ </u-list-item>
+ </u-list> -->
+ </view>
+ <view style="height: 98rpx;"></view>
+ <!-- <view class="">
+ <u-safe-bottom></u-safe-bottom>
+ </view> -->
+ <view class="fixedBottom bottom cY">
+ <view class="fx1 bbox plr30">
+ <u-checkbox-group style="display: block;" name="" @change="selectAll()">
+ <u-checkbox :checked="isAll" label="鍏ㄩ��"></u-checkbox>
+ </u-checkbox-group>
+ </view>
+ <view class="submit sbtn_green bbox tc" @click="submitAction">{{ `鎻愪氦(${selectIndex.length})`}}</view>
</view>
</view>
</u-popup>
@@ -68,6 +72,10 @@
<script>
import vSearch from '@/components/Search.vue'
+ import {
+ choiceStockListPage,
+ choiceStockPageForStandard
+ } from '@/util/api/agencyAPI'
export default {
name: "selectMaterial",
components: {
@@ -75,141 +83,109 @@
},
data() {
return {
- show: false,
- splite:' | ',
+ show: false,
+ splite: ' | ',
isAll: false,
+ refreshing: false,
pages: {
- size: 10,
- index: 1,
+ capacity: 10,
+ page: 1,
total: 0
},
- list: []
+ list: [],
+ selectIndex: []
};
},
methods: {
open(target) {
- this.show = true
+ this.show = true
+ this.refreshing = false
this.workorderId = target.workorderId
this.deviceId = target.deviceId
- this.list = []
+ this.list = []
+ this.selectIndex = []
+
+ // console.log(this.selectIndex);
this.pages = {
- size: 10,
- index: 1,
+ capacity: 10,
+ page: 1,
total: 0
}
this.loadData()
},
loadData() {
- this.list = [{
- batch: '1',
- materialName: 'dsadas',
- materialCode: '1m0001',
- locationName: 'a浠�2鍙蜂綅',
- num: '1',
- unitName: '鍧�',
- qualityType: 0,
- procedureName: '鍘嬪埗',
- isActive: false
- },
- {
- batch: '1',
- materialName: 'dsadas',
- materialCode: '1m0001',
- locationName: 'a浠�2鍙蜂綅',
- num: '1',
- unitName: '鍧�',
- qualityType: 0,
- procedureName: '鍘嬪埗',
- isActive: false
- },
- {
- batch: '1',
- materialName: 'dsadas',
- materialCode: '1m0001',
- locationName: 'a浠�2鍙蜂綅',
- num: '1',
- unitName: '鍧�',
- qualityType: 0,
- procedureName: '鍘嬪埗',
- isActive: false
- },
- {
- batch: '1',
- materialName: 'dsadas',
- materialCode: '1m0001',
- locationName: 'a浠�2鍙蜂綅',
- num: '1',
- unitName: '鍧�',
- qualityType: 0,
- procedureName: '鍘嬪埗',
- isActive: false
- },
- {
- batch: '1',
- materialName: 'dsadas',
- materialCode: '1m0001',
- locationName: 'a浠�2鍙蜂綅',
- num: '1',
- unitName: '鍧�',
- qualityType: 0,
- procedureName: '鍘嬪埗',
- isActive: false
- },
- {
- batch: '1',
- materialName: 'dsadas',
- materialCode: '1m0001',
- locationName: 'a浠�2鍙蜂綅',
- num: '1',
- unitName: '鍧�',
- qualityType: 0,
- procedureName: '鍘嬪埗',
- isActive: false
- },
- {
- batch: '1',
- materialName: 'dsadas',
- materialCode: '1m0001',
- locationName: 'a浠�2鍙蜂綅',
- num: '1',
- unitName: '鍧�',
- qualityType: 0,
- procedureName: '鍘嬪埗',
- isActive: false
- }
- ]
+ choiceStockPageForStandard({
+ ...this.pages,
+ model: {
+ workorderId: this.workorderId,
+ deviceId: this.deviceId
+ }
+ }).then(res => {
+ let {data} = res
+ if (data.page == 1) {
+ this.list = [];
+ }
+ this.pages.page = data.page
+ this.pages.total = data.total
+ this.list.push(...data.records)
+ }).catch((err) => {
+
+ })
+ .finally(() => {
+ this.refreshing = false;
+ })
},
- scrolltoupper() {
+ loadMore() {
+ this.pages.page += 1
this.loadData()
},
- scrolltolower() {
+ onRefresh() {
+ if (this.refreshing) return
+ this.refreshing = true;
+ this.pages.page = 1
this.loadData()
},
selectMaterialAction(index) {
- // console.log('12');
- this.list[index].isActive = !this.list[index].isActive
+ let i = this.selectIndex.findIndex(item => item==index)
+ if (i == -1 ) {
+ this.selectIndex.push(index)
+ } else {
+ this.selectIndex.splice(i)
+ }
+ },
+ selectAll() {
+ this.selectIndex = []
+ this.selectIndex = [...new Array(this.list.length).keys()]
},
- selectAll() {}
+ submitAction () {
+ this.show = false
+ let selectValue = []
+ this.selectIndex.forEach(item => {
+ selectValue.push(this.list[item])
+ })
+ this.$emit('selectes', { materials: selectValue })
+ }
}
- }
- /*
- */
+ }
+ /*
+ */
</script>
<style lang="scss" scoped>
- .material-content {
- display: flex;
- flex-direction: column;
- height: 1200rpx;
- box-sizing: border-box;
- .scroll-content {
- height: calc(1100rpx - env(safe-area-inset-bottom));
- overflow: scroll;
+ .material-content {
+ display: flex;
+ flex-direction: column;
+ height: 1200rpx;
+ box-sizing: border-box;
+
+ .scroll-content {
+ height: calc(1100rpx - env(safe-area-inset-bottom));
+ overflow: scroll;
}
}
- .content_total {
- margin-top: 20rpx;
+ .content_total {
+ margin-top: 20rpx;
margin-bottom: 20rpx;
// padding: 24rpx 30rpx;
// background: #F7F7F7;
@@ -258,17 +234,19 @@
display: flex;
flex-direction: column;
margin-bottom: 10rpx;
-
- }
- .bottom {
- height: 98rpx;
- .submit {
- width: 272rpx;
- height: 98rpx;
- line-height: 98rpx;
- }
+
+ }
+
+ .bottom {
+ height: 98rpx;
+
+ .submit {
+ width: 272rpx;
+ height: 98rpx;
+ line-height: 98rpx;
+ }
}
</style>
diff --git a/minipro_standard/components/selectMaterial.vue b/minipro_standard/components/selectMaterial.vue
index c2250fe..89224e5 100644
--- a/minipro_standard/components/selectMaterial.vue
+++ b/minipro_standard/components/selectMaterial.vue
@@ -2,44 +2,51 @@
<u-popup :show="show" :round="10" closeable @close="show=false">
<view class="material-content bbox p30">
<view class="tc b f24 c2">閫夋嫨鐗╂枡</view>
- <u-list @scrolltoupper="scrolltoupper" @scrolltolower="scrolltolower">
+ <scroll-view scroll-y="true" refresher-enabled="true" :refresher-triggered="refreshing"
+ @scrolltolower="loadMore" @refresherrefresh="onRefresh">
+ <view v-for="(item1, index) in list" :key="index" class="" style="height: 20px;" @click="jump(item1)">
+ <div class="page_content_title_top">
+ <span>{{ item1.materialName + ' | ' + item1.materialCode }}</span>
+ </div>
+ <div class="page_content_title_bottom">
+ <span>{{ item1.locationName }} / </span>
+ <span>{{ item1.num }}{{ item1.unitName }}</span>
+ </div>
+ <div class="page_content_title_bottom">
+ <span class="green" v-if="item1.qualityType == 0">鍚堟牸 <span class="c1">/</span> </span>
+ <span class="orange" v-else-if="item1.qualityType == 1">涓嶈壇 <span
+ class="c1">/</span> </span>
+ <span class="red" v-else-if="item1.qualityType == 2">鎶ュ簾 <span
+ class="c1">/</span> </span>
+ <span v-else>- / </span>
+ <span>{{item1.procedureName ? item1.procedureName : '-'}} / </span>
+ <span>{{item1.batch ? item1.batch : '-'}}</span>
+ </div>
+ </view>
+ </scroll-view>
+ <!-- <u-list @scrolltoupper="scrolltoupper" @scrolltolower="scrolltolower">
<u-list-item v-for="(item1, index) in list" :key="index">
- <view class="" style="height: 20px;" @click="jump(item1)">
- <div class="page_content_title_top">
- <span>{{ item1.materialName + ' | ' + item1.materialCode }}</span>
- </div>
- <div class="page_content_title_bottom">
- <span>{{ item1.locationName }} / </span>
- <span>{{ item1.num }}{{ item1.unitName }}</span>
- </div>
- <div class="page_content_title_bottom">
- <span class="green" v-if="item1.qualityType == 0">鍚堟牸 <span
- class="c1">/</span> </span>
- <span class="orange" v-else-if="item1.qualityType == 1">涓嶈壇 <span
- class="c1">/</span> </span>
- <span class="red" v-else-if="item1.qualityType == 2">鎶ュ簾 <span
- class="c1">/</span> </span>
- <span v-else>- / </span>
- <span>{{item1.procedureName ? item1.procedureName : '-'}} / </span>
- <span>{{item1.batch ? item1.batch : '-'}}</span>
- </div>
- </view>
</u-list-item>
- </u-list>
+ </u-list> -->
</view>
</u-popup>
</template>
<script>
+ import {
+ choiceStockListPage,
+ choiceStockPageForStandard
+ } from '@/util/api/agencyAPI'
export default {
name: "selectMaterial",
data() {
return {
- show: false,
- pages: {
- size: 10,
- index: 1,
- total: 0
+ show: false,
+ refreshing: false,
+ pages: {
+ capacity: 10,
+ page: 1,
+ total: 0
},
list: [
1, 2, 3, 4, 5, 6, 7, 8
@@ -49,39 +56,64 @@
methods: {
open(target) {
this.show = true
- this.workorderId = target.workorderId
+ this.refreshing = false
+ this.workorderId = target.workorderId
this.deviceId = target.deviceId
this.list = []
- this.pages = {
- size: 10,
- index: 1,
- total: 0
+ this.pages = {
+ capacity: 10,
+ page: 1,
+ total: 0
}
this.loadData()
},
loadData() {
- this.list = [{
- batch: '1',
- materialName: 'dsadas',
- materialCode: '1m0001',
- locationName: 'a浠�2鍙蜂綅',
- num: '1',
- unitName: '鍧�',
- qualityType: 0,
- procedureName: '鍘嬪埗',
- }]
+ // this.list = [{
+ // batch: '1',
+ // materialName: 'dsadas',
+ // materialCode: '1m0001',
+ // locationName: 'a浠�2鍙蜂綅',
+ // num: '1',
+ // unitName: '鍧�',
+ // qualityType: 0,
+ // procedureName: '鍘嬪埗',
+ // }]
+ choiceStockPageForStandard({
+ ...this.pages,
+ model: {
+ workorderId: this.workorderId,
+ deviceId: this.deviceId
+ }
+ }).then(res => {
+ let {
+ data
+ } = res
+ if (data.page == 1) {
+ this.list = [];
+ }
+ this.pages.page = data.page
+ this.pages.total = data.total
+ this.list.push(...data.records)
+ }).catch((err) => {
+
+ })
+ .finally(() => {
+ this.refreshing = false;
+ })
},
- scrolltoupper() {
- console.log('scrolltoupper');
+ loadMore() {
+ this.pages.page += 1
this.loadData()
},
- scrolltolower() {
- console.log('scrolltolower');
+ onRefresh() {
+ if (this.refreshing) return
+ this.refreshing = true;
+ this.pages.page = 1
this.loadData()
- },
- jump(item) {
- this.$emit('selectAction', item)
- this.show = false
+ },
+ jump(item) {
+ this.$emit('selectAction', item)
+ this.show = false
}
}
}
diff --git a/minipro_standard/components/workOrderInfo.vue b/minipro_standard/components/workOrderInfo.vue
index 67548d6..6f904b5 100644
--- a/minipro_standard/components/workOrderInfo.vue
+++ b/minipro_standard/components/workOrderInfo.vue
@@ -2,7 +2,7 @@
<view class="p30 bg_w order-info">
<view class="bX">
<view class="cY">
- <view class="mr10 b">澧欎綋鐮栵綔鐮佸灈</view>
+ <view class="mr10 b">{{ `${orederMessage.mmodel.name} |${orederMessage.procedureName}`}}</view>
<u-tag size="mini" bgColor="#03AF76" text="姝e父"></u-tag>
</view>
<view class="status" :class="orederMessage.status==0?'wc':orederMessage.status==1?'green':orederMessage.status==3?'blue':orederMessage.status==7?'green':'c6'">{{ stausToStr(1) }}</view>
@@ -11,28 +11,28 @@
<view class="mt20 bg_f7 ptb20 plr30 n">
<view class="c2 mb20">
<span class="c6">鐗╂枡缂栫爜锛�</span>
- {{ orederMessage.mmodel ? orederMessage.mmodel.code : '03K-0K-0-1' }}
+ {{ orederMessage.mmodel ? orederMessage.mmodel.code : '-' }}
</view>
<view class="c2 mb20">
<span class="c6">璁″垝寮�宸ワ細</span>
- {{ orederMessage.planDate || '2022/01/11' }}
+ {{ orederMessage.planDate || '-' }}
</view>
<view class="c2 mb20">
<span class="c6">鐢熶骇鎵规锛�</span>
- {{ orederMessage.batch || 'PH20221023001' }}
+ {{ orederMessage.batch || '-' }}
</view>
<view class="c2 mb20">
<span class="c6">璁″垝鏁伴噺锛�</span>
- {{ orederMessage.planNum || '1000' }}{{ orederMessage.umodel ? orederMessage.umodel.name : 'A1' }}
+ {{ orederMessage.planNum || '-' }}{{ orederMessage.umodel ? orederMessage.umodel.name : '-' }}
</view>
<view class="c2 mb20">
<span class="c6">鐢熶骇璁惧锛�</span>
- {{ orederMessage.pgmodel ? `${orederMessage.pgmodel.code} - ${orederMessage.pgmodel.name}` : 'A1' }}
+ {{ orederMessage.pgmodel ? `${orederMessage.pgmodel.code} - ${orederMessage.pgmodel.name}` : '-' }}
</view>
<view class="c2 flex">
<view class="c6" style="flex-shrink: 0;">鐢熶骇浜哄憳锛�</view>
<view class="flex1">
- {{ orederMessage.proUserList ? orederMessage.proUserList.map(item => item.proUserDepartName).join(' / ') : '渚辰鎱�-鍜屽幙椋為獜鏂板瀷寤烘潗' }}
+ {{ orederMessage.proUserList ? orederMessage.proUserList.map(item => item.proUserDepartName).join(' / ') : '-' }}
</view>
</view>
</view>
@@ -43,7 +43,10 @@
export default {
name: "workOrderInfo",
props: {
- orederMessage: {}
+ orederMessage: {
+ type: Object,
+ default: () => {}
+ }
},
data() {
return {
diff --git a/minipro_standard/pages.json b/minipro_standard/pages.json
index b334926..e9e2752 100644
--- a/minipro_standard/pages.json
+++ b/minipro_standard/pages.json
@@ -108,26 +108,22 @@
"enablePullDownRefresh": false
}
+ }, {
+ "path": "pages/OutOperation/OutOperation",
+ "style": {
+ "navigationBarTitleText": "鍑哄簱鎿嶄綔",
+ "enablePullDownRefresh": false
+ }
+
+ }, {
+ "path": "pages/InOperation/InOperation",
+ "style": {
+ "navigationBarTitleText": "鍏ュ簱鎿嶄綔",
+ "enablePullDownRefresh": false
+ }
+
}
- ,{
- "path" : "pages/OutOperation/OutOperation",
- "style" :
- {
- "navigationBarTitleText": "鍑哄簱鎿嶄綔",
- "enablePullDownRefresh": false
- }
-
- }
- ,{
- "path" : "pages/InOperation/InOperation",
- "style" :
- {
- "navigationBarTitleText": "鍏ュ簱鎿嶄綔",
- "enablePullDownRefresh": false
- }
-
- }
- ],
+ ],
"subPackages": [{
"root": "pages_adjust",
"pages": [{
@@ -234,6 +230,20 @@
"navigationBarTitleText": "閫夋嫨宸ュ簭璁″垝",
"enablePullDownRefresh": false
}
+ }, {
+ "path": "pages/workOrder/workOrder",
+ "style": {
+ "navigationBarTitleText": "鐢熶骇宸ュ崟",
+ "enablePullDownRefresh": false
+ }
+
+ }, {
+ "path": "pages/spotCheck/spotCheck",
+ "style": {
+ "navigationBarTitleText": "鐢熶骇鐐规",
+ "enablePullDownRefresh": false
+ }
+
}
]
},
@@ -288,4 +298,4 @@
]
},
"uniIdRouter": {}
-}
\ No newline at end of file
+}
diff --git a/minipro_standard/pages/index/index.vue b/minipro_standard/pages/index/index.vue
index 9c02c28..2c7dd0c 100644
--- a/minipro_standard/pages/index/index.vue
+++ b/minipro_standard/pages/index/index.vue
@@ -10,21 +10,22 @@
寰呭姙</view>
<view class="cY">
<u-search placeholder="鎼滅储鍏抽敭瀛�" bgColor="#f7f7f7" :showAction="false" @search="scrolltoupper"
- shape="square" v-model="searchForm.name"></u-search>
+ shape="square" v-model="searchForm.mixParam"></u-search>
<image src="../../static/filter@2x.png" class="img48 ml20" @click="filterAction" mode=""></image>
</view>
<view class="cY mt30">
- <view class="sbtn rd8" :class="searchForm.status==0?'sbtn_green':'sbtn_black_rim'"
- @click="selectType(0)">寰呭姙</view>
- <view class="sbtn rd8 ml20" :class="searchForm.status==1?'sbtn_green':'sbtn_black_rim'"
- @click="selectType(1)">宸插姙</view>
+ <view v-for="item in tagList" :key="item.id" class="sbtn rd8 mr10"
+ :class="searchForm.status==item.id?'sbtn_green':'sbtn_black_rim'" @click="selectType(item.id)">
+ {{`${item.name}(${item.num})`}}
+ </view>
</view>
</view>
</u-sticky>
-
- <u-list :showScrollbar="false" @scrolltolower="scrolltolower" @scrolltoupper="scrolltoupper"
- :height="windowHeight - (statusbarHeight + navHeight + 120) + 'px'">
- <u-list-item v-for="(item, index) in projectList" :key="index">
+ <scroll-view v-if="projectList.length" :style="windowHeight - (statusbarHeight + navHeight + 120) + 'px'"
+ scroll-y="true" refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100"
+ refresher-background="lightgreen" @refresherpulling="scrolltolower" @refresherrefresh="scrolltoupper"
+ @refresherrestore="onRestore" @refresherabort="onAbort">
+ <view v-for="(item, index) in projectList" :key="index">
<view class="box_list">
<view class="box_list_item" @click="jump(item)">
<view class="box_list_item_icon">
@@ -41,16 +42,16 @@
</view>
</view>
</view>
- </u-list-item>
- </u-list>
+ </view>
+ </scroll-view>
+ <view v-else class="tc c6">鏆傛棤鏁版嵁...</view>
<u-popup :show="show" @close="close" :round="8" zIndex="20000">
<view class="rp p40 contanir">
<view class="c2 b">绫诲瀷</view>
<view class="content">
<u-grid col="2" :border="false">
<u-grid-item v-for="item in types" :key="item.id">
- <view class="ptb20 c9 type-style tc rd10"
- :class="type===item.id?'sbtn_green':'sbtn_gray'"
+ <view class="ptb20 c9 type-style tc rd10" :class="type===item.id?'sbtn_green':'sbtn_gray'"
@click="type=item.id">{{ item.name }}</view>
</u-grid-item>
</u-grid>
@@ -67,6 +68,10 @@
<script>
import myTabbar from "@/components/myTabber.vue"
+ import {
+ getList,
+ pageCount
+ } from '@/util/api/agencyAPI'
import {
mapState
} from 'vuex'
@@ -115,157 +120,197 @@
id: 8,
name: '瀹㈤��/杩斿搧鍥炲巶妫�楠�'
}
- ],
+ ],
+ tagList: [{
+ id: 0,
+ name: '寰呭姙',
+ num: 0
+ },
+ {
+ id: 1,
+ name: '宸插姙',
+ num: 0
+ }
+ ],
type: '',
searchForm: {
- name: '',
+ mixParam: '',
status: 0,
type: ''
},
- projectList: [{
- title: '212132',
- createTime: '2023-08-28',
- content: 'asdsadsax鎵嬫墦澶ц惃杈剧殑鍟婂疄鎵揳s'
- },
- {
- title: '212132',
- createTime: '2023-08-28',
- content: 'asdsadsax鎵嬫墦澶ц惃杈剧殑鍟婂疄鎵揳s'
- },
- {
- title: '212132',
- createTime: '2023-08-28',
- content: 'asdsadsax鎵嬫墦澶ц惃杈剧殑鍟婂疄鎵揳s'
- },
- {
- title: '212132',
- createTime: '2023-08-28',
- content: 'asdsadsax鎵嬫墦澶ц惃杈剧殑鍟婂疄鎵揳s'
- },
- ]
+ page: {
+ total: 0,
+ capacity: 10,
+ page: 1,
+ },
+ projectList: []
}
},
computed: {
...mapState(['statusbarHeight', 'navHeight']),
},
+ async mounted() {
+ await this.$store.dispatch('getUpcomingNum')
+ this.tagList[0].num = this.$store.state.upcomingNum.d
+ this.tagList[1].num = this.$store.state.upcomingNum.y
+ },
onLoad() {
uni.getSystemInfo({
success: res => {
this.windowHeight = res.windowHeight
+
}
})
-
- var that = this
- uni.login({
- provider: 'weixin',
- success: function(loginRes) {
- // console.log(loginRes);
- that.code = loginRes.code
- }
- });
+ this.loadData()
},
methods: {
- scrolltolower() {},
- scrolltoupper() {},
+ loadData() {
+ getList({
+ model: this.searchForm,
+ ...this.page
+ })
+ .then(res => {
+ let data = res.data
+ if (data.page == 1) {
+ this.projectList = []
+ }
+ this.page.page = data.page
+ this.page.total = data.total
+ this.projectList.push(...data.records)
+ })
+ .catch(err => {
+
+ })
+ },
+ onRestore() {
+ this.triggered = 'restore'; // 闇�瑕侀噸缃�
+ console.log("onRestore");
+ },
+ onAbort() {
+ console.log("onAbort");
+ },
+ scrolltolower() {
+ this.page.page = 1
+ this.loadData()
+ },
+ scrolltoupper() {
+ this.page.page += 1
+ this.loadData()
+ },
selectType(status) {
if (this.searchForm.status == status) return
this.searchForm.status = status
- this.scrolltoupper()
+ this.scrolltolower()
},
jump(item) {
- if ((item.type === 0 || item.type === 2 || item.type === 5) && item.status === 0) { // 璺宠浆鍑哄簱(杞簱鍗�)
- router.push({
- name: 'issueOperation',
+ if ((item.type === 0 || item.type === 2 || item.type === 5) && item.status === 0) { // 璺宠浆鍑哄簱(杞簱鍗�)
+ uni.navigateTo({
+ url: 'pages/OutOperation/OutOperation',
query: {
id: item.objId,
dbid: item.id,
type: 7
- }
- })
+ }
+ })
+ // router.push({
+ // name: 'issueOperation',
+ // query: {
+ // id: item.objId,
+ // dbid: item.id,
+ // type: 7
+ // }
+ // })
} else if ((item.type === 0 || item.type === 2 || item.type === 5) && item.status === 1) {
- router.push({
- name: 'wTransferDetail',
- query: {
- id: item.objId,
- status: item.status,
- type: item.type,
- dbid: item.id
- }
- })
- // router.push({ name: 'wTransferDetail', query: { id: item.objId, status: 0, type: item.type, dbid: item.id } })
+ // router.push({
+ // name: 'wTransferDetail',
+ // query: {
+ // id: item.objId,
+ // status: item.status,
+ // type: item.type,
+ // dbid: item.id
+ // }
+ // })
} else if ((item.type === 1 || item.type === 4 || item.type === 6) && item.status === 0) { // 璺宠浆鍏ュ簱(杞簱鍗�)
if (item.type === 4) { // 璺宠浆瀹屽伐鍏ュ簱璇︽儏
- router.push({
- name: 'completionDetails',
- query: {
- id: item.objId,
- dbid: item.id,
- type: 7,
- isShow: 1,
- Type: item.type
- }
- })
+ // router.push({
+ // name: 'completionDetails',
+ // query: {
+ // id: item.objId,
+ // dbid: item.id,
+ // type: 7,
+ // isShow: 1,
+ // Type: item.type
+ // }
+ // })
return
- }
- router.push({
- name: 'warehousing',
- query: {
- id: item.objId,
- dbid: item.id,
- type: 7
- }
+ }
+ uni.navigateTo({
+ url: '/pages/InOperation/InOperation',
+ query: {
+ id: item.objId,
+ dbid: item.id,
+ type: 7
+ }
})
+ // router.push({
+ // name: 'warehousing',
+ // query: {
+ // id: item.objId,
+ // dbid: item.id,
+ // type: 7
+ // }
+ // })
} else if ((item.type === 1 || item.type === 4 || item.type === 6) && item.status === 1) {
if (item.type === 4) { // 璺宠洓瀹屽伐鍏ュ簱璇︽儏
- router.push({
- name: 'completionDetails',
- query: {
- id: item.objId,
- dbid: item.id,
- type: 7,
- isShow: 2
- }
- })
+ // router.push({
+ // name: 'completionDetails',
+ // query: {
+ // id: item.objId,
+ // dbid: item.id,
+ // type: 7,
+ // isShow: 2
+ // }
+ // })
return
}
- router.push({
- name: 'wTransferDetail',
- query: {
- id: item.objId
- }
- })
+ // router.push({
+ // name: 'wTransferDetail',
+ // query: {
+ // id: item.objId
+ // }
+ // })
} else if (item.type === 3 && item.status === 0) { // 纭澶囨枡
- router.push({
- name: 'orderStock',
- query: {
- id: item.objId,
- dbid: item.id
- }
- })
+ // router.push({
+ // name: 'orderStock',
+ // query: {
+ // id: item.objId,
+ // dbid: item.id
+ // }
+ // })
} else if (item.type === 3 && item.status === 1) { // 澶囨枡锛堣浆搴撳崟璇︽儏锛�
// router.push({ name: 'wInboundDetail', query: { id: item.objId } })
- router.push({
- name: 'wTransferDetail',
- query: {
- id: item.objId
- }
- })
+ // router.push({
+ // name: 'wTransferDetail',
+ // query: {
+ // id: item.objId
+ // }
+ // })
} else if (item.type === 9 && item.status === 0) { // 璋冩暣鍏ュ簱(鍏ュ簱鍗�)
- router.push({
- name: 'warehousing',
- query: {
- id: item.objId,
- dbid: item.id,
- type: 9
- }
- })
+ // router.push({
+ // name: 'warehousing',
+ // query: {
+ // id: item.objId,
+ // dbid: item.id,
+ // type: 9
+ // }
+ // })
} else if (item.type === 9 && item.status === 1) {
- router.push({
- name: 'wInboundDetail',
- query: {
- id: item.objId
- }
- })
+ // router.push({
+ // name: 'wInboundDetail',
+ // query: {
+ // id: item.objId
+ // }
+ // })
}
},
filterAction() {
@@ -274,12 +319,12 @@
close() {
this.show = false
},
- resetType() {
+ resetType() {
this.type = ''
this.searchForm.type = ''
this.confirm()
},
- confirm() {
+ confirm() {
this.searchForm.type = this.type
this.show = false
this.scrolltoupper()
diff --git a/minipro_standard/pages_adjust/pages/OrderDetail/OrderDetail.vue b/minipro_standard/pages_adjust/pages/OrderDetail/OrderDetail.vue
index 930fb69..35ea422 100644
--- a/minipro_standard/pages_adjust/pages/OrderDetail/OrderDetail.vue
+++ b/minipro_standard/pages_adjust/pages/OrderDetail/OrderDetail.vue
@@ -1,6 +1,6 @@
<template>
<view>
- <workOrderInfo :orederMessage="{proUserList:[]}" />
+ <workOrderInfo :orederMessage="info" />
<view class="bg_cate">
<view @click="clickIten(index)" :class="typeView == index ? 'bg_cate_item active' : 'bg_cate_item'"
v-for="(item, index) in cate" :key="index">{{ item.name }}</view>
@@ -232,7 +232,12 @@
</template>
<script>
- import workOrderInfo from '@/components/workOrderInfo.vue'
+ import workOrderInfo from '@/components/workOrderInfo.vue'
+ import {
+ queryById,
+ createMaterial,
+ createMaterialStandard
+ } from '@/util/api/WorkOrderAPI'
export default {
components: {
workOrderInfo
@@ -254,7 +259,8 @@
duration: 0,
type: 0,
index: 0
- },
+ },
+ info: {},
TimeShow: false,
badShow: false,
typeView: 0,
@@ -347,6 +353,16 @@
// return Number(from.qualified) * infoBox.value.salary;
}
}
+ },
+ onLoad(obj) {
+ this.workorderId = obj.id
+ queryById(this.workorderId)
+ .then(res => {
+ if (res.code === 200) {
+ this.info = res.data
+ this.deviceId = res.data.pgmodel.id
+ }
+ })
},
methods: {
click() {
diff --git a/minipro_standard/pages_adjust/pages/manualFeed/manualFeed.vue b/minipro_standard/pages_adjust/pages/manualFeed/manualFeed.vue
index 3ac271f..e500034 100644
--- a/minipro_standard/pages_adjust/pages/manualFeed/manualFeed.vue
+++ b/minipro_standard/pages_adjust/pages/manualFeed/manualFeed.vue
@@ -1,11 +1,11 @@
<template>
<view class="tl">
- <workOrderInfo :orederMessage="{proUserList:[]}" />
+ <workOrderInfo :orederMessage="info" />
<div class="tl_title">
<div class="tl_title_left">
<div class="tl_title_left_x"></div>
<span>鎶曟枡淇℃伅</span>
- <!-- <span>{{total == 0 ? '' : total}}{{formList[formList.length - 1].dw ? formList[formList.length - 1].dw : ''}}</span> -->
+ <!-- <span>{{total == 0 ? '' : total}}{{formList[formList.length - 1].dw ? formList[formList.length - 1].dw : ''}}</span> -->
<!-- <span>{{total == 0 ? '' : total}}{{formList[formList.length - 1].dw ? formList[formList.length - 1].dw : ''}}</span> -->
</div>
<div class="tl_title_right" @click="add">
@@ -47,29 +47,35 @@
</div>
</div>
</u-swipe-action-item>
- </u-swipe-action>
- <SelectMaterial ref="selectMaterial" @selectAction="getValue"/>
- <SelectMultipleMaterial ref="selectMultipleMaterial"/>
+ </u-swipe-action>
+ <SelectMaterial ref="selectMaterial" @selectAction="getValue" />
+ <!-- <SelectMultipleMaterial ref="selectMultipleMaterial" @selected="getMaterails"/> -->
</view>
</template>
<script>
- import workOrderInfo from '@/components/workOrderInfo.vue'
- import SelectMaterial from '@/components/selectMaterial.vue'
- import SelectMultipleMaterial from '@/components/SelectMultipleMaterial.vue'
-
+ import workOrderInfo from '@/components/workOrderInfo.vue'
+ import SelectMaterial from '@/components/selectMaterial.vue'
+ // import SelectMultipleMaterial from '@/components/SelectMultipleMaterial.vue'
+ import {
+ queryById,
+ createMaterial,
+ createMaterialStandard
+ } from '@/util/api/WorkOrderAPI'
import {
positiveInteger,
number
} from '@/common/config'
export default {
components: {
- workOrderInfo,
- SelectMaterial,
- SelectMultipleMaterial
+ workOrderInfo,
+ SelectMaterial,
+ // SelectMultipleMaterial
},
data() {
return {
+ deviceId: '',
+ workorderId: '',
// formList: [{
// id: Date.now(),
// toolingTypeId: '', // 宸ヨ绫诲瀷
@@ -82,6 +88,7 @@
// dw: '', // 鐗╂枡鍗曚綅
// unitAttribute: ''
// }],
+ info: {},
materialList: [{
id: '',
materialName: '',
@@ -100,11 +107,25 @@
}
}],
};
- },
+ },
+ onLoad(obj) {
+ this.workorderId = obj.id
+ queryById(this.workorderId)
+ .then(res => {
+ if (res.code === 200) {
+ this.info = res.data
+ this.deviceId = res.data.pgmodel.id
+ }
+ })
+ },
methods: {
- open1(index) {
- // this.$refs.selectMaterial.open({})
- this.$refs.selectMultipleMaterial.open({})
+ open1(index) {
+ // this.$refs.selectMaterial.open({})
+ this.index = index
+ this.$refs.selectMaterial.open({
+ workorderId: this.workorderId,
+ deviceId: this.deviceId
+ })
},
deleItem(index) {
if (this.materialList.length === 1) {
@@ -113,7 +134,7 @@
}
this.materialList.splice(index, 1)
},
- add() {
+ add() {
this.total += 1
this.materialList.unshift({
id: '',
@@ -149,10 +170,29 @@
})
this.materialList[index].num = ''
}
- },
- getValue(item) {
- console.log(item);
- }
+ },
+ getValue(v) {
+ for (let i = 0; i < this.materialList.length; i++) {
+ if (item.id === this.materialList[i].id) {
+ uni.$u.toast({
+ message: '涓嶈兘閲嶅閫夋嫨鐩稿悓鐗╂枡'
+ })
+ return
+ }
+ }
+ this.materialList[this.index].id = item.id
+ this.materialList[this.index].materialName = item.materialName
+ this.materialList[this.index].num = item.num
+ this.materialList[this.index].batch = item.batch
+ this.materialList[this.index].locationName = item.locationName
+ this.materialList[this.index].materialCode = item.materialCode
+ this.materialList[this.index].procedureName = item.procedureName
+ this.materialList[this.index].qualityType = item.qualityType
+ this.materialList[this.index].unitAttribute = item.unitAttribute
+ },
+ // getMaterails({materials}) {
+ // console.log(item);
+ // }
}
}
</script>
diff --git a/minipro_standard/pages_adjust/pages/spotCheck/spotCheck.vue b/minipro_standard/pages_adjust/pages/spotCheck/spotCheck.vue
new file mode 100644
index 0000000..ea8d89a
--- /dev/null
+++ b/minipro_standard/pages_adjust/pages/spotCheck/spotCheck.vue
@@ -0,0 +1,446 @@
+<template>
+ <view class="tl">
+ <V-WorkOrderInfo :orederMessage="info"></V-WorkOrderInfo>
+ <div class="tl_title">
+ <div class="tl_title_left">
+ <div class="tl_title_left_x"></div>
+ <span>鐢熶骇鐐规</span>
+ </div>
+ <div class="tl_title_right" @click="add">
+ <image src="../../static/gongdan_ic_shoudong@2x.png" class="img24" mode=""></image>
+ <!-- <img src="@/assets/icon/gongdan_ic_shoudong@2x.png" alt="" /> -->
+ <span>澧炲姞灞炴��</span>
+ </div>
+ </div>
+ <u-swipe-action>
+ <u-swipe-action-item v-for="(item, index) in formList" :key="index" :options="options1"
+ @click="dele(index)">
+ <div class="tl_list">
+ <div class="tl_list_item" @click="open(index)">
+ <div class="tl_list_item_label">鐢熶骇灞炴��</div>
+ <div class="tl_list_item_go">
+ <span
+ :style="item.attributeName ? 'color: #000;' : ''">{{ item.attributeName ? item.attributeName : '璇烽�夋嫨'}}</span>
+ <van-icon name="arrow" color="#999999" />
+ </div>
+ </div>
+ <div class="tl_list_item" v-if="item.type === ''">
+ <div class="tl_list_item_label">灞炴�у��</div>
+ <div class="tl_list_item_go">
+ <input type="text" v-model="item.num" placeholder="璇疯緭鍏�" />
+ </div>
+ </div>
+ <div class="tl_list_item" v-else-if="item.type === 0">
+ <div class="tl_list_item_label">灞炴�у��</div>
+ <div class="tl_list_item_go">
+ <u-radio-group v-model="item.num" placement="row">
+ <u-radio v-for="(item1, i) in item.data" :key="i" activeColor="#4275FC" :label="item1">
+ </u-radio>
+ </u-radio-group>
+ <!-- <van-radio-group v-model="item.num" direction="horizontal">
+ <van-radio :name="item1" checked-color="#4275FC" v-for="(item1, i) in item.data" :key="i">
+ {{item1}}
+ </van-radio>
+ </van-radio-group> -->
+ </div>
+ </div>
+ <div class="tl_list_item" v-else-if="item.type === 1">
+ <div class="tl_list_item_label">灞炴�у��</div>
+ <div class="tl_list_item_go">
+ <u-checkbox-group v-model="item.num" placement="row">
+ <u-checkbox v-for="(item1, i) in item.data" :key="i" :label="item1" :name="item1">
+ </u-checkbox>
+ </u-checkbox-group>
+ </div>
+ </div>
+ <div class="tl_list_item" v-else-if="item.type === 2 || item.type === 3">
+ <div class="tl_list_item_label">灞炴�у��</div>
+ <div class="tl_list_item_go">
+ <input type="text" v-model="item.num" :placeholder="item.tips" />
+ </div>
+ </div>
+ <div class="tl_list_item" @click="openTimer(index)" v-else-if="item.type === 4">
+ <div class="tl_list_item_label">灞炴�у��</div>
+ <div class="tl_list_item_go">
+ <span :style="item.num ? 'color: #000;' : ''">{{item.num ? item.num : item.tips}}</span>
+ <u-icon name="arrow" color="#999999" />
+ </div>
+ </div>
+ </div>
+ </u-swipe-action-item>
+ </u-swipe-action>
+ <!-- <van-swipe-cell v-for="(item, index) in formList" :key="index">
+ <div class="tl_list">
+ <div class="tl_list_item" @click="open(index)">
+ <div class="tl_list_item_label">鐢熶骇灞炴��</div>
+ <div class="tl_list_item_go">
+ <span
+ :style="item.attributeName ? 'color: #000;' : ''">{{ item.attributeName ? item.attributeName : '璇烽�夋嫨'}}</span>
+ <van-icon name="arrow" color="#999999" />
+ </div>
+ </div>
+ <div class="tl_list_item" v-if="item.type === ''">
+ <div class="tl_list_item_label">灞炴�у��</div>
+ <div class="tl_list_item_go">
+ <input type="text" v-model="item.num" placeholder="璇疯緭鍏�" />
+ </div>
+ </div>
+ <div class="tl_list_item" v-else-if="item.type === 0">
+ <div class="tl_list_item_label">灞炴�у��</div>
+ <div class="tl_list_item_go">
+ <u-radio-group v-model="item.num" placement="row">
+ <u-radio v-for="(item1, i) in item.data" :key="i" activeColor="#4275FC" :label="item1">
+ </u-radio>
+ </u-radio-group>
+ </div>
+ </div>
+ <div class="tl_list_item" v-else-if="item.type === 1">
+ <div class="tl_list_item_label">灞炴�у��</div>
+ <div class="tl_list_item_go">
+ <u-checkbox-group v-model="item.num" placement="row">
+ <u-checkbox v-for="(item1, i) in item.data" :key="i" :label="item1" :name="item1">
+ </u-checkbox>
+ </u-checkbox-group>
+ </div>
+ </div>
+ <div class="tl_list_item" v-else-if="item.type === 2">
+ <div class="tl_list_item_label">灞炴�у��</div>
+ <div class="tl_list_item_go">
+ <input type="text" v-model="item.num" :placeholder="item.tips" />
+ </div>
+ </div>
+ <div class="tl_list_item" v-else-if="item.type === 3">
+ <div class="tl_list_item_label">灞炴�у��</div>
+ <div class="tl_list_item_go">
+ <input type="text" v-model="item.num" :placeholder="item.tips" />
+ </div>
+ </div>
+ <div class="tl_list_item" @click="openTimer(index)" v-else-if="item.type === 4">
+ <div class="tl_list_item_label">灞炴�у��</div>
+ <div class="tl_list_item_go">
+ <span :style="item.num ? 'color: #000;' : ''">{{item.num ? item.num : item.tips}}</span>
+ <u-icon name="arrow" color="#999999" />
+ </div>
+ </div>
+ </div>
+ <template #right>
+ <van-button square style="height: 100%;" type="danger" text="鍒犻櫎" @click="dele(index)" />
+ </template>
+ </van-swipe-cell> -->
+
+ <div class="tl_zw"></div>
+ <div class="tl_footer">
+ <button class="tl_footer_submit" v-preventReClick @click="submit">鎻愪氦</button>
+ </div>
+ <u-picker :show="show" :columns="[gzqjData]" title="閫夋嫨鐢熶骇灞炴��" @confirm="gzqjConfirm" @cancel="show=false">
+ </u-picker>
+ </view>
+</template>
+
+<script>
+ import VWorkOrderInfo from '@/components/workOrderInfo.vue'
+ import {
+ setTimeO
+ } from '@/util/utils.js'
+ import {
+ queryById,
+ getJdList,
+ createDJ
+ } from '@/util/api/WorkOrderAPI'
+ export default {
+ components: {
+ VWorkOrderInfo
+ },
+ data() {
+ return {
+ options1: [{
+ text: '鍒犻櫎'
+ }],
+ show: false,
+ index: '',
+ workOrderId: '',
+ info: {},
+ gzqjData: [],
+ formList: [{
+ id: Date.now(),
+ attribute: '', // 灞炴�у��
+ attributeName: '', // 灞炴�у�煎悕绉�
+ data: '', // 鏁版嵁
+ type: '', // 绫诲瀷
+ tips: '', // 鎻愮ず瀛�
+ num: '' // 鏁伴噺
+ }]
+ }
+ },
+ onLoad(obj) {
+ this.workOrderId = obj.id
+ this.queryByIds()
+ this.getJdLists()
+ },
+ methods: {
+ queryByIds() {
+ queryById(this.workOrderId)
+ .then(res => {
+ console.log(res);
+ this.info = res.data
+ })
+ },
+ getJdLists() {
+ getJdList({
+ workOrderID: this.workOrderId
+ })
+ .then(res => {
+ if (res.code === 200 && res.data && res.data.length !== 0) {
+ res.data.forEach(item => {
+ this.gzqjData.push({
+ text: item.name,
+ id: item.id,
+ type: item.type,
+ data: item.remark ? item.remark.split(' ') : '',
+ tips: item.tips
+ })
+ })
+ }
+ })
+ },
+ add() {
+ this.formList.push({
+ id: Date.now(),
+ attribute: '',
+ attributeName: '',
+ num: '',
+ type: '',
+ data: '',
+ tips: ''
+ })
+ },
+ open(index) {
+ this.index = index
+ this.show = true
+ },
+ gzqjConfirm({
+ value
+ }) {
+ console.log(value);
+ let temp = value[0]
+ this.formList[this.index] = {
+ attribute: temp.id,
+ attributeName: temp.text,
+ type: temp.type,
+ data: temp.data,
+ tips: temp.tips,
+ num: '',
+ }
+ if (temp.type === 1) {
+ this.formList[this.index].num = []
+ } else if (temp.type === 0) {
+ this.formList[this.index].num = temp.data[0]
+ } else if (temp.type === 4) {
+ this.formList[this.index].num = setTimeO(new Date(), '-')
+ }
+ // this.formList.forEach((item, index) => {
+ // if (this.index === index) {
+ // item.attribute = value.id
+ // item.attributeName = value.text
+ // item.type = value.type
+ // item.data = value.data
+ // item.tips = value.tips
+ // console.log(value)
+ // item.num = ''
+ // if (item.type === 1) {
+ // item.num = []
+ // } else if (item.type === 0) {
+ // item.num = item.data[0]
+ // }
+ // if (value.type === 4) {
+ // formList.value[indexs.value].num = setTimeO(new Date(), '-')
+ // }
+ // }
+ // })
+ this.show = false
+ },
+ dele(index) {
+ if (this.formList.length === 1) {
+ uni.$u.toast('鑷冲皯淇濈暀涓�鏉$偣妫�淇℃伅')
+ return
+ }
+ this.formList.splice(index, 1)
+ },
+ submit() {
+ let isOpen = true
+ let attrList = []
+
+ this.formList.forEach(item => {
+ if (item.type === 1) {
+ if (item.attribute === '' || item.num.length === 0) {
+ isOpen = false
+ return
+ } else {
+ attrList.push({
+ val: item.num.join(' '),
+ attrId: item.attribute
+ })
+ }
+ } else {
+ if (item.attribute === '' || item.num === '') {
+ isOpen = false
+ return
+ } else {
+ attrList.push({
+ val: item.num,
+ attrId: item.attribute
+ })
+ }
+ }
+ })
+ if (!isOpen) {
+ uni.$u.toast('璇峰皢淇℃伅濉啓瀹屾暣')
+ return
+ }
+
+ createDJ({
+ attrList: attrList,
+ id: this.workOrderId
+ }).then(res => {
+ if (res.code === 200) {
+ uni.$u.toast('鍒涘缓鎴愬姛')
+ setTimeout(() => {
+ uni.navigateBack()
+ }, 1000)
+ }
+ })
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .tl {
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ background: #F7F7F7;
+
+ .tl_title {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 30rpx;
+
+ .tl_title_left {
+ display: flex;
+ align-items: center;
+
+ .tl_title_left_x {
+ width: 8rpx;
+ height: 30rpx;
+ background: $nav-color;
+ border-radius: 2rpx;
+ margin-right: 12rpx;
+ }
+
+ span {
+ font-size: 32rpx;
+ font-weight: 500;
+ color: #222222;
+ }
+ }
+
+ .tl_title_right {
+ display: flex;
+ align-items: center;
+
+ img {
+ width: 28rpx;
+ height: 28rpx;
+ margin-right: 12rpx;
+ }
+
+ span {
+ font-size: 28rpx;
+ font-weight: 400;
+ color: $nav-color;
+ }
+ }
+ }
+
+ .tl_list {
+ display: flex;
+ flex-direction: column;
+ background: white;
+ padding: 0 30rpx;
+ margin-bottom: 20rpx;
+
+ .tl_list_item {
+ min-height: 98rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ border-bottom: 1rpx solid #E5E5E5;
+
+ &:last-child {
+ border: none;
+ }
+
+ .tl_list_item_label {
+ font-size: 30rpx;
+ font-weight: 400;
+ color: #222222;
+ }
+
+ .tl_list_item_go {
+ display: flex;
+ align-items: center;
+
+ input {
+ text-align: right;
+ width: 450rpx;
+ height: 60rpx;
+ border-radius: 8rpx;
+ border: 1rpx solid #E5E5E5;
+ padding: 0 30rpx;
+ box-sizing: border-box;
+ font-size: 28rpx;
+ font-weight: 400;
+ color: #333333;
+ }
+
+ span {
+ font-size: 28rpx;
+ font-weight: 400;
+ color: #999999;
+ margin-right: 10rpx;
+ }
+ }
+ }
+ }
+
+ .tl_zw {
+ height: 160rpx;
+ }
+
+ .tl_footer {
+ width: 100%;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ padding: 0 30rpx 68rpx 30rpx;
+ box-sizing: border-box;
+
+ .tl_footer_submit {
+ width: 690rpx;
+ height: 88rpx;
+ border: none;
+ background: #4275FC;
+ box-shadow: 0 0 12rpx 0 rgba(0, 0, 0, 0.08);
+ border-radius: 8rpx;
+ font-size: 30rpx;
+ font-weight: 500;
+ color: #FFFFFF;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ }
+ }
+</style>
diff --git a/minipro_standard/pages_adjust/pages/workOrder/workOrder.vue b/minipro_standard/pages_adjust/pages/workOrder/workOrder.vue
new file mode 100644
index 0000000..512aa00
--- /dev/null
+++ b/minipro_standard/pages_adjust/pages/workOrder/workOrder.vue
@@ -0,0 +1,453 @@
+<template>
+ <view class="content p30">
+ <div class="content_search">
+ <v-Search @searchInput="searchInput" @submit="submit" @reset="reset" :isShow="true"
+ placeholder="鎼滅储宸ュ崟缂栫爜/宸ュ簭鍚嶇О">
+ <template v-slot:content>
+ <div class="Search_item">
+ <div class="Search_item_label">璁″垝鏃ユ湡</div>
+ <div class="Search_item_content" @click="isOpenDate = true">
+ <div class="Search_item_content_a" :style="searchForm.startDate ? 'color: #000;' : ''">
+ {{ searchForm.startDate ? searchForm.startDate : '寮�濮嬫棩鏈�'}}
+ </div>
+ <span>-</span>
+ <div class="Search_item_content_a" :style="searchForm.endDate ? 'color: #000;' : ''">
+ {{ searchForm.endDate ? searchForm.endDate : '缁撴潫鏃ユ湡'}}
+ </div>
+ </div>
+ </div>
+ </template>
+ </v-Search>
+ <div class="content_search_x"></div>
+ <v-LableSelection :TagList="tagList" :isShow="true" @change="clickTag"></v-LableSelection>
+ </div>
+ <div class="content_total mt20">鍏眥{page.total}}鏉℃暟鎹�</div>
+ <scroll-view scroll-y="true" refresher-enabled="true" :refresher-triggered="triggered" @scrolltolower="getLists"
+ @refresherrefresh="onRefresh">
+ <div class="content_list">
+ <div class="content_list_item" v-for="(item, i) in list" :key="i" @click="jump(item)">
+ <div class="content_list_item_top">
+ <div class="content_list_item_top_left">
+ <span v-if="item.mmodel">{{item.mmodel.name}} | {{item.procedureName}}</span>
+ <div class="content_list_item_top_left_tag" v-if="item.urgent">浼樺厛{{item.urgent}}</div>
+ <div class="content_list_item_top_left_tag backgreen" v-if="item.type === 0">姝e父</div>
+ <div class="content_list_item_top_left_tag backyellow" v-if="item.type === 2">杩斿伐杩斾慨</div>
+ <div class="content_list_item_top_left_tagW" v-if="item.paused === 1">鍋�</div>
+ </div>
+ <div class="content_list_item_top_right">
+ <span class="yellow" v-if="item.status === 0">宸插垱寤�</span>
+ <span class="green" v-if="item.status === 1">宸插鏂�</span>
+ <span v-if="item.status === 2">宸插畬宸ユ</span>
+ <span class="purple" v-if="item.status === 3">宸叉楠�</span>
+ <span v-if="item.status === 4">宸叉姤宸�</span>
+ <span v-if="item.status === 5">宸插叆搴�</span>
+ <span v-if="item.status === 6">宸插彇娑�</span>
+ <span class="green" v-if="item.status === 7">杩涜涓�</span>
+ </div>
+ </div>
+ <span>宸ュ崟缂栧彿: {{item.code}}</span>
+ <div class="content_list_item_content">
+ <div class="content_list_item_content_item">
+ <div class="content_list_item_content_item_label">鐗╂枡缂栫爜锛�</div>
+ <div class="content_list_item_content_item_nr" v-if="item.mmodel">{{item.mmodel.code}}</div>
+ </div>
+ <div class="content_list_item_content_item">
+ <div class="content_list_item_content_item_label">璁″垝寮�宸ワ細</div>
+ <div class="content_list_item_content_item_nr">{{item.planDate}}</div>
+ </div>
+ <div class="content_list_item_content_item">
+ <div class="content_list_item_content_item_label">鐢熶骇鎵规锛�</div>
+ <div class="content_list_item_content_item_nr">{{item.batch}}</div>
+ </div>
+ <div class="content_list_item_content_item">
+ <div class="content_list_item_content_item_label">璁″垝鏁伴噺锛�</div>
+ <div class="content_list_item_content_item_nr" v-if="item.umodel">
+ {{item.planNum}}{{item.umodel.name}}
+ </div>
+ </div>
+ <div class="content_list_item_content_item">
+ <div class="content_list_item_content_item_label">鐢熶骇璁惧锛�</div>
+ <div class="content_list_item_content_item_nr" v-if="item.pgmodel">{{item.pgmodel.code}}
+ </div>
+ </div>
+
+ <div class="content_list_item_content_item" v-if="item.status === 5">
+ <div class="content_list_item_content_item_label">瀹屽伐鏁伴噺锛�</div>
+ <div class="content_list_item_content_item_nr">{{item.proNum}}</div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </scroll-view>
+ <u-calendar :show="isOpenDate" mode="range" @confirm="dateConfirm"></u-calendar>
+ </view>
+</template>
+
+<script>
+ import vSearch from '@/components/Search.vue'
+ import vLableSelection from '@/components/LabelSelection.vue'
+ import {
+ getList,
+ pageCount
+ } from '@/util/api/WorkOrderAPI.js'
+ export default {
+ components: {
+ vSearch,
+ vLableSelection
+ },
+ data() {
+ return {
+ isOpenDate: false,
+ tagList: [{
+ id: [0, 1],
+ name: '寰呯敓浜�',
+ num: '0'
+ },
+ {
+ id: [2, 3, 7],
+ name: '鐢熶骇涓�',
+ num: '0'
+ },
+ {
+ id: [4, 5, 6],
+ name: '宸插畬鎴�',
+ num: '0'
+ }
+ ],
+ triggered: false,
+ _freshing: false,
+ searchForm: {
+ mixParam: '',
+ startDate: '',
+ endDate: '',
+ statusList: []
+ },
+ page: {
+ total: 0,
+ capacity: 10,
+ page: 1
+ },
+ list: [],
+ }
+ },
+ onLoad() {
+ this.pageCounts()
+ this.loadData()
+ },
+ methods: {
+ loadData() {
+
+ getList({
+ ...this.page,
+ model: {
+ ...this.searchForm,
+ endDate: this.searchForm.endDate ? (this.searchForm.endDate + ' 23:59:59') : '',
+ statusList: this.searchForm.statusList.length === 0 ? this.tagList[0].id : this.searchForm
+ .statusList
+ }
+ })
+ .then(res => {
+ let {
+ data
+ } = res
+
+ if (data.page == 1) {
+ this.list = []
+ }
+ this.page.total = data.total
+ this.page.page = data.page
+ this.list.push(...data.records)
+ this.triggered = false
+ })
+ },
+ pageCounts() {
+ pageCount({
+ ...this.searchForm,
+ endDate: this.searchForm.endDate ? (this.searchForm.endDate + ' 23:59:59') : '',
+ statusList: this.searchForm.statusList.length === 0 ? this.tagList[0].id : this.searchForm
+ .statusList
+ }).then(res => {
+ console.log(res);
+ if (res.code === 200) {
+ this.tagList[0].num = String(res.data.startNum)
+ this.tagList[1].num = String(res.data.ingNum)
+ this.tagList[2].num = String(res.data.endNum)
+ }
+ })
+ },
+ clickTag(v) {
+ this.searchForm.statusList = v
+ this.page.page = 1
+ this.loadData()
+ },
+ dateConfirm(v) {
+ this.isOpenDate = false
+ this.searchForm.startDate = v[0]
+ this.searchForm.endDate = v[v.length - 1]
+ },
+ getLists() {
+ this.page.page += 1
+ this.loadData()
+ },
+ onRefresh() {
+ if (this.triggered) return
+ this.triggered = true;
+ this.page.page = 1
+ this.loadData()
+ },
+ jump(item) {
+ // uni.navigateTo({
+ // url: `/pages_adjust/pages/OrderDetail/OrderDetail?id=${item.id}`
+ // })
+ if (item.status === 4 || item.status === 6 || item.paused === 1) {
+ uni.navigateTo({
+ url: `/pages_adjust/pages/OrderDetail/OrderDetail?id=${item.id}`
+ })
+ } else {
+ uni.navigateTo({
+ url: `/pages_adjust/pages/workOrderReporting/workOrderReporting?id=${item.id}`
+ })
+ }
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .content {
+ .content_code {
+ position: fixed;
+ right: 30rpx;
+ bottom: 100rpx;
+
+ img {
+ width: 138rpx;
+ height: 138rpx;
+ }
+ }
+
+ .content_top {
+ top: 0 !important;
+ }
+
+ .content_search {
+ background: white;
+ z-index: 9;
+
+ .Search_item {
+ margin-bottom: 40rpx;
+
+ .Search_item_label {
+ font-size: 30rpx;
+ font-weight: 500;
+ color: #222222;
+ }
+
+ .Search_item_content {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-top: 30rpx;
+
+ .tag {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+
+ .tag_active {
+ background: $nav-color !important;
+ color: #ffffff !important;
+ }
+
+ .tag_item {
+ width: 156rpx;
+ height: 70rpx;
+ box-sizing: border-box;
+ background: #F2F2F2;
+ border-radius: 8rpx;
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #333333;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-right: 22rpx;
+ margin-bottom: 22rpx;
+
+ &:nth-child(4n) {
+ margin-right: 0;
+ }
+ }
+ }
+
+ span {
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #333333;
+ }
+
+ .Search_item_content_a {
+ width: 308rpx;
+ height: 70rpx;
+ background: #F7F7F7;
+ border-radius: 8rpx;
+ border: 1rpx solid #EEEEEE;
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #B2B2B2;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ }
+ }
+
+ .content_search_x {
+ height: 24rpx;
+ }
+ }
+
+ .content_total {
+ padding: 24rpx 30rpx;
+ background: #F7F7F7;
+ font-size: 24rpx;
+ font-weight: 400;
+ color: #666666;
+ }
+
+ .content_list {
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+
+ .content_list_item {
+ background: white;
+ padding: 30rpx;
+ display: flex;
+ flex-direction: column;
+ border-bottom: 1rpx solid #ececec;
+
+ span {
+ color: #5a5a5a;
+ margin-top: 15rpx;
+ }
+
+ .content_list_item_top {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+
+ .content_list_item_top_left {
+ display: flex;
+ align-items: center;
+ width: 80%;
+
+ span {
+ font-size: 32rpx;
+ font-weight: 500;
+ color: #333333;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ -o-text-overflow: ellipsis;
+ }
+
+ .content_list_item_top_left_tagW {
+ margin-top: 14rpx;
+ flex-shrink: 0;
+ box-sizing: border-box;
+ padding: 5rpx 10rpx;
+ background: $nav-stateColor5;
+ border-radius: 8rpx;
+ font-size: 22rpx;
+ font-weight: 400;
+ color: #FFFFFF;
+ margin-left: 16rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+
+ .content_list_item_top_left_tag {
+ margin-top: 14rpx;
+ flex-shrink: 0;
+ padding: 5rpx 10rpx;
+ background: $nav-stateColor4;
+ border-radius: 8rpx;
+ font-size: 22rpx;
+ font-weight: 400;
+ color: #FFFFFF;
+ margin-left: 16rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ }
+
+ .content_list_item_top_right {
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #666666;
+ flex-shrink: 0;
+
+ .purple {
+ color: $nav-color !important;
+ }
+
+ .green {
+ color: $nav-stateColor6 !important;
+ }
+
+ .yellow {
+ color: $nav-stateColor1 !important;
+ }
+ }
+ }
+
+ .content_list_item_content {
+ padding: 24rpx 30rpx;
+ background: #F7F7F7;
+ border-radius: 16rpx;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ margin-top: 25rpx;
+
+ .content_list_item_content_item {
+ width: 50%;
+ display: flex;
+ margin-top: 24rpx;
+
+ &:nth-child(1) {
+ margin-top: 0 !important;
+ }
+
+ &:nth-child(2) {
+ margin-top: 0 !important;
+ }
+
+ .content_list_item_content_item_label {
+ font-size: 24rpx;
+ font-weight: 400;
+ color: #666666;
+ flex-shrink: 0;
+ }
+
+ .content_list_item_content_item_nr {
+ flex: 1;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ -o-text-overflow: ellipsis;
+ font-size: 24rpx;
+ font-weight: 400;
+ color: #222222;
+ margin-right: 10rpx;
+ }
+ }
+ }
+ }
+ }
+ }
+</style>
diff --git a/minipro_standard/pages_adjust/pages/workOrderReporting/workOrderReporting.vue b/minipro_standard/pages_adjust/pages/workOrderReporting/workOrderReporting.vue
index 85ca4fc..a3859e1 100644
--- a/minipro_standard/pages_adjust/pages/workOrderReporting/workOrderReporting.vue
+++ b/minipro_standard/pages_adjust/pages/workOrderReporting/workOrderReporting.vue
@@ -1,7 +1,7 @@
<template>
<view>
<view class="tips-label">褰撳墠浠诲姟闇�瑕佽川妫�锛涗骇鍑哄悗锛岃鑰愬績绛夊緟璐ㄦ鍛樻楠岋紝骞舵牴鎹楠岀粨鏋滆皟鏁翠骇鍑烘暟鎹悗鍐嶆姤宸ャ��</view>
- <workOrderInfo :orederMessage="{proUserList:[]}" />
+ <workOrderInfo :orederMessage="info" />
<!-- <u-tabs :list="tab" lineColor="#305ED5" :activeStyle="{color:'#305ED5'}" lineWidth="50%" :itemStyle="{width: '50%', boxSizing: 'border-box', height: '88rpx'}" @click="click"></u-tabs> -->
<view class="bg_cate">
<view @click="clickIten(index)" :class="typeView == index ? 'bg_cate_item active' : 'bg_cate_item'"
@@ -14,7 +14,9 @@
<div class="bg_list_item_top_left_x bg_m"></div>
<span>鎶曟枡鏄庣粏</span>
</div>
- <div class="bg_list_item_top_right" @click="jumpTL">
+ <!-- proxy.$auth('h5:workorderinput:create') && -->
+ <div class="bg_list_item_top_right" @click="jumpTL"
+ v-if="info.bomType !== 1 || info.bomType == 0 || !info.bomType">
<!-- v-if="proxy.$auth('h5:workorderinput:create') && (info.bomType !== 1 || info.bomType == 0 || !info.bomType)" -->
<!-- <img src="@/assets/icon/gongdan_ic_shoudong@2x.png" alt="" /> -->
<!-- <img src="@/static/gongdan_ic_shoudong@2x.ong" alt="" /> -->
@@ -174,7 +176,8 @@
</div>
<div class="details_dj" v-if="typeView === 1">
- <div class="details_dj_list">
+ <div class="details_dj_list">
+
<u-swipe-action>
<u-swipe-action-item v-for="(item, index) in djData" :key="index" :options="options"
@click="dele(item.id)">
@@ -205,11 +208,10 @@
<view class="c2 b tc">涓嶈壇椤�</view>
<view class="content bl_list">
<div class="bl_list_item" v-for="(item, i) in cateList" :key="i" @click="changeChecked(i)">
- <div class="bl_list_item_left">
- <u-checkbox-group>
- <u-checkbox :key="index" :checked="item.active" :label="item.name"
- :name="item.name">
- </u-checkbox>
+ <div class="bl_list_item_left">
+ <u-checkbox-group @change="changeChecked(i)">
+ <u-checkbox :key="index" :checked="item.active" :label="item.name" :name="item.name">
+ </u-checkbox>
</u-checkbox-group>
</div>
<div class="bl_list_item_right">
@@ -227,6 +229,26 @@
<script>
import workOrderInfo from '@/components/workOrderInfo.vue'
+ import {
+ getBarcodeContent,
+ queryById,
+ getOrocessRecord,
+ deleteCT,
+ updateById,
+ comfirmDone,
+ comfirmDoneStandard,
+ getListByCondition,
+ allForStandard,
+ pageDJ,
+ deletedj,
+ dealWorkorderRecordStandard,
+ getWorkorderRecordListStandard
+ } from '@/util/api/WorkOrderAPI'
+ import {
+ categoryExtList,
+ queryOne,
+ queryList
+ } from '@/util/api/PlanningAPI'
export default {
components: {
workOrderInfo
@@ -252,18 +274,22 @@
TimeShow: false,
badShow: false,
typeView: 0,
- feedingData: [{
- id: 0,
- materialName: '澧欎綋鐮�',
- procedureName: '鍘嬪埗',
- qualityType: 1,
- locationName: 'CP-01',
- batch: '20230713',
- num: 2,
- maxNum: 10,
- unitAttribute: 1,
- unitName: '鍧�'
- }],
+ workorderId: '',
+ info: {},
+ feedingData: [
+ // {
+ // id: 0,
+ // materialName: '澧欎綋鐮�',
+ // procedureName: '鍘嬪埗',
+ // qualityType: 1,
+ // locationName: 'CP-01',
+ // batch: '20230713',
+ // num: 2,
+ // maxNum: 10,
+ // unitAttribute: 1,
+ // unitName: '鍧�'
+ // },
+ ],
options: [{
text: '鍒犻櫎',
style: {
@@ -286,7 +312,7 @@
qualifiedId: '',
qualified: '', // 鍚堟牸
undesirableId: '',
- undesirable: 5 // 涓嶈壇
+ undesirable: '' // 涓嶈壇
},
djData: [{
attrName: '鍑烘按鏃堕棿',
@@ -294,12 +320,25 @@
userName: '寮犱笁 ',
createTime: '2022-05-28 16:32:'
}],
- cateList: [{
- active: false,
- name: '姣涘埡',
- num: 0
- }]
+ cateList: [
+ // {
+ // active: false,
+ // name: '姣涘埡',
+ // num: 0
+ // },
+ ],
+ pages: {
+ capacity: 10,
+ page: 1,
+ total: 0
+ }
};
+ },
+ onLoad(obj) {
+ this.workorderId = obj.id
+ this.queryByIds()
+ this.getOrocessRecords()
+ this.getData()
},
computed: {
expectedSalary() {
@@ -320,10 +359,10 @@
return (Number(h) * (this.arrType[this.form.index].salary / 10 / 10)).toFixed(2) || 0
}
},
- complianceRate() {
- if (this.arrType.length === 0) return 0;
- if (!this.produceFrom.qualified && !this.produceFrom.undesirable) return 0;
- if (!this.form.duration) return 0;
+ complianceRate() {
+ if (this.arrType.length === 0) return 0;
+ if (!this.produceFrom.qualified && !this.produceFrom.undesirable) return 0;
+ if (!this.form.duration) return 0;
if (!this.arrType[this.form.index].num) return 0;
// 鎸変欢璁$畻
// if (infoBox.value.type == 0) {
@@ -334,15 +373,64 @@
return ((Number(a) / Number(b)) * 100).toFixed(2)
// let total = (Number(from.qualified) + Number(from.undesirable)) / ((from.duration * 60 * 60) * infoBox.value.num / )
// return total * infoBox.value.salary;
- } else {
+ } else {
let a = (this.produceFrom.qualified / (this.form.duration / 3600)).toFixed(2)
- let b = (this.arrType[this.form.index].num / (this.arrType[this.form.index].times / 3600)).toFixed(2)
+ let b = (this.arrType[this.form.index].num / (this.arrType[this.form.index].times / 3600)).toFixed(2)
return ((Number(a) / Number(b)) * 100).toFixed(2)
// return Number(from.qualified) * infoBox.value.salary;
}
}
},
methods: {
+ queryByIds() {
+ queryById(this.workorderId)
+ .then(res => {
+ this.info = res.data
+ queryList({
+ deleted: 0,
+ departId: res.data.factoryId,
+ materialId: res.data.materialId,
+ procedureId: res.data.procedureId
+ }).then(result => {
+ if (result.code === 200) {
+ if (result.data && result.data.length > 0) {
+ result.data.forEach((item, index) => {
+ item.name = item.type == 0 ? '璁′欢' : '璁℃椂'
+ item.id = item.type
+ item.active = index == 0
+ })
+ this.arrType = result.data
+ } else {
+ this.arrType = []
+ }
+ }
+ })
+ })
+ },
+ getOrocessRecords() {
+ this.feedingData = []
+ allForStandard({
+ workorderId: this.workorderId,
+ type: 0
+ }).then(res => {
+ if (res.code === 200) {
+ this.feedingData = res.data
+ }
+ })
+ },
+ getData() {
+ categoryExtList({
+ cateType: "3"
+ }).then(res => {
+ if (res.code === 200) {
+ res.data.forEach(item => {
+ item.active = false
+ item.num = ''
+ })
+ this.cateList = res.data
+ }
+ })
+ },
click() {
},
@@ -410,12 +498,42 @@
// }
// })
},
+ changeCC(downType, num, recordId) {
+ if (!num) return
+ console.log(Number(this.produceFrom.qualified) + Number(this.produceFrom.undesirable))
+ if ((Number(this.produceFrom.qualified) + Number(this.produceFrom.undesirable)) > this.info.planNum) {
+ uni.showToast({ title:'浜у嚭鏁伴噺涓嶈兘澶т簬璁″垝鏁伴噺', duration: 2000, icon:'none' })
+ return
+ }
+ if (num >= 0) {
+ this.form.defective = []
+ this.form.defectiveName = ''
+ // dealWorkorderRecordStandard({
+ // downType, num, recordId, workorderId: route.query.id
+ // }).then(res => {
+ // if (res.code === 200) {
+ // getOrocessRecordCC()
+ // }
+ // })
+ } else {
+ if (downType == 0) {
+ this.produceFrom.qualified = 0
+ } else {
+ this.produceFrom.undesirable = 0
+ }
+ uni.showToast({ title:'浜у嚭鏁伴噺涓嶈兘灏忎簬', duration: 2000, icon:'none' })
+ }
+ },
clickPerformanceType(item, index) {
this.form.index = index
this.form.type = item.type
},
submit() {},
- jumpdj() {},
+ jumpdj() {
+ uni.navigateTo({
+ url: `/pages_adjust/pages/spotCheck/spotCheck?id=${this.workorderId}`
+ })
+ },
pageDJs() {},
dele(id) {
// deletedj(id)
@@ -429,12 +547,48 @@
// }
// })
},
- confirm() {
- // console.log('confirm');
+ confirm() {
+ console.log('confirm', this.cateList);
+ let isOpen = false
+ this.cateList.forEach((item, index) => {
+ if (item.active) {
+ isOpen = true
+ }
+ })
+ if (!isOpen) {
+ uni.showToast({ title:'璇烽�夋嫨涓嶈壇椤�', duration: 2000, icon:'none' })
+ return
+ }
+ let arr = []
+ let total = 0
+ let name = ''
+ this.cateList.forEach((item, index) => {
+ if (item.active) {
+ if (item.num <= 0) {
+ uni.showToast({ title:'涓嶈壇鏁伴噺蹇呴』澶т簬0', duration: 2000, icon:'none' })
+ return
+ }
+ total = total += item.num
+ arr.push(item)
+ name += item.name + item.num + '锛�'
+ }
+ })
+ if (total != Number(this.produceFrom.undesirable)) {
+ uni.showToast({ title:'涓嶈壇鏁板繀椤荤瓑浜庝骇鍑轰笉鑹暟', duration: 2000, icon:'none' })
+ return
+ }
+ this.form.defective = arr
+ this.form.defectiveName = name
this.badShow = false
},
changeChecked(i) {
this.cateList[i].active = !this.cateList[i].active
+ },
+ jumpTL() {
+ uni.navigateTo({
+ // url: ''
+ url: `/pages_adjust/pages/manualFeed/manualFeed?id=${this.workorderId}`
+ })
}
}
}
diff --git a/minipro_standard/store/index.js b/minipro_standard/store/index.js
index 2d5b182..897b26f 100644
--- a/minipro_standard/store/index.js
+++ b/minipro_standard/store/index.js
@@ -77,7 +77,7 @@
},
actions: {
// 鍚戝悗绔幏鍙栬彍鍗曟爮鏉冮檺
- async getMenuList(content, type) {
+ async getMenuList(content, type) {
let res = await getTreeList({
type: type
})
@@ -100,10 +100,10 @@
menuButtonWidth
})
},
- async getUpcomingNum() {
+ async getUpcomingNum(context) {
let res = await pageCount({})
if (res.code === 200) {
- content.commit('SETNUM', {
+ context.commit('SETNUM', {
d: res.data.startNum,
y: res.data.endNum
})
diff --git a/minipro_standard/util/api/PlanningAPI.js b/minipro_standard/util/api/PlanningAPI.js
index f68a57c..11bcdd7 100644
--- a/minipro_standard/util/api/PlanningAPI.js
+++ b/minipro_standard/util/api/PlanningAPI.js
@@ -48,7 +48,7 @@
// }
// 鏍规嵁ID鍙戝竷璁″垝
-export function getWorkingProcedure (data) {
+export function publishById (data) {
return request.post('/ext/plansExt/publishById', data)
}
// export function publishById(data: any): Promise<any> {
diff --git a/minipro_standard/util/request/responseInterceptors.js b/minipro_standard/util/request/responseInterceptors.js
index 16f08d8..d201dd5 100644
--- a/minipro_standard/util/request/responseInterceptors.js
+++ b/minipro_standard/util/request/responseInterceptors.js
@@ -17,14 +17,12 @@
uni.showToast({ title: response.data.message, icon: 'none', duration: 2000 });
}
return data || {}
- }, (response) => {
- uni.hideLoading();
- let code;
+ }, (error) => {
+ uni.hideLoading();
+ let code = error.code
if (error.code === "ECONNABORTED") {
code = 999
- } else {
- code = error.response.status
- }
+ }
switch (code) {
case 404:
uni.showToast({ title: '璇锋眰璧勬簮涓嶅瓨鍦�', icon: 'none', duration: 2000 });
@@ -36,6 +34,6 @@
uni.showToast({ title: '璇锋眰瓒呮椂', icon: 'none', duration: 2000 });
break;
}
- return Promise.reject(response)
+ return Promise.reject(error)
})
}
diff --git a/minipro_standard/util/utils.js b/minipro_standard/util/utils.js
index 76809d9..db2d308 100644
--- a/minipro_standard/util/utils.js
+++ b/minipro_standard/util/utils.js
@@ -27,4 +27,19 @@
return [year, Sign, month , Sign, day, ' ', hour , ':', minute, ':', second ].join('');
}
-export { gsdate, setTime }
+/***
+ *
+ * @param time 鏃ユ湡 骞存湀鏃ユ椂鍒嗙
+ * @param Sign 闂撮殧
+ */
+function setTimeO (time, Sign) {
+ let year = time.getFullYear();
+ let month = time.getMonth() + 1 >= 10 ? time.getMonth() + 1 : `0${time.getMonth() + 1}`;
+ let day = time.getDate() >= 10 ? time.getDate() : `0${time.getDate()}`;
+ let hour = time.getHours() >= 10 ? time.getHours() : `0${time.getHours()}`;
+ let minute = time.getMinutes() >= 10 ? time.getMinutes() : `0${time.getMinutes()}`;
+ let second = time.getSeconds() >= 10 ? time.getSeconds() : `0${time.getSeconds()}`;
+ return [year, Sign, month , Sign, day, ' ', hour , ':', minute, ':', '00' ].join('');
+}
+
+export { gsdate, setTime, setTimeO }
--
Gitblit v1.9.3