|
|
@@ -26,8 +26,8 @@
|
|
|
|
|
|
|
|
|
<view class="btn_box">
|
|
|
- <view class="btn">暂停</view>
|
|
|
- <view class="btn">终止</view>
|
|
|
+ <view class="btn" @click="handPause()">{{ GDStatus == 9 ? '取消暂停' : '暂停' }}</view>
|
|
|
+ <view class="btn" @click="handTerminate()">终止</view>
|
|
|
<view class="btn">转派</view>
|
|
|
<view class="btn" @click="handOutsource()">委外</view>
|
|
|
</view>
|
|
|
@@ -52,17 +52,17 @@
|
|
|
<zxz-uni-data-select :localdata="typeList" v-model="outsourceForm.type" dataValue='id'
|
|
|
dataKey="name" filterable format='{name}'></zxz-uni-data-select>
|
|
|
</u-form-item>
|
|
|
-
|
|
|
+
|
|
|
<u-form-item label="委外物料:" borderBottom prop="" v-if="outsourceForm.type == 2">
|
|
|
- <zxz-uni-data-select :localdata="materialList" v-model="outsourceForm.material" dataValue='id'
|
|
|
- dataKey="name" filterable format='{name}'></zxz-uni-data-select>
|
|
|
+ <zxz-uni-data-select :localdata="materialList" v-model="outsourceForm.material"
|
|
|
+ dataValue='id' dataKey="name" filterable format='{name}'></zxz-uni-data-select>
|
|
|
</u-form-item>
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
<u-form-item label="发货仓库:" borderBottom prop="" v-if="outsourceForm.type == 2">
|
|
|
- <zxz-uni-data-select :localdata="warehouseList" v-model="outsourceForm.warehouseId" dataValue='id'
|
|
|
- dataKey="name" filterable format='{name}'></zxz-uni-data-select>
|
|
|
+ <zxz-uni-data-select :localdata="warehouseList" v-model="outsourceForm.warehouseId"
|
|
|
+ dataValue='id' dataKey="name" filterable format='{name}'></zxz-uni-data-select>
|
|
|
</u-form-item>
|
|
|
|
|
|
|
|
|
@@ -122,7 +122,10 @@
|
|
|
checkOutsource,
|
|
|
applyoutsourceSave,
|
|
|
producerouting,
|
|
|
- getWarehouseList
|
|
|
+ getWarehouseList,
|
|
|
+ updateStatusPause,
|
|
|
+ updateStatusPauseRecover,
|
|
|
+ updateStatusTerminate
|
|
|
} from '@/api/pda/workOrder.js'
|
|
|
|
|
|
import SearchPopup from './searchPopup.vue'
|
|
|
@@ -136,6 +139,7 @@
|
|
|
|
|
|
props: {
|
|
|
state: String | Number,
|
|
|
+ gdStatus: String | Number,
|
|
|
taskObj: Object,
|
|
|
|
|
|
controlReportMethod: String | Number,
|
|
|
@@ -160,6 +164,17 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+ gdStatus: {
|
|
|
+ immediate: true,
|
|
|
+ deep: true,
|
|
|
+ handler(newVal) {
|
|
|
+ this.GDStatus = newVal
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
controlReportMethod: {
|
|
|
immediate: true,
|
|
|
deep: true,
|
|
|
@@ -184,6 +199,7 @@
|
|
|
|
|
|
btnsList: [],
|
|
|
btnState: 1,
|
|
|
+ GDStatus: null,
|
|
|
btnControlReportMethod: null,
|
|
|
btnList: {
|
|
|
1: [{
|
|
|
@@ -259,7 +275,7 @@
|
|
|
outsourceShow: false,
|
|
|
|
|
|
outsourceForm: {
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
|
|
|
produceList: [],
|
|
|
@@ -279,16 +295,15 @@
|
|
|
},
|
|
|
|
|
|
],
|
|
|
-
|
|
|
- materialList: [
|
|
|
+
|
|
|
+ materialList: [{
|
|
|
+ id: 1,
|
|
|
+ name: '产品'
|
|
|
+ },
|
|
|
{
|
|
|
- id: 1,
|
|
|
- name: '产品'
|
|
|
- },
|
|
|
- {
|
|
|
- id: 2,
|
|
|
- name: '半成品'
|
|
|
- },
|
|
|
+ id: 2,
|
|
|
+ name: '半成品'
|
|
|
+ },
|
|
|
]
|
|
|
|
|
|
|
|
|
@@ -352,7 +367,6 @@
|
|
|
}
|
|
|
this.outsourceForm.name = this.taskObj.currentTaskName + '委外'
|
|
|
|
|
|
- console.log(this.outsourceForm)
|
|
|
|
|
|
|
|
|
|
|
|
@@ -370,6 +384,51 @@
|
|
|
|
|
|
},
|
|
|
|
|
|
+
|
|
|
+ handPause() {
|
|
|
+ if (this.GDStatus == 9) {
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '确定该工单取消暂停?',
|
|
|
+ success: async res => {
|
|
|
+ if (res.confirm) {
|
|
|
+ updateStatusPauseRecover([this.newTaskObj.workOrderId]).then(res => {
|
|
|
+ this.$emit('refresh')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ } else {
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '确定该工单暂停?',
|
|
|
+ success: async res => {
|
|
|
+ if (res.confirm) {
|
|
|
+ updateStatusPause([this.newTaskObj.workOrderId]).then(res => {
|
|
|
+ this.$emit('refresh')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ handTerminate() {
|
|
|
+
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '确定该工单终止?',
|
|
|
+ success: async res => {
|
|
|
+ if (res.confirm) {
|
|
|
+ updateStatusTerminate([this.newTaskObj.workOrderId]).then(res => {
|
|
|
+ this.$emit('refresh')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
outCancel() {
|
|
|
this.outsourceShow = false
|
|
|
},
|
|
|
@@ -419,7 +478,7 @@
|
|
|
}
|
|
|
|
|
|
|
|
|
- if (this.outsourceForm.type == 2 && !this.outsourceForm.material) {
|
|
|
+ if (this.outsourceForm.type == 2 && !this.outsourceForm.material) {
|
|
|
uni.showToast({
|
|
|
title: '请选择委外物料',
|
|
|
icon: 'none'
|