|
|
@@ -1,23 +1,27 @@
|
|
|
<template>
|
|
|
- <el-form
|
|
|
- ref="form"
|
|
|
- :model="form"
|
|
|
- :rules="rules"
|
|
|
- label-width="100px"
|
|
|
- class="create-form"
|
|
|
- >
|
|
|
- <headerTitle
|
|
|
- title="客户信息"
|
|
|
- style="margin-top: 8px"
|
|
|
- v-if="isPurchaseNeed"
|
|
|
- ></headerTitle>
|
|
|
- <headerTitle
|
|
|
- title="需求信息"
|
|
|
- style="margin-top: 8px"
|
|
|
- v-if="!isPurchaseNeed"
|
|
|
- ></headerTitle>
|
|
|
- <el-row :gutter="24">
|
|
|
- <el-col :span="8">
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="100px" class="create-form">
|
|
|
+ <headerTitle title="基本信息" style="margin-top: 8px" v-if="isPurchaseNeed"></headerTitle>
|
|
|
+ <headerTitle title="需求信息" style="margin-top: 8px" v-if="!isPurchaseNeed"></headerTitle>
|
|
|
+ <el-row :gutter="24" v-if="source != '报工信息'">
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="需求编码:">
|
|
|
+ <el-input v-model="form.code" readonly />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item
|
|
|
+ label="需求名称:"
|
|
|
+ prop="name"
|
|
|
+ :rules="{
|
|
|
+ required: true,
|
|
|
+ message: '请填写需求名称',
|
|
|
+ trigger: 'blur'
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <el-input :readonly="type == 'view'" v-model="form.name" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item
|
|
|
label="客户名称:"
|
|
|
prop="contractInfo.contactName"
|
|
|
@@ -35,7 +39,7 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item
|
|
|
label="发货单:"
|
|
|
prop="orderCode"
|
|
|
@@ -53,32 +57,59 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="客户编码:" prop="code">
|
|
|
<el-input v-model="form.contractInfo.code" readonly />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="客户代号:" prop="serialNo">
|
|
|
<el-input v-model="form.contractInfo.serialNo" readonly />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="业务员:" prop="salesmanName">
|
|
|
<el-input v-model="form.contractInfo.salesmanName" readonly />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="报修地址:" prop="level">
|
|
|
<el-input v-model="form.contactAddress" :readonly="type == 'view'" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <!-- 做下拉,做字典 -->
|
|
|
+ <el-form-item
|
|
|
+ label="故障等级:"
|
|
|
+ prop="faultLevel"
|
|
|
+ :rules="{
|
|
|
+ required: true,
|
|
|
+ message: '请选择故障等级',
|
|
|
+ trigger: 'change'
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <DictSelection
|
|
|
+ dictName="故障等级"
|
|
|
+ :disabled="type == 'view'"
|
|
|
+ clearable
|
|
|
+ v-model="form.faultLevel"
|
|
|
+ ></DictSelection>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="期望解决时间:" prop="expectedTime">
|
|
|
+ <el-date-picker
|
|
|
+ :readonly="type == 'view'"
|
|
|
+ style="width:100%"
|
|
|
+ v-model="form.expectedTime"
|
|
|
+ type="date"
|
|
|
+ :picker-options="pickerOptions"
|
|
|
+ placeholder="选择日期时间"
|
|
|
+ ></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
- <headerTitle
|
|
|
- title="售后需求"
|
|
|
- style="margin-top: 10px"
|
|
|
- v-if="isPurchaseNeed"
|
|
|
- ></headerTitle>
|
|
|
+ <headerTitle title="售后对象" style="margin-top: 10px" v-if="isPurchaseNeed"></headerTitle>
|
|
|
<ele-pro-table
|
|
|
ref="tableRef3"
|
|
|
:columns="columnsDetail"
|
|
|
@@ -86,8 +117,137 @@
|
|
|
:need-page="false"
|
|
|
:toolbar="false"
|
|
|
maxHeight="300px"
|
|
|
+ row-key="id"
|
|
|
+ :expanded-row-keys="expandedRowKeys"
|
|
|
+ :default-expanded-keys="expandedKeys"
|
|
|
>
|
|
|
- <template v-slot:type="{ row, $index }">
|
|
|
+ <!-- *** -->
|
|
|
+ <template v-slot:expand="{ row,$index }">
|
|
|
+ <div
|
|
|
+ style=" width: calc(100% - 55px);min-height: 60px;margin-left: 55px;"
|
|
|
+ v-if="row.faultDetails && row.faultDetails.length > 0"
|
|
|
+ >
|
|
|
+ <ele-pro-table
|
|
|
+ :columns="faultList"
|
|
|
+ :datasource="row.faultDetails || []"
|
|
|
+ :need-page="false"
|
|
|
+ maxHeight="300px"
|
|
|
+ class="el-form-box"
|
|
|
+ :toolkit="[]"
|
|
|
+ >
|
|
|
+ <template v-slot:type="{ row,$index:idx }">
|
|
|
+ <el-form-item
|
|
|
+ :prop="`tableList.${$index}.faultDetails.${idx}.type`"
|
|
|
+ :rules="{
|
|
|
+ required: true,
|
|
|
+ message: '请选择故障类型',
|
|
|
+ trigger: 'change'
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <el-select v-model="row.type" :disabled="change_permission" :placeholder="`请选择`">
|
|
|
+ <el-option
|
|
|
+ v-for="item in typeOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ <template v-slot:faultPhenomenon="{ row,$index:idx }">
|
|
|
+ <el-form-item
|
|
|
+ :prop="`tableList.${$index}.faultDetails.${idx}.faultPhenomenon`"
|
|
|
+ :rules="{
|
|
|
+ required: true,
|
|
|
+ message: '请输入故障现象',
|
|
|
+ trigger: 'change'
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="row.faultPhenomenon"
|
|
|
+ placeholder="请输入"
|
|
|
+ :disabled="change_permission"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ <template v-slot:faultReason="{ row,$index:idx }" v-if="source=='报工信息'">
|
|
|
+ <el-form-item
|
|
|
+ :prop="`tableList.${$index}.faultDetails.${idx}.faultReason`"
|
|
|
+ :rules="{
|
|
|
+ required: true,
|
|
|
+ message: '请输入故障原因',
|
|
|
+ trigger: 'change'
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <el-input v-model="row.faultReason" placeholder="请输入" :disabled="change_permission"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ <template v-slot:faultReason="{ row }" v-else>
|
|
|
+ <el-input v-model="row.faultReason" placeholder="请输入" :disabled="change_permission"></el-input>
|
|
|
+ </template>
|
|
|
+ <template v-slot:maintenanceProcess="{ row,$index:idx }" v-if="source=='报工信息'">
|
|
|
+ <el-form-item
|
|
|
+ :prop="`tableList.${$index}.faultDetails.${idx}.maintenanceProcess`"
|
|
|
+ :rules="{
|
|
|
+ required: true,
|
|
|
+ message: '请输入维修过程',
|
|
|
+ trigger: 'change'
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="row.maintenanceProcess"
|
|
|
+ placeholder="请输入"
|
|
|
+ :disabled="change_permission"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ <template v-slot:maintenanceProcess="{ row }" v-else>
|
|
|
+ <el-input
|
|
|
+ v-model="row.maintenanceProcess"
|
|
|
+ placeholder="请输入"
|
|
|
+ :disabled="change_permission"
|
|
|
+ ></el-input>
|
|
|
+ </template>
|
|
|
+ <template v-slot:attachments="{ row }">
|
|
|
+ <fileMain v-model="row.attachments" :type="type == 'view' ? 'view' : 'add'"></fileMain>
|
|
|
+ </template>
|
|
|
+ <template v-slot:action="{ row:data,$index }">
|
|
|
+ <el-popconfirm class="ele-action" title="确定要删除当前故障吗?" @confirm="delSon(row,$index)">
|
|
|
+ <template v-slot:reference>
|
|
|
+ <!-- v-if="faultOperate(data)" -->
|
|
|
+ <el-link
|
|
|
+ type="danger"
|
|
|
+ v-if="faultOperate(data)"
|
|
|
+ :underline="false"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ >删除</el-link>
|
|
|
+ </template>
|
|
|
+ </el-popconfirm>
|
|
|
+ <!-- <el-link
|
|
|
+ type="danger"
|
|
|
+ :underline="false"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ v-if="type != 'view'"
|
|
|
+ @click="del(row, $index)"
|
|
|
+ >删除</el-link>-->
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-slot:headerType="{ column }">
|
|
|
+ <span class="is-required">{{ column.label }}</span>
|
|
|
+ </template>
|
|
|
+ <template v-slot:headerPhenomenon="{ column }">
|
|
|
+ <span class="is-required">{{ column.label }}</span>
|
|
|
+ </template>
|
|
|
+ <template v-slot:headerMaintenance="{ column }" v-if="source=='报工信息'">
|
|
|
+ <span class="is-required">{{ column.label }}</span>
|
|
|
+ </template>
|
|
|
+ <template v-slot:headerFaultReason="{ column }" v-if="source=='报工信息'">
|
|
|
+ <span class="is-required">{{ column.label }}</span>
|
|
|
+ </template>
|
|
|
+ </ele-pro-table>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <!-- <template v-slot:type="{ row, $index }">
|
|
|
<el-form-item
|
|
|
:prop="`tableList.${$index}.type`"
|
|
|
:rules="{
|
|
|
@@ -96,11 +256,7 @@
|
|
|
trigger: 'change'
|
|
|
}"
|
|
|
>
|
|
|
- <el-select
|
|
|
- v-model="row.type"
|
|
|
- :disabled="type == 'view'"
|
|
|
- placeholder="请选择"
|
|
|
- >
|
|
|
+ <el-select v-model="row.type" :disabled="type == 'view'" placeholder="请选择">
|
|
|
<el-option
|
|
|
v-for="item in typeOptions"
|
|
|
:key="item.value"
|
|
|
@@ -109,8 +265,8 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- </template>
|
|
|
- <template v-slot:typeDescribe="{ row, $index }">
|
|
|
+ </template>-->
|
|
|
+ <!-- <template v-slot:typeDescribe="{ row, $index }">
|
|
|
<el-form-item
|
|
|
:prop="`tableList.${$index}.typeDescribe`"
|
|
|
:rules="{
|
|
|
@@ -119,48 +275,42 @@
|
|
|
trigger: 'change'
|
|
|
}"
|
|
|
>
|
|
|
- <el-input
|
|
|
- v-model="row.typeDescribe"
|
|
|
- :disabled="type == 'view'"
|
|
|
- ></el-input>
|
|
|
+ <el-input v-model="row.typeDescribe" :disabled="type == 'view'"></el-input>
|
|
|
</el-form-item>
|
|
|
- </template>
|
|
|
+ </template>-->
|
|
|
<template v-slot:useLocation="{ row, $index }">
|
|
|
<el-form-item :prop="`tableList.${$index}.useLocation`">
|
|
|
- <el-input
|
|
|
- v-model="row.useLocation"
|
|
|
- :disabled="type == 'view'"
|
|
|
- ></el-input>
|
|
|
+ <el-input v-model="row.useLocation" :disabled="type == 'view'"></el-input>
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
- <template v-slot:attachments="{ row }">
|
|
|
- <fileMain
|
|
|
- v-model="row.attachments"
|
|
|
- :type="type == 'view' ? 'view' : 'add'"
|
|
|
- ></fileMain>
|
|
|
- </template>
|
|
|
+ <!-- <template v-slot:attachments="{ row }">
|
|
|
+ <fileMain v-model="row.attachments" :type="type == 'view' ? 'view' : 'add'"></fileMain>
|
|
|
+ </template>-->
|
|
|
<template v-slot:action="{ row, $index }">
|
|
|
+ <el-link type="primary" :underline="false" v-if="tableOperate" @click="addProblem(row)">添加故障</el-link>
|
|
|
<el-link
|
|
|
type="danger"
|
|
|
:underline="false"
|
|
|
icon="el-icon-delete"
|
|
|
v-if="type != 'view'"
|
|
|
@click="del(row, $index)"
|
|
|
- >删除
|
|
|
- </el-link>
|
|
|
+ >删除</el-link>
|
|
|
+ <!-- <el-link
|
|
|
+ type="danger"
|
|
|
+ :underline="false"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ @click="del(row, $index)"
|
|
|
+ >查看历史记录
|
|
|
+ </el-link>-->
|
|
|
</template>
|
|
|
- <template v-slot:headerTypeDescribe="{ column }">
|
|
|
+ <!-- <template v-slot:headerTypeDescribe="{ column }">
|
|
|
<span class="is-required">{{ column.label }}</span>
|
|
|
- </template>
|
|
|
- <template v-slot:headerType="{ column }">
|
|
|
+ </template>-->
|
|
|
+ <!-- <template v-slot:headerType="{ column }">
|
|
|
<span class="is-required">{{ column.label }}</span>
|
|
|
- </template>
|
|
|
+ </template>-->
|
|
|
</ele-pro-table>
|
|
|
- <headerTitle
|
|
|
- title="联系人信息"
|
|
|
- style="margin-top: 10px"
|
|
|
- v-if="isPurchaseNeed"
|
|
|
- ></headerTitle>
|
|
|
+ <headerTitle title="联系人信息" style="margin-top: 10px" v-if="isPurchaseNeed"></headerTitle>
|
|
|
<ele-pro-table
|
|
|
:style="{ marginTop: isPurchaseNeed ? 0 : '10px' }"
|
|
|
ref="table"
|
|
|
@@ -169,23 +319,27 @@
|
|
|
:toolkit="[]"
|
|
|
class="el-form-box"
|
|
|
:need-page="false"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ v-if="source != '报工信息'"
|
|
|
>
|
|
|
<!-- 表头工具栏 -->
|
|
|
- <template v-slot:toolbar v-if="type != 'view'">
|
|
|
- <el-button type="primary" @click="addBank">添加</el-button>
|
|
|
+ <template v-slot:toolbar>
|
|
|
+ <el-button type="primary" v-if="tableOperate" @click="addBank">添加</el-button>
|
|
|
+ <el-button type="danger" v-if="type != 'view'" @click="delContact">删除</el-button>
|
|
|
+ <span class="reserve" v-if="type != 'view'">请至少留一条联系人数据</span>
|
|
|
</template>
|
|
|
<template v-slot:headerContactName="{ column }">
|
|
|
<span class="is-required">{{ column.label }}</span>
|
|
|
</template>
|
|
|
<template v-slot:action="{ row, $index }">
|
|
|
+ <!-- v-if="type != 'view'" -->
|
|
|
<el-link
|
|
|
type="danger"
|
|
|
:underline="false"
|
|
|
icon="el-icon-delete"
|
|
|
- v-if="type != 'view'"
|
|
|
+ v-if="faultOperate(row)"
|
|
|
@click="handleBankDel(row, $index)"
|
|
|
- >删除
|
|
|
- </el-link>
|
|
|
+ >删除</el-link>
|
|
|
</template>
|
|
|
|
|
|
<template v-slot:contactName="{ row,$index }">
|
|
|
@@ -200,437 +354,581 @@
|
|
|
<el-input
|
|
|
v-model="row.contactName"
|
|
|
placeholder="请输入"
|
|
|
- :disabled="type == 'view'"
|
|
|
+ :disabled="change_permission"
|
|
|
maxlength="50"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
<template v-slot:contactPhone="{ row }">
|
|
|
- <el-input
|
|
|
- v-model="row.contactPhone"
|
|
|
- placeholder="请输入"
|
|
|
- :disabled="type == 'view'"
|
|
|
- ></el-input>
|
|
|
+ <el-input v-model="row.contactPhone" placeholder="请输入" :disabled="change_permission"></el-input>
|
|
|
</template>
|
|
|
<template v-slot:post="{ row }">
|
|
|
- <el-input
|
|
|
- v-model="row.post"
|
|
|
- placeholder="请输入"
|
|
|
- :disabled="type == 'view'"
|
|
|
- ></el-input>
|
|
|
+ <el-input v-model="row.post" placeholder="请输入" :disabled="change_permission"></el-input>
|
|
|
</template>
|
|
|
<template v-slot:telephone="{ row }">
|
|
|
- <el-input
|
|
|
- v-model="row.telephone"
|
|
|
- placeholder="请输入"
|
|
|
- :disabled="type == 'view'"
|
|
|
- ></el-input>
|
|
|
+ <el-input v-model="row.telephone" placeholder="请输入" :disabled="change_permission"></el-input>
|
|
|
</template>
|
|
|
<template v-slot:email="{ row }">
|
|
|
- <el-input
|
|
|
- v-model="row.email"
|
|
|
- placeholder="请输入"
|
|
|
- :disabled="type == 'view'"
|
|
|
- ></el-input>
|
|
|
+ <el-input v-model="row.email" placeholder="请输入" :disabled="change_permission"></el-input>
|
|
|
</template>
|
|
|
<template v-slot:wechat="{ row }">
|
|
|
- <el-input
|
|
|
- v-model="row.wechat"
|
|
|
- placeholder="请输入"
|
|
|
- :disabled="type == 'view'"
|
|
|
- ></el-input>
|
|
|
+ <el-input v-model="row.wechat" placeholder="请输入" :disabled="change_permission"></el-input>
|
|
|
</template>
|
|
|
<template v-slot:deptName="{ row }">
|
|
|
- <el-input
|
|
|
- v-model="row.deptName"
|
|
|
- placeholder="请输入"
|
|
|
- :disabled="type == 'view'"
|
|
|
- ></el-input>
|
|
|
+ <el-input v-model="row.deptName" placeholder="请输入" :disabled="change_permission"></el-input>
|
|
|
</template>
|
|
|
<template v-slot:remark="{ row }">
|
|
|
- <el-input
|
|
|
- v-model="row.remark"
|
|
|
- placeholder="请输入"
|
|
|
- :disabled="type == 'view'"
|
|
|
- ></el-input>
|
|
|
+ <el-input v-model="row.remark" placeholder="请输入" :disabled="change_permission"></el-input>
|
|
|
</template>
|
|
|
</ele-pro-table>
|
|
|
<parentList ref="parentRef" @changeParent="changeParent"></parentList>
|
|
|
- <invoiceDialog
|
|
|
- ref="invoiceDialogRef"
|
|
|
- @changeParent="invoiceChange"
|
|
|
- ></invoiceDialog>
|
|
|
+ <invoiceDialog ref="invoiceDialogRef" @changeParent="invoiceChange"></invoiceDialog>
|
|
|
</el-form>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import fileMain from '@/components/addDoc/index.vue';
|
|
|
- import { mapGetters, mapActions } from 'vuex';
|
|
|
- import { contactDetail } from '@/api/saleManage/contact';
|
|
|
- import parentList from '@/views/saleManage/contact/components/parentList.vue';
|
|
|
- import invoiceDialog from './invoiceDialog.vue';
|
|
|
- export default {
|
|
|
- components: { fileMain, parentList, invoiceDialog },
|
|
|
- computed: {
|
|
|
- ...mapGetters(['getDictValue']),
|
|
|
- bankColumns() {
|
|
|
- return [
|
|
|
- {
|
|
|
- type: 'index',
|
|
|
- width: 55,
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '姓名',
|
|
|
- prop: 'contactName',
|
|
|
- slot: 'contactName',
|
|
|
- headerSlot: 'headerContactName',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '手机',
|
|
|
- prop: 'contactPhone',
|
|
|
- slot: 'contactPhone',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '电话',
|
|
|
- prop: 'telephone',
|
|
|
- slot: 'telephone',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
+import dictMixins from '@/mixins/dictMixins';
|
|
|
+import fileMain from '@/components/addDoc/index.vue';
|
|
|
+import { mapGetters, mapActions } from 'vuex';
|
|
|
+import { contactDetail } from '@/api/saleManage/contact';
|
|
|
+import parentList from '@/views/saleManage/contact/components/parentList.vue';
|
|
|
+import invoiceDialog from './invoiceDialog.vue';
|
|
|
+export default {
|
|
|
+ mixins: [dictMixins],
|
|
|
+ components: { fileMain, parentList, invoiceDialog },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(['getDictValue']),
|
|
|
+ bankColumns() {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ label: '序号',
|
|
|
+ type: 'index',
|
|
|
+ width: 55,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ width: 45,
|
|
|
+ type: 'selection',
|
|
|
+ columnKey: 'selection',
|
|
|
+ align: 'center',
|
|
|
+ show: this.type != 'view'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '姓名',
|
|
|
+ prop: 'contactName',
|
|
|
+ slot: 'contactName',
|
|
|
+ headerSlot: 'headerContactName',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '手机',
|
|
|
+ prop: 'contactPhone',
|
|
|
+ slot: 'contactPhone',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '电话',
|
|
|
+ prop: 'telephone',
|
|
|
+ slot: 'telephone',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ label: '微信号',
|
|
|
+ prop: 'wechat',
|
|
|
+ slot: 'wechat',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '邮箱',
|
|
|
+ prop: 'email',
|
|
|
+ slot: 'email',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '部门',
|
|
|
+ prop: 'deptName',
|
|
|
+ slot: 'deptName',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '职务',
|
|
|
+ prop: 'post',
|
|
|
+ slot: 'post',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注',
|
|
|
+ prop: 'remark',
|
|
|
+ slot: 'remark',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ action: 'action',
|
|
|
+ slot: 'action',
|
|
|
+ label: '操作',
|
|
|
+ align: 'center',
|
|
|
+ fixed: 'right',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ // show: this.type != 'view'
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ },
|
|
|
+ columnsDetail() {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ columnKey: 'index',
|
|
|
+ label: '序号',
|
|
|
+ type: 'index',
|
|
|
+ width: 55,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // action: 'select',
|
|
|
+ // slot: 'select',
|
|
|
+ // align: 'center',
|
|
|
+ // label: '选择'
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ width: 45,
|
|
|
+ type: 'expand',
|
|
|
+ columnKey: 'expand',
|
|
|
+ align: 'center',
|
|
|
+ slot: 'expand'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'categoryCode',
|
|
|
+ label: '编码',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
|
|
|
- {
|
|
|
- label: '微信号',
|
|
|
- prop: 'wechat',
|
|
|
- slot: 'wechat',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '邮箱',
|
|
|
- prop: 'email',
|
|
|
- slot: 'email',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '部门',
|
|
|
- prop: 'deptName',
|
|
|
- slot: 'deptName',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '职务',
|
|
|
- prop: 'post',
|
|
|
- slot: 'post',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '备注',
|
|
|
- prop: 'remark',
|
|
|
- slot: 'remark',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- action: 'action',
|
|
|
- slot: 'action',
|
|
|
- label: '操作',
|
|
|
- align: 'center',
|
|
|
- fixed: 'right',
|
|
|
- showOverflowTooltip: true,
|
|
|
- show: this.type != 'view'
|
|
|
+ {
|
|
|
+ prop: 'categoryName',
|
|
|
+ label: '名称',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'categoryModel',
|
|
|
+ label: '型号',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'batchNo',
|
|
|
+ label: '批次号',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'barcodes',
|
|
|
+ label: '发货条码',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'shipmentDate',
|
|
|
+ label: '发货时间',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'guaranteePeriodDeadline',
|
|
|
+ label: '质保有效期',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'warrantyStatus',
|
|
|
+ label: '质保状态',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ formatter: (_row, _column, cellValue) => {
|
|
|
+ return _row.warrantyStatus == 1 ? '质保期外' : '质保期内';
|
|
|
}
|
|
|
- ];
|
|
|
- },
|
|
|
- columnsDetail() {
|
|
|
- return [
|
|
|
- {
|
|
|
- columnKey: 'index',
|
|
|
- label: '序号',
|
|
|
- type: 'index',
|
|
|
- width: 55,
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'categoryCode',
|
|
|
- label: '编码',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
+ },
|
|
|
|
|
|
- {
|
|
|
- prop: 'categoryName',
|
|
|
- label: '名称',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'categoryModel',
|
|
|
- label: '型号',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'batchNo',
|
|
|
- label: '批次号',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'barcodes',
|
|
|
- label: '发货条码',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'shipmentDate',
|
|
|
- label: '发货时间',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'guaranteePeriodDeadline',
|
|
|
- label: '质保有效期',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'warrantyStatus',
|
|
|
- label: '质保状态',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- formatter: (_row, _column, cellValue) => {
|
|
|
- return _row.warrantyStatus == 1 ? '质保期外' : '质保期内';
|
|
|
- }
|
|
|
- },
|
|
|
+ {
|
|
|
+ prop: 'measureQuantity',
|
|
|
+ label: '计量数量',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'packageNo',
|
|
|
+ label: '包装编码',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'packingQuantity',
|
|
|
+ label: '包装数量',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'packingUnit',
|
|
|
+ label: '包装单位',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
|
|
|
- {
|
|
|
- prop: 'measureQuantity',
|
|
|
- label: '计量数量',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'packageNo',
|
|
|
- label: '包装编码',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'packingQuantity',
|
|
|
- label: '包装数量',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'packingUnit',
|
|
|
- label: '包装单位',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
+ {
|
|
|
+ prop: 'materielDesignation',
|
|
|
+ label: '物料代号',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'engrave',
|
|
|
+ label: '刻码',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // prop: 'useLocation',
|
|
|
+ // label: '使用地点',
|
|
|
+ // align: 'center',
|
|
|
+ // slot: 'useLocation',
|
|
|
+ // showOverflowTooltip: true,
|
|
|
+ // width: 200
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: 'type',
|
|
|
+ // slot: 'type',
|
|
|
+ // label: '问题类型',
|
|
|
+ // align: 'center',
|
|
|
+ // headerSlot: 'headerType',
|
|
|
+ // showOverflowTooltip: true,
|
|
|
+ // width: 120
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: 'typeDescribe',
|
|
|
+ // slot: 'typeDescribe',
|
|
|
+ // label: '问题描述',
|
|
|
+ // headerSlot: 'headerTypeDescribe',
|
|
|
+ // align: 'center',
|
|
|
+ // showOverflowTooltip: true,
|
|
|
+ // width: 400
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: 'attachments',
|
|
|
+ // slot: 'attachments',
|
|
|
+ // label: '附件',
|
|
|
+ // align: 'center',
|
|
|
+ // width: 120
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ columnKey: 'action',
|
|
|
+ label: '操作',
|
|
|
+ width: 150,
|
|
|
+ align: 'center',
|
|
|
+ resizable: false,
|
|
|
+ slot: 'action',
|
|
|
+ // fixed: 'right',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ // show: this.type != 'view'
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ },
|
|
|
+ // 问题描述 ***
|
|
|
+ faultList() {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ type: 'index',
|
|
|
+ label: '序号',
|
|
|
+ align: 'center',
|
|
|
+ width: 60
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'type',
|
|
|
+ slot: 'type',
|
|
|
+ label: '故障类型',
|
|
|
+ align: 'center',
|
|
|
+ headerSlot: 'headerType',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 120
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'faultPhenomenon',
|
|
|
+ slot: 'faultPhenomenon',
|
|
|
+ headerSlot: 'headerPhenomenon',
|
|
|
+ label: '故障现象',
|
|
|
+ align: 'center',
|
|
|
+ width: 300
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'faultReason',
|
|
|
+ slot: 'faultReason',
|
|
|
+ headerSlot: 'headerFaultReason',
|
|
|
+ label: '故障原因',
|
|
|
+ align: 'center',
|
|
|
+ width: 400
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'maintenanceProcess',
|
|
|
+ slot: 'maintenanceProcess',
|
|
|
+ headerSlot: 'headerMaintenance',
|
|
|
+ label: '维修过程',
|
|
|
+ align: 'center',
|
|
|
+ width: 400
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'attachments',
|
|
|
+ slot: 'attachments',
|
|
|
+ label: '附件',
|
|
|
+ align: 'center',
|
|
|
+ width: 120
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnKey: 'action',
|
|
|
+ label: '操作',
|
|
|
+ width: 150,
|
|
|
+ align: 'center',
|
|
|
+ resizable: false,
|
|
|
+ slot: 'action',
|
|
|
+ // fixed: 'right',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ },
|
|
|
+ // 需求表格修改权限 ***
|
|
|
+ tableOperate() {
|
|
|
+ let flag = this.type != 'view' || this.state == '可操作';
|
|
|
+ return flag;
|
|
|
+ },
|
|
|
|
|
|
- {
|
|
|
- prop: 'materielDesignation',
|
|
|
- label: '物料代号',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'engrave',
|
|
|
- label: '刻码',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- // {
|
|
|
- // prop: 'useLocation',
|
|
|
- // label: '使用地点',
|
|
|
- // align: 'center',
|
|
|
- // slot: 'useLocation',
|
|
|
- // showOverflowTooltip: true,
|
|
|
- // width: 200
|
|
|
- // },
|
|
|
- {
|
|
|
- prop: 'type',
|
|
|
- slot: 'type',
|
|
|
- label: '问题类型',
|
|
|
- align: 'center',
|
|
|
- headerSlot: 'headerType',
|
|
|
- showOverflowTooltip: true,
|
|
|
- width: 120
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'typeDescribe',
|
|
|
- slot: 'typeDescribe',
|
|
|
- label: '问题描述',
|
|
|
- headerSlot: 'headerTypeDescribe',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- width: 400
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'attachments',
|
|
|
- slot: 'attachments',
|
|
|
- label: '附件',
|
|
|
- align: 'center',
|
|
|
- width: 120
|
|
|
- },
|
|
|
- {
|
|
|
- columnKey: 'action',
|
|
|
- label: '操作',
|
|
|
- width: 150,
|
|
|
- align: 'center',
|
|
|
- resizable: false,
|
|
|
- slot: 'action',
|
|
|
- fixed: 'right',
|
|
|
- showOverflowTooltip: true,
|
|
|
- show: this.type != 'view'
|
|
|
- }
|
|
|
- ];
|
|
|
- }
|
|
|
+ // 故障列表删除权限
|
|
|
+ faultOperate() {
|
|
|
+ return (row) => {
|
|
|
+ let flag = (this.state == '可操作' && !row.id) || this.type != 'view';
|
|
|
+ return flag;
|
|
|
+ };
|
|
|
},
|
|
|
- props: {
|
|
|
- type: '',
|
|
|
- isPurchaseNeed: {
|
|
|
- default: true,
|
|
|
- type: Boolean
|
|
|
+
|
|
|
+ // 故障/联系人列表更改权限 ***
|
|
|
+ change_permission() {
|
|
|
+ let flag = this.type === 'view';
|
|
|
+ if (this.source) {
|
|
|
+ return false;
|
|
|
}
|
|
|
+ return flag;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ props: {
|
|
|
+ type: '',
|
|
|
+ isPurchaseNeed: {
|
|
|
+ default: true,
|
|
|
+ type: Boolean
|
|
|
},
|
|
|
- data() {
|
|
|
- return {
|
|
|
- tableList: [],
|
|
|
- typeOptions: [
|
|
|
- { label: '维修', value: '1' },
|
|
|
- { label: '保养', value: '2' },
|
|
|
- { label: '安装', value: '3' }
|
|
|
- ],
|
|
|
- form: { contractInfo: {}, tableList: [], contactInfoVOS: [] },
|
|
|
- rules: {}
|
|
|
- };
|
|
|
+ // 来源页面 ***
|
|
|
+ source: {
|
|
|
+ default: '',
|
|
|
+ type: String
|
|
|
},
|
|
|
|
|
|
- created() {},
|
|
|
- methods: {
|
|
|
- async init(res) {
|
|
|
- this.$set(this.form, 'tableList', res.productDetail);
|
|
|
- this.$set(this.form, 'orderCode', res.orderCode);
|
|
|
- this.$set(this.form, 'orderId', res.orderId);
|
|
|
- this.$set(this.form, 'contactInfoVOS', res.contactInfoVOS);
|
|
|
- if (res.contactAddress) {
|
|
|
- this.$set(this.form, 'contactAddress', res.contactAddress);
|
|
|
- }
|
|
|
- this.contactDetail(res.contactId, 'init');
|
|
|
- },
|
|
|
- getValue() {
|
|
|
- return this.form;
|
|
|
- },
|
|
|
- //客户选择
|
|
|
- handHead() {
|
|
|
- if (this.type != 'view') {
|
|
|
- this.$refs.parentRef.open();
|
|
|
+ // 表格数据 更改状态
|
|
|
+ state: {
|
|
|
+ default: '',
|
|
|
+ type: String
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ expandedRowKeys: [],
|
|
|
+ expandedKeys: [],
|
|
|
+ tableList: [],
|
|
|
+ selection: [],
|
|
|
+ // 日期选择器配置
|
|
|
+ pickerOptions: {
|
|
|
+ disabledDate(time) {
|
|
|
+ // 禁用今天之前的日期
|
|
|
+ return time.getTime() < new Date().setHours(0, 0, 0, 0);
|
|
|
}
|
|
|
},
|
|
|
- changeParent(res) {
|
|
|
- this.contactDetail(res.id);
|
|
|
+ typeOptions: [
|
|
|
+ { label: '维修', value: '1' },
|
|
|
+ { label: '保养', value: '2' },
|
|
|
+ { label: '安装', value: '3' }
|
|
|
+ ],
|
|
|
+ form: {
|
|
|
+ contractInfo: {},
|
|
|
+ tableList: [],
|
|
|
+ contactInfoVOS: []
|
|
|
},
|
|
|
- //客户回调
|
|
|
- async contactDetail(id, type) {
|
|
|
- if (!id) {
|
|
|
- this.contractInfo = {};
|
|
|
- return;
|
|
|
- }
|
|
|
- let { base, other, linkList } = await contactDetail(id);
|
|
|
- base.contactName = base.name;
|
|
|
- let addressName = '';
|
|
|
- if (other.addressName) {
|
|
|
- addressName += other.addressName;
|
|
|
- }
|
|
|
- if (other.address) {
|
|
|
- addressName += other.address;
|
|
|
- }
|
|
|
+ rules: {},
|
|
|
+ radio: null
|
|
|
+ };
|
|
|
+ },
|
|
|
|
|
|
- this.$set(this.form, 'contractInfo', base);
|
|
|
+ created() {},
|
|
|
+ methods: {
|
|
|
+ async init(res) {
|
|
|
+ this.$set(this.form, 'tableList', res.productDetail);
|
|
|
+ this.$set(this.form, 'orderCode', res.orderCode);
|
|
|
+ this.$set(this.form, 'orderId', res.orderId);
|
|
|
+ this.$set(this.form, 'contactInfoVOS', res.contactInfoVOS);
|
|
|
+ this.$set(this.form, 'name', res.name);
|
|
|
+ let faultLevel = res.faultLevel ? String(res.faultLevel) : '';
|
|
|
+ this.$set(this.form, 'faultLevel', faultLevel);
|
|
|
+ this.$set(this.form, 'code', res.code);
|
|
|
+ this.$set(this.form, 'expectedTime', res.expectedTime);
|
|
|
+ if (res.contactAddress) {
|
|
|
+ this.$set(this.form, 'contactAddress', res.contactAddress);
|
|
|
+ }
|
|
|
+ this.contactDetail(res.contactId, 'init');
|
|
|
+ },
|
|
|
+ getValue() {
|
|
|
+ return this.form;
|
|
|
+ },
|
|
|
+ //客户选择
|
|
|
+ handHead() {
|
|
|
+ if (this.type != 'view') {
|
|
|
+ this.$refs.parentRef.open();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ changeParent(res) {
|
|
|
+ this.contactDetail(res.id);
|
|
|
+ },
|
|
|
+ //客户回调
|
|
|
+ async contactDetail(id, type) {
|
|
|
+ if (!id) {
|
|
|
+ this.contractInfo = {};
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let { base, other, linkList } = await contactDetail(id);
|
|
|
+ base.contactName = base.name;
|
|
|
+ let addressName = '';
|
|
|
+ if (other.addressName) {
|
|
|
+ addressName += other.addressName;
|
|
|
+ }
|
|
|
+ if (other.address) {
|
|
|
+ addressName += other.address;
|
|
|
+ }
|
|
|
|
|
|
- if (type != 'init') {
|
|
|
- this.$set(this.form, 'contactAddress', addressName);
|
|
|
- this.$set(
|
|
|
- this.form,
|
|
|
- 'contactInfoVOS',
|
|
|
- linkList.map((item) => {
|
|
|
- item['contactName'] = item.linkName;
|
|
|
- item['contactPhone'] = item.mobilePhone;
|
|
|
- item['telephone'] = item.phone;
|
|
|
- return item;
|
|
|
- })
|
|
|
- );
|
|
|
- }
|
|
|
+ this.$set(this.form, 'contractInfo', base);
|
|
|
|
|
|
- // this.contractInfo = base;
|
|
|
- },
|
|
|
- //发货单选择
|
|
|
- invoiceDialogOpen() {
|
|
|
- if (!this.form?.contractInfo?.id) {
|
|
|
- this.$message.warning('请先选择客户!');
|
|
|
- return;
|
|
|
- }
|
|
|
- if (this.type != 'view') {
|
|
|
- this.$refs.invoiceDialogRef.open(this.form.contractInfo.id);
|
|
|
- }
|
|
|
- },
|
|
|
- //发货单回调
|
|
|
- invoiceChange(data) {
|
|
|
- console.log(data, 'data');
|
|
|
- this.$set(this.form, 'orderCode', data.orderCode);
|
|
|
- this.$set(this.form, 'orderId', data.orderId);
|
|
|
- this.$set(this.form, 'tableList', data.tableList);
|
|
|
- },
|
|
|
- addBank() {
|
|
|
- this.form.contactInfoVOS.push({
|
|
|
- contactName: '',
|
|
|
- contactPhone: '',
|
|
|
- remark: ''
|
|
|
- });
|
|
|
- },
|
|
|
- handleBankDel(row, index) {
|
|
|
- this.form.contactInfoVOS.splice(index, 1);
|
|
|
- },
|
|
|
- del(row, index) {
|
|
|
- this.form.tableList.splice(index, 1);
|
|
|
- },
|
|
|
+ if (type != 'init') {
|
|
|
+ this.$set(this.form, 'contactAddress', addressName);
|
|
|
+ this.$set(
|
|
|
+ this.form,
|
|
|
+ 'contactInfoVOS',
|
|
|
+ linkList.map((item) => {
|
|
|
+ item['contactName'] = item.linkName;
|
|
|
+ item['contactPhone'] = item.mobilePhone;
|
|
|
+ item['telephone'] = item.phone;
|
|
|
+ return item;
|
|
|
+ })
|
|
|
+ );
|
|
|
+ }
|
|
|
+ // this.contractInfo = base;
|
|
|
+ },
|
|
|
+ //发货单选择
|
|
|
+ invoiceDialogOpen() {
|
|
|
+ if (!this.form?.contractInfo?.id) {
|
|
|
+ this.$message.warning('请先选择客户!');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this.type != 'view') {
|
|
|
+ this.$refs.invoiceDialogRef.open(this.form.contractInfo.id);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //发货单回调
|
|
|
+ invoiceChange(data) {
|
|
|
+ console.log(data, 'data 执行了没');
|
|
|
+ this.$set(this.form, 'orderCode', data.orderCode);
|
|
|
+ this.$set(this.form, 'orderId', data.orderId);
|
|
|
+ this.$set(this.form, 'tableList', data.tableList);
|
|
|
+ // 单选赋值 ***
|
|
|
+ // if (data.tableList && data.tableList.length > 0) {
|
|
|
+ // this.radio = data.tableList[0].id;
|
|
|
+ // this.radio = 0;
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ addBank() {
|
|
|
+ this.form.contactInfoVOS.push({
|
|
|
+ contactName: '',
|
|
|
+ contactPhone: '',
|
|
|
+ remark: ''
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // *** 添加问题
|
|
|
+ addProblem(row) {
|
|
|
+ if (!row.faultDetails) this.$set(row, 'faultDetails', []);
|
|
|
+ let len = row.faultDetails.length;
|
|
|
+ this.$set(row.faultDetails, len, {
|
|
|
+ maintenanceProcess: '',
|
|
|
+ type: '',
|
|
|
+ faultPhenomenon: ''
|
|
|
+ // demandDetailId: row.id
|
|
|
+ });
|
|
|
+ // this.expandedRowKeys = this.$refs.tableRef3.getData()?.map((item) => item.id).filter(id => id != null);
|
|
|
+ // this.expandedRowKeys.push(row.id)
|
|
|
+ // console.log(this.expandedRowKeys,'this.expandedRowKeys')
|
|
|
+ },
|
|
|
+ // *** 删除问题
|
|
|
+ delSon(row, idx) {
|
|
|
+ row.faultDetails.splice(idx, 1);
|
|
|
+ this.$forceUpdate();
|
|
|
+ },
|
|
|
+ //
|
|
|
+ handleSelectionChange(rows) {
|
|
|
+ this.selection = rows;
|
|
|
+ },
|
|
|
+ // *** 删除联系人
|
|
|
+ delContact() {
|
|
|
+ this.form.contactInfoVOS = this.form.contactInfoVOS.filter(
|
|
|
+ (row) => !this.selection.includes(row)
|
|
|
+ );
|
|
|
+ },
|
|
|
+ handleBankDel(row, index) {
|
|
|
+ this.form.contactInfoVOS.splice(index, 1);
|
|
|
+ },
|
|
|
+ del(row, index) {
|
|
|
+ this.form.tableList.splice(index, 1);
|
|
|
+ },
|
|
|
|
|
|
- getValidate() {
|
|
|
- return new Promise((resolve, reject) => {
|
|
|
- this.$refs.form.validate((valid, obj) => {
|
|
|
- if (obj) {
|
|
|
- let messages = Object.keys(obj).map((key) => obj[key][0]);
|
|
|
- if (messages.length > 0) {
|
|
|
- this.$message.warning(messages[0].message);
|
|
|
- }
|
|
|
+ getValidate() {
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ this.$refs.form.validate((valid, obj) => {
|
|
|
+ if (obj) {
|
|
|
+ let messages = Object.keys(obj).map((key) => obj[key][0]);
|
|
|
+ if (messages.length > 0) {
|
|
|
+ this.$message.warning(messages[0].message);
|
|
|
}
|
|
|
- if (!valid) {
|
|
|
- reject(false);
|
|
|
- } else {
|
|
|
- resolve(true);
|
|
|
- }
|
|
|
- });
|
|
|
+ }
|
|
|
+ if (!valid) {
|
|
|
+ reject(false);
|
|
|
+ } else {
|
|
|
+ resolve(true);
|
|
|
+ }
|
|
|
});
|
|
|
- },
|
|
|
- catch() {
|
|
|
- this.form = {
|
|
|
- tableList: [],
|
|
|
- contractInfo: {},
|
|
|
- contactInfoVOS: [],
|
|
|
- orderCode: '',
|
|
|
- orderId: ''
|
|
|
- };
|
|
|
- }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ catch() {
|
|
|
+ this.form = {
|
|
|
+ tableList: [],
|
|
|
+ contractInfo: {},
|
|
|
+ contactInfoVOS: [],
|
|
|
+ orderCode: '',
|
|
|
+ orderId: ''
|
|
|
+ };
|
|
|
}
|
|
|
- };
|
|
|
+ }
|
|
|
+};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
- :deep(.el-table__body .el-form-item__content) {
|
|
|
- margin-left: 0px !important;
|
|
|
- }
|
|
|
- :deep(.el-table__body .el-form-item) {
|
|
|
- margin-bottom: 0px !important;
|
|
|
- }
|
|
|
+:deep(.el-table__body .el-form-item__content) {
|
|
|
+ margin-left: 0px !important;
|
|
|
+}
|
|
|
+:deep(.el-table__body .el-form-item) {
|
|
|
+ margin-bottom: 0px !important;
|
|
|
+}
|
|
|
+
|
|
|
+.reserve {
|
|
|
+ margin-left: 16px;
|
|
|
+ color: #e6a23c;
|
|
|
+}
|
|
|
</style>
|