|
|
@@ -51,7 +51,6 @@
|
|
|
<el-form-item
|
|
|
style="margin-bottom: 20px"
|
|
|
:prop="'datasource.' + scope.$index + '.productCode'"
|
|
|
-
|
|
|
>
|
|
|
<el-input v-model="scope.row.productCode" disabled></el-input>
|
|
|
</el-form-item>
|
|
|
@@ -60,7 +59,6 @@
|
|
|
<el-form-item
|
|
|
style="margin-bottom: 20px"
|
|
|
:prop="'datasource.' + scope.$index + '.productCategoryName'"
|
|
|
-
|
|
|
>
|
|
|
<el-input v-model="scope.row.productCategoryName" disabled></el-input>
|
|
|
</el-form-item>
|
|
|
@@ -198,8 +196,23 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
+ <template v-slot:technicalDrawings="scope">
|
|
|
+ <el-form-item
|
|
|
+ style="margin-bottom: 20px"
|
|
|
+ :prop="'datasource.' + scope.$index + '.technicalDrawings'"
|
|
|
+ >
|
|
|
+ <fileUpload
|
|
|
+ v-model="scope.row.technicalDrawings"
|
|
|
+ module="main"
|
|
|
+ :showLib="false"
|
|
|
+ :limit="5"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+
|
|
|
<template v-slot:expectReceiveDate="scope">
|
|
|
<el-form-item
|
|
|
+ v-if="scope.row.arrivalWay == 1"
|
|
|
style="margin-bottom: 20px"
|
|
|
:prop="'datasource.' + scope.$index + '.expectReceiveDate'"
|
|
|
:rules="{
|
|
|
@@ -218,7 +231,44 @@
|
|
|
>
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ style="margin-bottom: 20px"
|
|
|
+ v-if="scope.row.arrivalWay == 2"
|
|
|
+ >
|
|
|
+ <el-link
|
|
|
+ type="primary"
|
|
|
+ :underline="false"
|
|
|
+ @click.native="handleMethod(scope.row)"
|
|
|
+ >
|
|
|
+ 设置分批时间
|
|
|
+ </el-link>
|
|
|
+ </el-form-item>
|
|
|
</template>
|
|
|
+ <template v-slot:arrivalWay="scope">
|
|
|
+ <el-form-item
|
|
|
+ :prop="'datasource.' + scope.$index + '.arrivalWay'"
|
|
|
+ :rules="{
|
|
|
+ required: true,
|
|
|
+ message: '请选择',
|
|
|
+ trigger: 'blur'
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row.arrivalWay"
|
|
|
+ clearable
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in arrivalWayList"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+
|
|
|
<template v-slot:headerProductName="{ column }">
|
|
|
<span class="is-required">{{ column.label }}</span>
|
|
|
</template>
|
|
|
@@ -228,6 +278,10 @@
|
|
|
<template v-slot:headerExpectReceiveDate="{ column }">
|
|
|
<span class="is-required">{{ column.label }}</span>
|
|
|
</template>
|
|
|
+ <template v-slot:headerArrivalWay="{ column }">
|
|
|
+ <span class="is-required">{{ column.label }}</span>
|
|
|
+ </template>
|
|
|
+
|
|
|
<!-- 操作列 -->
|
|
|
<template v-slot:action="scope">
|
|
|
<el-popconfirm
|
|
|
@@ -249,20 +303,24 @@
|
|
|
@changeParent="changeParent"
|
|
|
></product-list>
|
|
|
<head-list ref="headRef" @changeParent="changeAnswer"></head-list>
|
|
|
+ <timeDialog @chooseTime="chooseTime" ref="timeDialogRef"></timeDialog>
|
|
|
</el-form>
|
|
|
</template>
|
|
|
<script>
|
|
|
- import {numberReg } from 'ele-admin';
|
|
|
+ import { numberReg } from 'ele-admin';
|
|
|
import productList from './product-list.vue';
|
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
|
import fileUpload from '@/components/upload/fileUpload';
|
|
|
import headList from '@/views/saleManage/businessOpportunity/components/headList.vue';
|
|
|
+ import timeDialog from '@/components/timeDialog/index.vue';
|
|
|
+ import { copyObj } from '@/utils/util';
|
|
|
export default {
|
|
|
mixins: [dictMixins],
|
|
|
components: {
|
|
|
productList,
|
|
|
fileUpload,
|
|
|
- headList
|
|
|
+ headList,
|
|
|
+ timeDialog
|
|
|
},
|
|
|
data() {
|
|
|
const defaultForm = {
|
|
|
@@ -274,6 +332,10 @@
|
|
|
return {
|
|
|
numberReg,
|
|
|
defaultForm,
|
|
|
+ arrivalWayList: [
|
|
|
+ { label: '一次性到货', value: 1 },
|
|
|
+ { label: '分批到货', value: 2 }
|
|
|
+ ],
|
|
|
form: {
|
|
|
datasource: []
|
|
|
},
|
|
|
@@ -303,7 +365,7 @@
|
|
|
prop: 'productName',
|
|
|
label: '名称',
|
|
|
slot: 'productName',
|
|
|
- headerSlot: 'headerProductName',
|
|
|
+ headerSlot: 'headerProductName'
|
|
|
},
|
|
|
{
|
|
|
width: 150,
|
|
|
@@ -316,7 +378,7 @@
|
|
|
prop: 'totalCount',
|
|
|
label: '数量',
|
|
|
slot: 'totalCount',
|
|
|
- headerSlot: 'headerTotalCount',
|
|
|
+ headerSlot: 'headerTotalCount'
|
|
|
},
|
|
|
{
|
|
|
width: 100,
|
|
|
@@ -343,21 +405,32 @@
|
|
|
label: '品牌',
|
|
|
slot: 'brand'
|
|
|
},
|
|
|
+ {
|
|
|
+ width: 160,
|
|
|
+ prop: 'arrivalWay',
|
|
|
+ label: '到货方式',
|
|
|
+ slot: 'arrivalWay',
|
|
|
+ headerSlot: 'headerArrivalWay'
|
|
|
+ },
|
|
|
{
|
|
|
width: 170,
|
|
|
prop: 'expectReceiveDate',
|
|
|
label: '到货日期',
|
|
|
slot: 'expectReceiveDate',
|
|
|
- headerSlot: 'headerExpectReceiveDate',
|
|
|
-
|
|
|
+ headerSlot: 'headerExpectReceiveDate'
|
|
|
},
|
|
|
{
|
|
|
- width: 140,
|
|
|
+ width: 160,
|
|
|
+ prop: 'technicalDrawings',
|
|
|
+ label: '图纸附件',
|
|
|
+ slot: 'technicalDrawings'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ width: 160,
|
|
|
prop: 'files',
|
|
|
label: '附件',
|
|
|
slot: 'files'
|
|
|
},
|
|
|
-
|
|
|
{
|
|
|
width: 220,
|
|
|
prop: 'remark',
|
|
|
@@ -385,7 +458,9 @@
|
|
|
if (comitDatasource.length === 0) return [];
|
|
|
comitDatasource.forEach((v) => {
|
|
|
v.totalPrice = (v.totalCount * v.singlePrice)?.toFixed(2) || 0;
|
|
|
- v.files = v.files || null;
|
|
|
+ v.files = v.files || [];
|
|
|
+ v.technicalDrawings = v.technicalDrawings || [];
|
|
|
+ v.arrivalBatch = v.arrivalBatch || [];
|
|
|
});
|
|
|
return comitDatasource;
|
|
|
},
|
|
|
@@ -395,6 +470,13 @@
|
|
|
this.form.datasource = data;
|
|
|
}
|
|
|
},
|
|
|
+ handleMethod(row) {
|
|
|
+ this.$refs.timeDialogRef.open(row);
|
|
|
+ },
|
|
|
+ chooseTime(row, arrivalBatch) {
|
|
|
+ row.arrivalBatch = copyObj(arrivalBatch);
|
|
|
+ console.log(row, 'row');
|
|
|
+ },
|
|
|
//选择产品
|
|
|
handParent(row, index) {
|
|
|
// let item = {
|