|
|
@@ -22,6 +22,32 @@
|
|
|
<el-input v-model="form.code" disabled />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item
|
|
|
+ label="关联类型:"
|
|
|
+ prop="associationType"
|
|
|
+ :rules="{
|
|
|
+ required: true,
|
|
|
+ message: '请选择关联类型',
|
|
|
+ trigger: 'change'
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <el-select
|
|
|
+ style="width: 100%"
|
|
|
+ v-model="form.associationType"
|
|
|
+ placeholder="请选择"
|
|
|
+ @change="selectType"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in associationTypeList"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item
|
|
|
label="需求名称:"
|
|
|
@@ -69,7 +95,7 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
+ <el-col :span="6" v-show="form.associationType == '1'">
|
|
|
<el-form-item
|
|
|
label="发货单:"
|
|
|
prop="orderCode"
|
|
|
@@ -87,6 +113,24 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="6" v-show="form.associationType == '2'">
|
|
|
+ <el-form-item
|
|
|
+ label="销售订单:"
|
|
|
+ prop="orderCode"
|
|
|
+ :rules="{
|
|
|
+ required: true,
|
|
|
+ message: '请选择销售订单',
|
|
|
+ trigger: 'change'
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="form.orderCode"
|
|
|
+ readonly
|
|
|
+ @click.native="saleorderDialogOpen"
|
|
|
+ placeholder="请选择"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="客户编码:" prop="code">
|
|
|
<el-input v-model="form.contractInfo.code" readonly />
|
|
|
@@ -146,231 +190,386 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <headerTitle
|
|
|
- title="售后对象"
|
|
|
- style="margin-top: 10px"
|
|
|
- v-if="isPurchaseNeed"
|
|
|
- ></headerTitle>
|
|
|
- <ele-pro-table
|
|
|
- ref="tableRef3"
|
|
|
- :columns="columnsDetail"
|
|
|
- :datasource="form.tableList"
|
|
|
- :need-page="false"
|
|
|
- :toolbar="false"
|
|
|
- maxHeight="300px"
|
|
|
- row-key="id"
|
|
|
- default-expand-all
|
|
|
- >
|
|
|
- <template v-slot:measureQuantity="{ row }">
|
|
|
- <el-input
|
|
|
- @input="totalCountChange(row, 'measureQuantity')"
|
|
|
- v-model="row.measureQuantity"
|
|
|
- type="number"
|
|
|
- :min="1"
|
|
|
- placeholder="请输入"
|
|
|
- :disabled="!tableOperate"
|
|
|
- ></el-input>
|
|
|
- </template>
|
|
|
- <template v-slot:batchNo="{ row }">
|
|
|
- <el-input
|
|
|
- v-model="row.batchNo"
|
|
|
- placeholder="请输入"
|
|
|
- :disabled="!tableOperate"
|
|
|
- ></el-input>
|
|
|
- </template>
|
|
|
- <template v-slot:barcodes="{ row }">
|
|
|
- <el-input
|
|
|
- v-model="row.barcodes"
|
|
|
- placeholder="请输入"
|
|
|
- :disabled="!tableOperate"
|
|
|
- ></el-input>
|
|
|
- </template>
|
|
|
- <template v-slot:shipmentDate="{ row }">
|
|
|
- <el-date-picker
|
|
|
- v-model="row.shipmentDate"
|
|
|
- type="datetime"
|
|
|
- placeholder="选择结束时间"
|
|
|
- format="yyyy-MM-dd HH:mm:ss"
|
|
|
- value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
- ></el-date-picker>
|
|
|
- </template>
|
|
|
- <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="[]"
|
|
|
+ <div class="after_sales_target" v-if="salesShow">
|
|
|
+ <headerTitle
|
|
|
+ title="售后对象"
|
|
|
+ style="margin-top: 10px"
|
|
|
+ v-if="isPurchaseNeed"
|
|
|
+ ></headerTitle>
|
|
|
+ <ele-pro-table
|
|
|
+ ref="tableRef3"
|
|
|
+ :columns="columnsDetail"
|
|
|
+ :datasource="form.tableList"
|
|
|
+ :need-page="false"
|
|
|
+ :toolbar="false"
|
|
|
+ maxHeight="300px"
|
|
|
+ row-key="id"
|
|
|
+ default-expand-all
|
|
|
+ >
|
|
|
+ <template v-slot:measureQuantity="{ row }">
|
|
|
+ <el-input
|
|
|
+ @input="totalCountChange(row, 'measureQuantity')"
|
|
|
+ v-model="row.measureQuantity"
|
|
|
+ type="number"
|
|
|
+ :min="1"
|
|
|
+ placeholder="请输入"
|
|
|
+ :disabled="!tableOperate"
|
|
|
+ ></el-input>
|
|
|
+ </template>
|
|
|
+ <template v-slot:batchNo="{ row }">
|
|
|
+ <el-input
|
|
|
+ v-model="row.batchNo"
|
|
|
+ placeholder="请输入"
|
|
|
+ :disabled="!tableOperate"
|
|
|
+ ></el-input>
|
|
|
+ </template>
|
|
|
+ <template v-slot:barcodes="{ row }">
|
|
|
+ <el-input
|
|
|
+ v-model="row.barcodes"
|
|
|
+ placeholder="请输入"
|
|
|
+ :disabled="!tableOperate"
|
|
|
+ ></el-input>
|
|
|
+ </template>
|
|
|
+ <template v-slot:shipmentDate="{ row }">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="row.shipmentDate"
|
|
|
+ type="datetime"
|
|
|
+ placeholder="选择结束时间"
|
|
|
+ format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ ></el-date-picker>
|
|
|
+ </template>
|
|
|
+ <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"
|
|
|
>
|
|
|
- <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 == '报工信息'"
|
|
|
+ <ele-pro-table
|
|
|
+ :columns="faultList"
|
|
|
+ :datasource="row.faultDetails || []"
|
|
|
+ :need-page="false"
|
|
|
+ maxHeight="300px"
|
|
|
+ class="el-form-box"
|
|
|
+ :toolkit="[]"
|
|
|
>
|
|
|
- <el-form-item
|
|
|
- :prop="`tableList.${$index}.faultDetails.${idx}.faultReason`"
|
|
|
- :rules="{
|
|
|
- required: true,
|
|
|
- message: '请输入故障原因',
|
|
|
- trigger: 'change'
|
|
|
- }"
|
|
|
+ <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>
|
|
|
- </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'
|
|
|
- }"
|
|
|
+ </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>
|
|
|
- </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="fileStr"></fileMain>
|
|
|
- </template>
|
|
|
- <template v-slot:imageUrl="{ row }">
|
|
|
- <el-button type="primary" plain @click="seeImage(row)"
|
|
|
- >拍照列表({{ imageUrleng(row) }})</el-button
|
|
|
+ </template>
|
|
|
+ <template v-slot:attachments="{ row }">
|
|
|
+ <fileMain v-model="row.attachments" :type="fileStr"></fileMain>
|
|
|
+ </template>
|
|
|
+ <template v-slot:imageUrl="{ row }">
|
|
|
+ <el-button type="primary" plain @click="seeImage(row)"
|
|
|
+ >拍照列表({{ imageUrleng(row) }})</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ <template v-slot:action="{ row: data, $index }">
|
|
|
+ <el-popconfirm
|
|
|
+ class="ele-action"
|
|
|
+ title="确定要删除当前故障吗?"
|
|
|
+ @confirm="delSon(row, $index)"
|
|
|
+ >
|
|
|
+ <template v-slot:reference>
|
|
|
+ <el-link
|
|
|
+ type="danger"
|
|
|
+ v-if="faultOperate(data)"
|
|
|
+ :underline="false"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ >删除</el-link
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-popconfirm>
|
|
|
+ </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 == '报工信息'"
|
|
|
>
|
|
|
- </template>
|
|
|
- <template v-slot:action="{ row: data, $index }">
|
|
|
- <el-popconfirm
|
|
|
- class="ele-action"
|
|
|
- title="确定要删除当前故障吗?"
|
|
|
- @confirm="delSon(row, $index)"
|
|
|
+ <span class="is-required">{{ column.label }}</span>
|
|
|
+ </template>
|
|
|
+ <template
|
|
|
+ v-slot:headerFaultReason="{ column }"
|
|
|
+ v-if="source == '报工信息'"
|
|
|
>
|
|
|
- <template v-slot:reference>
|
|
|
- <el-link
|
|
|
- type="danger"
|
|
|
- v-if="faultOperate(data)"
|
|
|
- :underline="false"
|
|
|
- icon="el-icon-delete"
|
|
|
- >删除</el-link
|
|
|
- >
|
|
|
- </template>
|
|
|
- </el-popconfirm>
|
|
|
- </template>
|
|
|
+ <span class="is-required">{{ column.label }}</span>
|
|
|
+ </template>
|
|
|
+ </ele-pro-table>
|
|
|
+ </div>
|
|
|
+ </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-form-item>
|
|
|
+ </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
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </ele-pro-table>
|
|
|
+ </div>
|
|
|
+ <div class="fault_infor" v-else>
|
|
|
+ <headerTitle title="故障信息" style="margin-top: 10px"></headerTitle>
|
|
|
|
|
|
- <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 == '报工信息'"
|
|
|
+ <ele-pro-table
|
|
|
+ :columns="faultList"
|
|
|
+ :datasource="form.faultDetailList"
|
|
|
+ :need-page="false"
|
|
|
+ maxHeight="300px"
|
|
|
+ class="el-form-box"
|
|
|
+ :toolkit="[]"
|
|
|
+ >
|
|
|
+ <template v-slot:toolbar>
|
|
|
+ <el-button type="primary" v-if="tableOperate" @click="addFaults"
|
|
|
+ >添加故障</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ <template v-slot:type="{ row, $index: idx }">
|
|
|
+ <el-form-item
|
|
|
+ :prop="`faultDetailList.${idx}.type`"
|
|
|
+ :rules="{
|
|
|
+ required: true,
|
|
|
+ message: '请选择故障类型',
|
|
|
+ trigger: 'change'
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <el-select
|
|
|
+ v-model="row.type"
|
|
|
+ :disabled="change_permission"
|
|
|
+ :placeholder="`请选择`"
|
|
|
>
|
|
|
- <span class="is-required">{{ column.label }}</span>
|
|
|
- </template>
|
|
|
- </ele-pro-table>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <template v-slot:useLocation="{ row, $index }">
|
|
|
- <el-form-item :prop="`tableList.${$index}.useLocation`">
|
|
|
+ <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="`faultDetailList.${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="`faultDetailList.${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.useLocation"
|
|
|
- :disabled="type == 'view'"
|
|
|
+ v-model="row.faultReason"
|
|
|
+ placeholder="请输入"
|
|
|
+ :disabled="change_permission"
|
|
|
></el-input>
|
|
|
- </el-form-item>
|
|
|
- </template>
|
|
|
- <template v-slot:action="{ row, $index }">
|
|
|
- <el-link
|
|
|
- type="primary"
|
|
|
- :underline="false"
|
|
|
- v-if="tableOperate"
|
|
|
- @click="addProblem(row)"
|
|
|
- >添加故障</el-link
|
|
|
+ </template>
|
|
|
+ <template
|
|
|
+ v-slot:maintenanceProcess="{ row, $index: idx }"
|
|
|
+ v-if="source == '报工信息'"
|
|
|
>
|
|
|
- <el-link
|
|
|
- type="danger"
|
|
|
- :underline="false"
|
|
|
- icon="el-icon-delete"
|
|
|
- v-if="type != 'view'"
|
|
|
- @click="del(row, $index)"
|
|
|
- >删除</el-link
|
|
|
+ <el-form-item
|
|
|
+ :prop="`faultDetailList.${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="fileStr"></fileMain>
|
|
|
+ </template>
|
|
|
+ <template v-slot:imageUrl="{ row }">
|
|
|
+ <el-button type="primary" plain @click="seeImage(row)"
|
|
|
+ >拍照列表({{ imageUrleng(row) }})</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ <template v-slot:action="{ row: data, $index }">
|
|
|
+ <el-popconfirm
|
|
|
+ class="ele-action"
|
|
|
+ title="确定要删除当前故障吗?"
|
|
|
+ @confirm="faultDel($index)"
|
|
|
+ >
|
|
|
+ <template v-slot:reference>
|
|
|
+ <el-link type="danger" :underline="false" icon="el-icon-delete"
|
|
|
+ >删除</el-link
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-popconfirm>
|
|
|
+ </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 == '报工信息'"
|
|
|
>
|
|
|
- </template>
|
|
|
- </ele-pro-table>
|
|
|
+ <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>
|
|
|
<headerTitle
|
|
|
title="联系人信息"
|
|
|
style="margin-top: 10px"
|
|
|
@@ -492,21 +691,42 @@
|
|
|
ref="invoiceDialogRef"
|
|
|
@changeParent="invoiceChange"
|
|
|
></invoiceDialog>
|
|
|
+ <SaleorderDialog ref="saleorderDialogRef" @changeParent="saleorderChange" />
|
|
|
</el-form>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import fileMain from '@/components/addDoc/index.vue';
|
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
|
import PhotoList from './photoList.vue';
|
|
|
import { mapGetters } from 'vuex';
|
|
|
import { contactDetail } from '@/api/saleManage/contact';
|
|
|
import parentList from '@/views/saleManage/contact/components/parentList.vue';
|
|
|
import invoiceDialog from './invoiceDialog.vue';
|
|
|
+ import SaleorderDialog from './saleorderDialog.vue';
|
|
|
export default {
|
|
|
mixins: [dictMixins],
|
|
|
- components: { parentList, invoiceDialog, PhotoList },
|
|
|
+ components: {
|
|
|
+ parentList,
|
|
|
+ invoiceDialog,
|
|
|
+ PhotoList,
|
|
|
+ SaleorderDialog,
|
|
|
+ fileMain
|
|
|
+ },
|
|
|
computed: {
|
|
|
...mapGetters(['getDictValue']),
|
|
|
+ salesShow() {
|
|
|
+ if (this.form.associationType == '1') {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ if (this.form.tableList.length > 0) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ if (this.form.associationType == '2' && this.isOrder == false) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ },
|
|
|
bankColumns() {
|
|
|
return [
|
|
|
{
|
|
|
@@ -711,7 +931,7 @@
|
|
|
headerSlot: 'headerPhenomenon',
|
|
|
label: '故障现象',
|
|
|
align: 'center',
|
|
|
- width: 240
|
|
|
+ minWidth: 240
|
|
|
},
|
|
|
{
|
|
|
prop: 'faultReason',
|
|
|
@@ -719,7 +939,7 @@
|
|
|
headerSlot: 'headerFaultReason',
|
|
|
label: '故障原因',
|
|
|
align: 'center',
|
|
|
- width: 340
|
|
|
+ minWidth: 340
|
|
|
},
|
|
|
{
|
|
|
prop: 'maintenanceProcess',
|
|
|
@@ -861,18 +1081,32 @@
|
|
|
form: {
|
|
|
contractInfo: {},
|
|
|
tableList: [],
|
|
|
- contactInfoVOS: []
|
|
|
+ contactInfoVOS: [],
|
|
|
+ faultDetailList: [],
|
|
|
+ associationType: '1'
|
|
|
},
|
|
|
rules: {},
|
|
|
radio: null,
|
|
|
phoneList: [],
|
|
|
- phoneVisible: false
|
|
|
+ phoneVisible: false,
|
|
|
+ associationTypeList: [
|
|
|
+ {
|
|
|
+ value: '1',
|
|
|
+ label: '发货单'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '2',
|
|
|
+ label: '销售订单'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ isOrder: false // 是否为销售订单数据
|
|
|
};
|
|
|
},
|
|
|
created() {},
|
|
|
methods: {
|
|
|
async init(res) {
|
|
|
- this.$set(this.form, 'tableList', res.productDetail);
|
|
|
+ let productDetail = res.productDetail ? res.productDetail : [];
|
|
|
+ this.$set(this.form, 'tableList', productDetail);
|
|
|
this.$set(this.form, 'orderCode', res.orderCode);
|
|
|
this.$set(this.form, 'orderId', res.orderId);
|
|
|
this.$set(this.form, 'contactInfoVOS', res.contactInfoVOS);
|
|
|
@@ -885,6 +1119,14 @@
|
|
|
this.$set(this.form, 'contactAddress', res.contactAddress);
|
|
|
}
|
|
|
this.contactDetail(res.contactId, 'init');
|
|
|
+ this.form.associationType = res.associationType
|
|
|
+ ? String(res.associationType)
|
|
|
+ : '1';
|
|
|
+ let faultDetailList = res.faultDetailList ? res.faultDetailList : [];
|
|
|
+ this.$set(this.form, 'faultDetailList', faultDetailList);
|
|
|
+ if (faultDetailList.length > 0) {
|
|
|
+ this.isOrder = true;
|
|
|
+ }
|
|
|
},
|
|
|
getValue() {
|
|
|
return this.form;
|
|
|
@@ -941,6 +1183,18 @@
|
|
|
this.$set(this.form, 'tableList', []);
|
|
|
}
|
|
|
},
|
|
|
+ //发货单回调
|
|
|
+ invoiceChange(data) {
|
|
|
+ this.$set(this.form, 'orderCode', data.orderCode);
|
|
|
+ this.$set(this.form, 'orderId', data.orderId);
|
|
|
+ let list = JSON.parse(JSON.stringify(data.tableList));
|
|
|
+ // 如果计量数量没有的话默认是 1
|
|
|
+ list.map(
|
|
|
+ (el) =>
|
|
|
+ (el.measureQuantity = el.measureQuantity ? el.measureQuantity : 1)
|
|
|
+ );
|
|
|
+ this.$set(this.form, 'tableList', list);
|
|
|
+ },
|
|
|
//发货单选择
|
|
|
invoiceDialogOpen() {
|
|
|
if (!this.form?.contractInfo?.id) {
|
|
|
@@ -959,18 +1213,6 @@
|
|
|
totalCountChange(data, name) {
|
|
|
data[name] = data[name].replace(/[^\d]/g, '').replace(/^0+/, '') || '1';
|
|
|
},
|
|
|
- //发货单回调
|
|
|
- invoiceChange(data) {
|
|
|
- this.$set(this.form, 'orderCode', data.orderCode);
|
|
|
- this.$set(this.form, 'orderId', data.orderId);
|
|
|
- let list = JSON.parse(JSON.stringify(data.tableList));
|
|
|
- // 如果计量数量没有的话默认是 1
|
|
|
- list.map(
|
|
|
- (el) =>
|
|
|
- (el.measureQuantity = el.measureQuantity ? el.measureQuantity : 1)
|
|
|
- );
|
|
|
- this.$set(this.form, 'tableList', list);
|
|
|
- },
|
|
|
addBank() {
|
|
|
this.form.contactInfoVOS.push({
|
|
|
contactName: '',
|
|
|
@@ -1040,6 +1282,60 @@
|
|
|
orderId: ''
|
|
|
};
|
|
|
this.$refs.form.resetFields();
|
|
|
+ },
|
|
|
+
|
|
|
+ // 销售订单选择
|
|
|
+ saleorderDialogOpen() {
|
|
|
+ if (!this.form?.contractInfo?.id) {
|
|
|
+ this.$message.warning('请先选择客户!');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this.type != 'view') {
|
|
|
+ let obj = {
|
|
|
+ tableList: this.form.tableList || [],
|
|
|
+ orderCode: this.form.orderCode || '',
|
|
|
+ orderId: this.form.orderId || ''
|
|
|
+ };
|
|
|
+ this.$refs.saleorderDialogRef.open(this.form.contractInfo.id, obj);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 销售订单回调
|
|
|
+ saleorderChange(data) {
|
|
|
+ this.$set(this.form, 'orderCode', data.orderCode);
|
|
|
+ this.$set(this.form, 'orderId', data.orderId);
|
|
|
+ let list = JSON.parse(JSON.stringify(data.tableList));
|
|
|
+ // 如果计量数量没有的话默认是 1
|
|
|
+ list.map(
|
|
|
+ (el) =>
|
|
|
+ (el.measureQuantity = el.measureQuantity ? el.measureQuantity : 1)
|
|
|
+ );
|
|
|
+ this.$set(this.form, 'tableList', list);
|
|
|
+ if (list.length == 0) {
|
|
|
+ this.isOrder = true;
|
|
|
+ } else {
|
|
|
+ this.$set(this.form, 'faultDetailList', []);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 新增故障 一级( 没有售后对象 )
|
|
|
+ addFaults() {
|
|
|
+ this.form.faultDetailList.push({
|
|
|
+ maintenanceProcess: '',
|
|
|
+ type: '',
|
|
|
+ faultPhenomenon: ''
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ faultDel(index) {
|
|
|
+ this.form.faultDetailList.splice(index, 1);
|
|
|
+ },
|
|
|
+ selectType(e) {
|
|
|
+ this.$set(this.form, 'tableList', []);
|
|
|
+ this.$set(this.form, 'faultDetailList', []);
|
|
|
+ this.$set(this.form, 'orderCode', '');
|
|
|
+ this.$set(this.form, 'orderId', '');
|
|
|
+ if (e == '1') {
|
|
|
+ this.isOrder = false;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
};
|