|
|
@@ -95,24 +95,35 @@
|
|
|
"></el-input>
|
|
|
</template>
|
|
|
|
|
|
+ <template v-slot:deliveryMethod="{ row }">
|
|
|
+ <el-select clearable class="ele-block" v-model="row.deliveryMethod" placeholder="请选择">
|
|
|
+ <el-option label="一次性到货" :value="1" />
|
|
|
+ <el-option label="分批到货" :value="2" @click.native="handleMethod(row)" />
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+
|
|
|
<template v-slot:requireDeliveryTime="{ row }">
|
|
|
<el-date-picker style="width: 100%" clearable v-model="row.requireDeliveryTime" type="date"
|
|
|
- value-format="yyyy-MM-dd" placeholder="请选择日期">
|
|
|
+ v-if="row.deliveryMethod == 1" value-format="yyyy-MM-dd" placeholder="请选择日期">
|
|
|
</el-date-picker>
|
|
|
+
|
|
|
+ <el-link type="primary" :underline="false" v-if="row.deliveryMethod == 2"
|
|
|
+ @click.native="handleMethod(row)">
|
|
|
+ 设置分批时间
|
|
|
+ </el-link>
|
|
|
</template>
|
|
|
|
|
|
- <template v-slot:deliveryMethod="{ row }">
|
|
|
- <el-select clearable class="ele-block" v-model="row.deliveryMethod" placeholder="请选择">
|
|
|
- <el-option label="一次性到货" :value="1" />
|
|
|
- <el-option label="分批到货" :value="2" />
|
|
|
- </el-select>
|
|
|
+
|
|
|
+
|
|
|
+ <template v-slot:imgUrl="{ row }">
|
|
|
+ <fileUpload v-model="row.imgUrl" module="main" :showLib="false" :limit="1" />
|
|
|
</template>
|
|
|
|
|
|
<template v-slot:annex="{ row }">
|
|
|
<fileUpload v-model="row.annex" module="main" :showLib="false" :limit="1" />
|
|
|
</template>
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
@@ -139,7 +150,7 @@
|
|
|
<div slot="footer">
|
|
|
<el-button @click="cancel">取消</el-button>
|
|
|
<el-button type="primary" @click="confirm">保存</el-button>
|
|
|
- <el-button type="primary" @click="confirm">提交</el-button>
|
|
|
+ <el-button type="primary" @click="confirm">保存并提交</el-button>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@@ -151,6 +162,8 @@
|
|
|
|
|
|
<ProductionVersion ref="versionRefs" @changeProduct="changeProduct"></ProductionVersion>
|
|
|
|
|
|
+ <timeDialog ref="timeDialogRef" @chooseTime="chooseTime"></timeDialog>
|
|
|
+
|
|
|
</ele-modal>
|
|
|
</template>
|
|
|
|
|
|
@@ -161,12 +174,14 @@ import ProductModal from './ProductModal.vue'
|
|
|
import { listBomBySalesOrderIds, listBomBySalesOrderId, save, getById } from '@/api/materialPlan/index';
|
|
|
import ProductionVersion from '@/components/CreatePlan/ProductionVersion2.vue';
|
|
|
import fileUpload from '@/components/upload/fileUpload';
|
|
|
+import timeDialog from './timeDialog'
|
|
|
export default {
|
|
|
components: {
|
|
|
saleOrderPop,
|
|
|
ProductModal,
|
|
|
ProductionVersion,
|
|
|
- fileUpload
|
|
|
+ fileUpload,
|
|
|
+ timeDialog
|
|
|
|
|
|
},
|
|
|
data() {
|
|
|
@@ -347,22 +362,34 @@ export default {
|
|
|
align: 'center',
|
|
|
},
|
|
|
|
|
|
+ {
|
|
|
+ label: '到货方式',
|
|
|
+ slot: 'deliveryMethod',
|
|
|
+ action: 'deliveryMethod',
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 140
|
|
|
+ },
|
|
|
+
|
|
|
{
|
|
|
label: '要求到货时间',
|
|
|
slot: 'requireDeliveryTime',
|
|
|
- action: ' requireDeliveryTime',
|
|
|
+ action: 'requireDeliveryTime',
|
|
|
align: 'center',
|
|
|
+ minWidth: 140
|
|
|
},
|
|
|
|
|
|
+
|
|
|
+
|
|
|
{
|
|
|
- label: '到货方式',
|
|
|
- slot: 'deliveryMethod',
|
|
|
- action: ' deliveryMethod',
|
|
|
+ label: '图纸',
|
|
|
+ slot: 'imgUrl',
|
|
|
+ action: ' imgUrl',
|
|
|
align: 'center',
|
|
|
},
|
|
|
|
|
|
+
|
|
|
{
|
|
|
- label: '附件图纸',
|
|
|
+ label: '附件',
|
|
|
slot: 'annex',
|
|
|
action: ' annex',
|
|
|
align: 'center',
|
|
|
@@ -600,6 +627,31 @@ export default {
|
|
|
})
|
|
|
|
|
|
},
|
|
|
+
|
|
|
+ handleMethod(row) {
|
|
|
+ this.$refs.timeDialogRef.open(row)
|
|
|
+ },
|
|
|
+ chooseTime(current , timeList) {
|
|
|
+
|
|
|
+ let tableList = []
|
|
|
+ tableList = this.$refs.table.getData()
|
|
|
+
|
|
|
+ tableList.forEach(e => {
|
|
|
+ if (e.id == current.detailId) {
|
|
|
+ console.log(e)
|
|
|
+ e.materialList.forEach(m => {
|
|
|
+ if(m.id == current.id) {
|
|
|
+ m.timeList = timeList
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ this.$refs.table.setData([...tableList]);
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|