|
|
@@ -99,6 +99,23 @@
|
|
|
</el-select> </el-form-item
|
|
|
></el-col>
|
|
|
<el-col :span="8">
|
|
|
+ <el-form-item
|
|
|
+ v-if="formData.bizType == 12"
|
|
|
+ label="委外申请单"
|
|
|
+ prop="documentSource"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入"
|
|
|
+ v-model="formData.extInfo.documentSource"
|
|
|
+ @click.native="handleOutsourcedOrders()"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ slot="append"
|
|
|
+ icon="el-icon-circle-close"
|
|
|
+ @click.stop="onClear"
|
|
|
+ ></el-button>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item
|
|
|
v-if="formData.bizType == 2"
|
|
|
label="采购收货单"
|
|
|
@@ -126,11 +143,23 @@
|
|
|
clearable
|
|
|
v-model="formData.extInfo.documentSource"
|
|
|
/></el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ v-if="formData.bizType == 10"
|
|
|
+ label="委外订单"
|
|
|
+ prop="documentSource"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入"
|
|
|
+ clearable
|
|
|
+ v-model="formData.extInfo.documentSource"
|
|
|
+ /></el-form-item>
|
|
|
<el-form-item
|
|
|
v-if="
|
|
|
formData.bizType != 1 &&
|
|
|
formData.bizType != 2 &&
|
|
|
- formData.bizType != 3
|
|
|
+ formData.bizType != 3 &&
|
|
|
+ formData.bizType != 10 &&
|
|
|
+ formData.bizType != 12
|
|
|
"
|
|
|
label="销售订单"
|
|
|
prop="documentSource"
|
|
|
@@ -1238,12 +1267,18 @@
|
|
|
|
|
|
<!-- 销售订单 -->
|
|
|
<picker ref="pickerRef" @success="pickerSuccess" />
|
|
|
+ <!-- 委外订单 -->
|
|
|
+ <outsourcedOrders
|
|
|
+ ref="outsourcedOrdersRef"
|
|
|
+ @success="outsourcedOrdersSuccess"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { add, bignumber } from 'mathjs';
|
|
|
import picker from './components/picker.vue';
|
|
|
+ import outsourcedOrders from './components/outsourcedOrders.vue';
|
|
|
import outin from '@/api/warehouseManagement/outin';
|
|
|
import {
|
|
|
getTreeByPid,
|
|
|
@@ -1279,7 +1314,8 @@
|
|
|
WareHouseDailog,
|
|
|
upload,
|
|
|
ReturnSelect,
|
|
|
- picker
|
|
|
+ picker,
|
|
|
+ outsourcedOrders
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -1299,6 +1335,7 @@
|
|
|
resultArray: [],
|
|
|
contactList: [],
|
|
|
pickerRow: {},
|
|
|
+ outsourcedOrdersRow: {},
|
|
|
fromUserList: [],
|
|
|
codeList: [],
|
|
|
materialType,
|
|
|
@@ -1431,11 +1468,17 @@
|
|
|
this.$refs[key + index].blur();
|
|
|
if (key === keyfield[keyfield.length - 1]) {
|
|
|
// 当前行最后一个,跳转下一行第一个
|
|
|
+ if (this.$refs[keyfield[0] + (index + 1)].value == 0) {
|
|
|
+ this.$refs[keyfield[0] + (index + 1)].value = '';
|
|
|
+ }
|
|
|
this.$refs[keyfield[0] + (index + 1)].focus();
|
|
|
} else {
|
|
|
// 跳转下一个
|
|
|
const nextkeyindex = keyfield.findIndex((k) => k === key) + 1;
|
|
|
this.$nextTick(() => {
|
|
|
+ if (this.$refs[keyfield[nextkeyindex] + index].value == 0) {
|
|
|
+ this.$refs[keyfield[nextkeyindex] + index].value = '';
|
|
|
+ }
|
|
|
this.$refs[keyfield[nextkeyindex] + index].focus();
|
|
|
});
|
|
|
}
|
|
|
@@ -1451,6 +1494,9 @@
|
|
|
}
|
|
|
this.$refs[key + index].blur();
|
|
|
this.$nextTick(() => {
|
|
|
+ if (this.$refs[key + (index - 1)].value == 0) {
|
|
|
+ this.$refs[key + (index - 1)].value = '';
|
|
|
+ }
|
|
|
this.$refs[key + (index - 1)].focus();
|
|
|
});
|
|
|
}
|
|
|
@@ -1465,6 +1511,9 @@
|
|
|
}
|
|
|
this.$refs[key + index].blur();
|
|
|
this.$nextTick(() => {
|
|
|
+ if (this.$refs[key + (index + 1)].value == 0) {
|
|
|
+ this.$refs[key + (index + 1)].value = '';
|
|
|
+ }
|
|
|
this.$refs[key + (index + 1)].focus();
|
|
|
});
|
|
|
}
|
|
|
@@ -1479,12 +1528,21 @@
|
|
|
}
|
|
|
this.$refs[key + index].blur();
|
|
|
if (key === keyfield[0]) {
|
|
|
+ if (
|
|
|
+ this.$refs[keyfield[keyfield.length - 1] + (index - 1)].value == 0
|
|
|
+ ) {
|
|
|
+ this.$refs[keyfield[keyfield.length - 1] + (index - 1)].value =
|
|
|
+ '';
|
|
|
+ }
|
|
|
// 当前行第一个,跳转上一行最后一个
|
|
|
this.$refs[keyfield[keyfield.length - 1] + (index - 1)].focus();
|
|
|
} else {
|
|
|
// 跳转上一个
|
|
|
const prevkeyindex = keyfield.findIndex((k) => k === key) - 1;
|
|
|
this.$nextTick(() => {
|
|
|
+ if (this.$refs[keyfield[prevkeyindex] + index].value == 0) {
|
|
|
+ this.$refs[keyfield[prevkeyindex] + index].value = '';
|
|
|
+ }
|
|
|
this.$refs[keyfield[prevkeyindex] + index].focus();
|
|
|
});
|
|
|
}
|
|
|
@@ -1504,11 +1562,17 @@
|
|
|
this.$refs[key + index].blur();
|
|
|
if (key === keyfield[keyfield.length - 1]) {
|
|
|
// 当前行最后一个,跳转下一行第一个
|
|
|
+ if (this.$refs[keyfield[0] + (index + 1)].value == 0) {
|
|
|
+ this.$refs[keyfield[0] + (index + 1)].value = '';
|
|
|
+ }
|
|
|
this.$refs[keyfield[0] + (index + 1)].focus();
|
|
|
} else {
|
|
|
// 跳转下一个
|
|
|
const nextkeyindex = keyfield.findIndex((k) => k === key) + 1;
|
|
|
this.$nextTick(() => {
|
|
|
+ if (this.$refs[keyfield[nextkeyindex] + index].value == 0) {
|
|
|
+ this.$refs[keyfield[nextkeyindex] + index].value = '';
|
|
|
+ }
|
|
|
this.$refs[keyfield[nextkeyindex] + index].focus();
|
|
|
});
|
|
|
}
|
|
|
@@ -1856,6 +1920,10 @@
|
|
|
const data = await contactlink({ contactId: id });
|
|
|
this.contactList = data.data;
|
|
|
},
|
|
|
+ outsourcedOrdersSuccess(row) {
|
|
|
+ this.outsourcedOrdersRow = row;
|
|
|
+ this.formData.extInfo.documentSource = row.code;
|
|
|
+ },
|
|
|
async pickerSuccess(row) {
|
|
|
this.pickerRow = row;
|
|
|
this.formData.extInfo.documentSource = row.orderNo;
|
|
|
@@ -1911,12 +1979,16 @@
|
|
|
onClear() {
|
|
|
this.formData.extInfo.documentSource = '';
|
|
|
this.pickerRow = {};
|
|
|
+ this.outsourcedOrdersRow = {};
|
|
|
this.formData.clientName = '';
|
|
|
this.formData.clientCode = '';
|
|
|
this.formData.extInfo.supplierName = '';
|
|
|
this.formData.extInfo.supplierId = '';
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
|
+ handleOutsourcedOrders() {
|
|
|
+ this.$refs.outsourcedOrdersRef.open();
|
|
|
+ },
|
|
|
handlePicker() {
|
|
|
this.$refs.pickerRef.open();
|
|
|
},
|
|
|
@@ -2340,12 +2412,14 @@
|
|
|
this.$set(i, 'minPackingCount ', item.minPackingCount);
|
|
|
this.$set(i, 'measuringUnit', item.measuringUnit);
|
|
|
this.$set(i, 'isPack', false);
|
|
|
- if (this.formData.extInfo.assetType == 1) {
|
|
|
- this.$set(i, 'status', '0');
|
|
|
- } else {
|
|
|
- this.$set(i, 'result', '0');
|
|
|
- this.$set(i, 'status', '1');
|
|
|
- }
|
|
|
+ this.$set(i, 'result', '0');
|
|
|
+ this.$set(i, 'status', '1');
|
|
|
+ // if (this.formData.extInfo.assetType == 1) {
|
|
|
+ // this.$set(i, 'status', '0');
|
|
|
+ // } else {
|
|
|
+ // this.$set(i, 'result', '0');
|
|
|
+ // this.$set(i, 'status', '1');
|
|
|
+ // }
|
|
|
|
|
|
if (!item.isUnpack) {
|
|
|
if (index < item.warehouseLedgerDetails.length - 1) {
|
|
|
@@ -2543,9 +2617,17 @@
|
|
|
console.log('=====>', obj);
|
|
|
this.saveLoading = true;
|
|
|
try {
|
|
|
+ if (obj.bizType == '12') {
|
|
|
+ obj.storageSource = 1;
|
|
|
+ }
|
|
|
const res = await outin.save(obj);
|
|
|
if (res.code == 0) {
|
|
|
- await outin.outApproves({ outInId: res.data[0] });
|
|
|
+ // 委外入库(非采购)
|
|
|
+ if (obj.bizType == '12') {
|
|
|
+ await outin.outApproveQuality({ outInId: res.data[0] });
|
|
|
+ } else {
|
|
|
+ await outin.outApproves({ outInId: res.data[0] });
|
|
|
+ }
|
|
|
this.$message.success('保存成功!');
|
|
|
}
|
|
|
} catch (error) {
|