|
|
@@ -34,20 +34,30 @@
|
|
|
|
|
|
|
|
|
<u-form labelPosition="left" :model="outsourceForm" labelWidth="180" labelAlign="left" class="">
|
|
|
+
|
|
|
+ <u-form-item label="委外名称:" borderBottom prop="num">
|
|
|
+ <input class="uni-input" v-model="outsourceForm.name" placeholder="请输入委外名称"></input>
|
|
|
+ </u-form-item>
|
|
|
+
|
|
|
<u-form-item label="委外数量:" borderBottom prop="num">
|
|
|
<input class="uni-input" v-model="outsourceForm.formedNumLast" type='number'
|
|
|
disabled></input>
|
|
|
</u-form-item>
|
|
|
|
|
|
- <u-form-item label="完成时间:" borderBottom prop="time">
|
|
|
-
|
|
|
+ <u-form-item label="完成时间:" borderBottom prop="expectReceiveDate">
|
|
|
|
|
|
- <picker mode="date" :value="outsourceForm.date" @change="onDateChange">
|
|
|
- <view class="uni-input">{{ outsourceForm.date || '选择日期' }}</view>
|
|
|
+ <picker mode="date" :value="outsourceForm.expectReceiveDate" @change="onDateChange">
|
|
|
+ <view class="uni-input">{{ outsourceForm.expectReceiveDate || '选择日期' }}</view>
|
|
|
</picker>
|
|
|
|
|
|
+ </u-form-item>
|
|
|
+
|
|
|
+ <u-form-item label="是否入库:" borderBottom prop="status">
|
|
|
+ <zxz-uni-data-select :localdata="statusList" v-model="outsourceForm.status" dataValue='type'
|
|
|
+ format='{value}' dataKey="value" filterable></zxz-uni-data-select>
|
|
|
|
|
|
</u-form-item>
|
|
|
+ </u-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
@@ -77,7 +87,8 @@
|
|
|
<script>
|
|
|
import {
|
|
|
getTwoTreeByPid,
|
|
|
- checkOutsource
|
|
|
+ checkOutsource,
|
|
|
+ applyoutsourceSave
|
|
|
} from '@/api/pda/workOrder.js'
|
|
|
|
|
|
import SearchPopup from './searchPopup.vue'
|
|
|
@@ -191,7 +202,20 @@
|
|
|
newTaskObj: {},
|
|
|
outsourceShow: false,
|
|
|
|
|
|
- outsourceForm: {}
|
|
|
+ outsourceForm: {
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ statusList: [{
|
|
|
+ type: 1,
|
|
|
+ value: '入库'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 0,
|
|
|
+ value: '不入库'
|
|
|
+ }
|
|
|
+ ]
|
|
|
}
|
|
|
},
|
|
|
|
|
|
@@ -238,8 +262,16 @@
|
|
|
}
|
|
|
checkOutsource(param).then(res => {
|
|
|
|
|
|
- this.outsourceForm.formedNumLast = res.formedNumLast
|
|
|
-
|
|
|
+ this.outsourceForm = {
|
|
|
+ ...res,
|
|
|
+ status: 1,
|
|
|
+ expectReceiveDate: '2024-05-20'
|
|
|
+ }
|
|
|
+
|
|
|
+ console.log(this.outsourceForm)
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
if (res.outsource) {
|
|
|
this.outsourceShow = true
|
|
|
} else {
|
|
|
@@ -256,14 +288,38 @@
|
|
|
this.outsourceShow = false
|
|
|
},
|
|
|
|
|
|
- onDateChange: function(e) {
|
|
|
+ onDateChange(e) {
|
|
|
+ this.$set(this.outsourceForm, 'expectReceiveDate', e.detail.value)
|
|
|
|
|
|
- this.outsourceForm.date = e.detail.value;
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
|
|
|
|
|
|
|
- outsourceOk() {},
|
|
|
+ outsourceOk() {
|
|
|
+ if (!this.outsourceForm.name) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请输入委外名称',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if (!this.outsourceForm.expectReceiveDate) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请选择委外完成时间',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
+ let param = {
|
|
|
+ ...this.outsourceForm,
|
|
|
+ taskId: this.newTaskObj.currentTaskId,
|
|
|
+ workOrderId: this.newTaskObj.workOrderId
|
|
|
+ }
|
|
|
+ applyoutsourceSave(param).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
|
|
|
}
|
|
|
@@ -366,7 +422,7 @@
|
|
|
|
|
|
.popup_list {
|
|
|
width: 65vw;
|
|
|
- min-height: 300rpx;
|
|
|
+ min-height: 360rpx;
|
|
|
padding: 0 32rpx;
|
|
|
|
|
|
.title {
|