|
|
@@ -1,15 +1,16 @@
|
|
|
<template>
|
|
|
<view class="bottom_box">
|
|
|
-
|
|
|
+
|
|
|
<view class="nav_box rx-cc" @click="open">
|
|
|
<image class="open_icon" :class="{open_icon_reversal : isOperate}" src="~@/static/pda/open.svg"></image>
|
|
|
</view>
|
|
|
|
|
|
|
|
|
-
|
|
|
+ <!-- // 弹出框 -->
|
|
|
<view class="operate_list" v-show="isOperate">
|
|
|
<view v-for="(item, index) in btnList[btnState]" :key="index" class="list rx-bc"
|
|
|
@click="operate(item.type, item)">
|
|
|
+
|
|
|
<view class="round">{{index + 1}}</view>
|
|
|
<view class="name">{{item.name}}</view>
|
|
|
<image class="arrow_right" src="~@/static/pda/arrow_right.svg"></image>
|
|
|
@@ -25,6 +26,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
<view v-if="newTaskObj.existOutsource == 1" class="list rx-bc" @click="operate('outPicking', {})">
|
|
|
<view class="round">{{btnList[btnState].length + 1}}</view>
|
|
|
<view class="name" >委外领料</view>
|
|
|
@@ -52,7 +54,8 @@
|
|
|
<view class="btn" :style="newTaskObj.existOutsource == 1 ? 'background: #FFA929' : ''" @click="handOutsource()">委外</view>
|
|
|
<view class="btn" @click="handHandover">交接</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
+ <!-- //委外弹窗 -->
|
|
|
<SearchPopup mode="center" v-if="outsourceShow">
|
|
|
<template v-slot:list>
|
|
|
<view class="popup_list">
|
|
|
@@ -81,10 +84,13 @@
|
|
|
|
|
|
<u-form-item label="委外到:" borderBottom prop="taskIds">
|
|
|
<zxz-uni-data-select :localdata="newStepsList" style="font-size: 15px;" v-model="outsourceForm.taskIds"
|
|
|
- dataValue='taskId' format='{taskTypeName}' dataKey="taskId" filterable
|
|
|
+ dataValue='taskId' format='{taskTypeName}' dataKey="taskId" filterable @change="changeTaskId"
|
|
|
:clear='true'></zxz-uni-data-select>
|
|
|
</u-form-item>
|
|
|
-
|
|
|
+
|
|
|
+ <u-form-item label="委外场景:" borderBottom prop="taskIds">
|
|
|
+ {{sceneText}}
|
|
|
+ </u-form-item>
|
|
|
|
|
|
<u-form-item label="直接入库:" borderBottom prop="isInWarehouse" v-if="outsourceForm.isFirstTask != 1">
|
|
|
<u-checkbox-group v-model="isInWarehouse" size="15px" v-if="clientEnvironmentId != 2 " >
|
|
|
@@ -92,7 +98,6 @@
|
|
|
</u-checkbox-group>
|
|
|
<view style="font-size: 15px;" v-if="clientEnvironmentId == 2 " >是</view>
|
|
|
|
|
|
-
|
|
|
<zxz-uni-data-select style="margin-left: 10px; font-size: 15px;" v-if="clientEnvironmentId == 2 || isInWarehouse.length" :localdata="warehouseList" v-model="outsourceForm.warehouseId"
|
|
|
dataValue='id' dataKey="name" filterable format='{name}'></zxz-uni-data-select>
|
|
|
|
|
|
@@ -100,7 +105,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
<u-form-item label="工艺路线:" borderBottom style="font-size: 15px;" prop="produceRoutingId" v-if="clientEnvironmentId != 2 && outsourceForm.isFirstTask != 1 && isInWarehouse && isInWarehouse.length == 0">
|
|
|
<zxz-uni-data-select :localdata="produceList" v-model="outsourceForm.produceRoutingId"
|
|
|
dataValue='id' dataKey="name" filterable format='{name}'></zxz-uni-data-select>
|
|
|
@@ -141,7 +145,7 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
</SearchPopup>
|
|
|
-
|
|
|
+ <!-- //委外下一步 -->
|
|
|
<outsourceList ref="outsourceListRef" @close="outCancel()"></outsourceList>
|
|
|
<handover ref="handoverRef"></handover>
|
|
|
|
|
|
@@ -254,7 +258,7 @@
|
|
|
data() {
|
|
|
return {
|
|
|
isOperate: false,
|
|
|
-
|
|
|
+
|
|
|
btnsList: [],
|
|
|
btnState: 1,
|
|
|
|
|
|
@@ -350,7 +354,8 @@
|
|
|
|
|
|
|
|
|
},
|
|
|
-
|
|
|
+ sceneText:'',
|
|
|
+ outsourceScene:null,
|
|
|
newTaskObj: {},
|
|
|
outsourceShow: false,
|
|
|
|
|
|
@@ -363,17 +368,18 @@
|
|
|
|
|
|
typeList: [{
|
|
|
id: 4,
|
|
|
- name: '带料委外'
|
|
|
+ name: '带料生产委外'
|
|
|
},
|
|
|
{
|
|
|
id: 5,
|
|
|
- name: '无料委外'
|
|
|
+ name: '不带料生产委外'
|
|
|
},
|
|
|
|
|
|
],
|
|
|
|
|
|
newStepsList: [],
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo")
|
|
|
.clientEnvironmentId, // *1 主环境-601环境 2 soll-索尔环境 3 tg-碳谷环境
|
|
|
@@ -391,7 +397,39 @@
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
-
|
|
|
+
|
|
|
+ //委外到 类型选择
|
|
|
+ changeTaskId(e){
|
|
|
+ console.log(this.newStepsList);
|
|
|
+ if(this.newStepsList.length){
|
|
|
+ const id =this.newStepsList[0].sourceTaskId;
|
|
|
+ //isFirstTask 1是首工序 0不是
|
|
|
+ if(this.outsourceForm.isFirstTask){
|
|
|
+ this.sceneText = "首工序";
|
|
|
+ this.outsourceForm.outsourceScene = 1;
|
|
|
+ if(e.sourceTaskId!==id){
|
|
|
+ this.sceneText = "首工序及多工序";
|
|
|
+ this.outsourceForm.outsourceScene = 4;
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if(e.sourceTaskId===id){
|
|
|
+ // 单工序
|
|
|
+ this.sceneText = "单工序"
|
|
|
+ this.outsourceForm.outsourceScene = 2;
|
|
|
+ }else{
|
|
|
+ //多工序
|
|
|
+ this.sceneText = "多工序"
|
|
|
+ this.outsourceForm.outsourceScene =3;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }else{
|
|
|
+ uni.showToast({
|
|
|
+ title: '委外到工序为空',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
open() {
|
|
|
this.isOperate = !this.isOperate
|
|
|
@@ -414,14 +452,12 @@
|
|
|
|
|
|
this.outsourceForm = {
|
|
|
...res,
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
this.outsourceForm.name = this.taskObj.currentTaskName + '委外'
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
if (res.outsource) {
|
|
|
this.getNewSteps()
|
|
|
this.outsourceShow = true
|
|
|
@@ -487,6 +523,8 @@
|
|
|
})
|
|
|
},
|
|
|
outCancel() {
|
|
|
+ this.sceneText="";//委外场景
|
|
|
+ this.outsourceForm.outsourceScene =null;
|
|
|
this.outsourceShow = false
|
|
|
EventBus.$off('outEvent');
|
|
|
},
|
|
|
@@ -570,6 +608,8 @@
|
|
|
})
|
|
|
return false
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
if(this.clientEnvironmentId == 2) {
|
|
|
this.outsourceForm.isInWarehouse = 1
|
|
|
} else {
|
|
|
@@ -584,7 +624,8 @@
|
|
|
}
|
|
|
|
|
|
console.log(param)
|
|
|
-
|
|
|
+ this.sceneText="";//委外场景
|
|
|
+ this.outsourceForm.outsourceScene =null;
|
|
|
this.$refs.outsourceListRef.open(param)
|
|
|
|
|
|
|