|
|
@@ -86,6 +86,12 @@
|
|
|
<el-input clearable v-model="form.salesman" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
|
|
|
<el-form-item label="交付日期:" prop="deliveryTime">
|
|
|
<el-date-picker
|
|
|
@@ -99,7 +105,22 @@
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col v-bind="styleResponsive ? { lg: 18, md: 18 } : { span: 18 }">
|
|
|
+
|
|
|
+ <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
|
|
|
+ <el-form-item label="齐套状态:" prop="completeState">
|
|
|
+ <el-select v-model="form.completeState" style="width: 100%" >
|
|
|
+ <el-option
|
|
|
+ v-for="item of completeList"
|
|
|
+ :key="item.code"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.code"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
|
|
|
<el-form-item label="备注:">
|
|
|
<el-input clearable v-model="form.notes" />
|
|
|
</el-form-item>
|
|
|
@@ -127,7 +148,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="重量单位" align="center" prop="weightUnit">
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="订单数量" align="center" prop="contractNum">
|
|
|
+ <el-table-column label="订单数量" width="140" align="center" prop="contractNum">
|
|
|
<template slot-scope="scope">
|
|
|
<el-form-item
|
|
|
label-width="0px"
|
|
|
@@ -149,6 +170,89 @@
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <el-table-column label="加工方式" width="140" align="center" prop="produceType">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-form-item
|
|
|
+ label-width="0px"
|
|
|
+ :prop="'productInfoList.' + scope.$index + '.produceType'"
|
|
|
+
|
|
|
+ >
|
|
|
+
|
|
|
+ <el-select v-model="scope.row.produceType" @change="changeProduceType(scope.row, scope.$index)" >
|
|
|
+ <el-option
|
|
|
+ v-for="item of producedList"
|
|
|
+ :key="scope.$index + item.code"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.code"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <el-table-column label="BOM版本" width="140" align="center" prop="bomCategoryId" v-if="clientEnvironmentId != 4">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-form-item
|
|
|
+ label-width="0px"
|
|
|
+ :prop="'productInfoList.' + scope.$index + '.bomCategoryId'"
|
|
|
+
|
|
|
+ >
|
|
|
+ <el-select v-model="scope.row.bomCategoryId" @change="changeBomId(scope.row, scope.$index)" >
|
|
|
+ <el-option
|
|
|
+ v-for="item of scope.row.bomVersionList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name + '(V' + item.versions + '.0)'"
|
|
|
+ :value="item.id"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="工艺路线" width="140" align="center" prop="produceRoutingId" v-if="clientEnvironmentId != 4">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-form-item
|
|
|
+ label-width="0px"
|
|
|
+ :prop="'productInfoList.' + scope.$index + '.produceRoutingId'"
|
|
|
+
|
|
|
+ >
|
|
|
+ <el-select v-model="scope.row.produceRoutingId" >
|
|
|
+ <el-option
|
|
|
+ v-for="item of scope.row.routingList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="工艺路线" align="center" prop="produceRoutingName" v-if="clientEnvironmentId == 4">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-form-item
|
|
|
+ label-width="0px"
|
|
|
+ :prop="'productInfoList.' + scope.$index + '.produceRoutingName'"
|
|
|
+ >
|
|
|
+ <el-input v-model="form.produceRoutingName" style="width: 100%" readonly ></el-input>
|
|
|
+
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<el-table-column label="计量单位" align="center" prop="measuringUnit">
|
|
|
|
|
|
</el-table-column>
|
|
|
@@ -245,7 +349,7 @@
|
|
|
<script>
|
|
|
import { getCode } from '@/api/codeManagement';
|
|
|
import EquipmentDialog from '../components/EquipmentDialog.vue';
|
|
|
-import { createOrUpdate, getOrderDetail } from '@/api/saleOrder';
|
|
|
+import { createOrUpdate, getOrderDetail , bomListByPlan, bomRoutingList} from '@/api/saleOrder';
|
|
|
|
|
|
import dayjs from 'dayjs';
|
|
|
import { multiply } from '@/utils/math';
|
|
|
@@ -263,6 +367,9 @@ export default {
|
|
|
deliveryRequirements: 1,
|
|
|
orderType: 1,
|
|
|
orderLibraryType: 2,
|
|
|
+ produceType: 2,
|
|
|
+ bomCategoryId: '',
|
|
|
+ produceRoutingId: '',
|
|
|
deliveryTime: dayjs(
|
|
|
new Date().getTime() + 3600 * 1000 * 24 * 10
|
|
|
).format('YYYY-MM-DD')
|
|
|
@@ -278,6 +385,21 @@ export default {
|
|
|
{ id: 2, label: '外销订单' },
|
|
|
{ id: 3, label: '预制订单' }
|
|
|
],
|
|
|
+
|
|
|
+ producedList: [
|
|
|
+ { code: 2, name: '加工(MBOM)' },
|
|
|
+ { code: 3, name: '装配(ABOM)' }
|
|
|
+ ],
|
|
|
+
|
|
|
+ completeList: [
|
|
|
+ { code: 1, name: '齐套' },
|
|
|
+ { code: 2, name: '缺料' }
|
|
|
+ ],
|
|
|
+
|
|
|
+
|
|
|
+ routingList: [],
|
|
|
+
|
|
|
+
|
|
|
title: '创建订单',
|
|
|
pickerOptions: {
|
|
|
disabledDate: (time) => {
|
|
|
@@ -314,6 +436,9 @@ export default {
|
|
|
this.title = '创建订单';
|
|
|
this.getSaleCode();
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
getDetail(code) {
|
|
|
getOrderDetail(code).then((res) => {
|
|
|
@@ -547,7 +672,31 @@ export default {
|
|
|
|
|
|
}
|
|
|
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ changeProduceType(row, index) {
|
|
|
+
|
|
|
+ let param = {
|
|
|
+ bomType: row.produceType,
|
|
|
+ categoryId: row.categoryId
|
|
|
+ }
|
|
|
+ bomListByPlan(param).then(res => {
|
|
|
+ this.bomVersionList = res || []
|
|
|
+ this.form.productInfoList[index].bomVersionList = res || []
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ changeBomId(row, index) {
|
|
|
+ bomRoutingList(row.bomCategoryId).then((res) => {
|
|
|
+ this.form.productInfoList[index].routingList = res || []
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
};
|
|
|
</script>
|