|
@@ -13,7 +13,7 @@
|
|
|
</u-form-item>
|
|
|
|
|
|
<u-form-item label="所属单位" prop="processingUnitName" :required="true" v-if="disFlag">
|
|
|
- <u--input v-model="inputForm.processingUnitName" :disabled="true" placeholder="处理单位" clearable></u--input>
|
|
|
+ <u--input v-model="inputForm.processingUnitName" :disabled="true" placeholder="所属单位" clearable></u--input>
|
|
|
</u-form-item>
|
|
|
|
|
|
<u-form-item label="清运专员" prop="clearUserName">
|
|
@@ -24,7 +24,7 @@
|
|
|
<u--input v-model="inputForm.clearUserMobile" :disabled="true" placeholder="联系方式" clearable></u--input>
|
|
|
</u-form-item>
|
|
|
|
|
|
- <u-form-item label="处理单位" prop="disposeType" :required="true">
|
|
|
+ <u-form-item label="处理方式" prop="disposeType" :required="true">
|
|
|
<jp-picker v-model="inputForm.disposeType" rangeKey="label" rangeValue="value" :range="[
|
|
|
{ label: '转运调剂处理', value: '1' },
|
|
|
{ label: '自行处理', value: '2' },
|
|
@@ -36,18 +36,21 @@
|
|
|
</u-form-item>
|
|
|
|
|
|
|
|
|
- <u-row :key="index_workOver" v-for="(item,index_workOver) in this.inputForm.workOverNoList">
|
|
|
+ <template>
|
|
|
+ <div>
|
|
|
+ <u-form-item
|
|
|
+ v-for="(item, index_workOver) in inputForm.workOverNoList"
|
|
|
+ :key="index_workOver"
|
|
|
+ :label="`巡视工单 ${index_workOver + 1}`"
|
|
|
+ :required="true"
|
|
|
+ :prop="'workOverNoList[' + index_workOver + '].no'"
|
|
|
+ >
|
|
|
+ <u--input v-model="inputForm.workOverNoList[index_workOver].no" placeholder="请选择巡视工单编号" @focus="showWorkOver(index_workOver)" clearable></u--input>
|
|
|
|
|
|
- <u-form-item :label="`巡视工单 ${index_workOver + 1}`" :required="true" :prop="'workOverNoList[' + index_workOver + '].no'"
|
|
|
- :rules="[
|
|
|
- ]">
|
|
|
- <u--input v-model="inputForm.workOverNoList[index_workOver].no" placeholder="请选择巡视工单编号" @focus="showWorkOver(index_workOver)" clearable></u--input>
|
|
|
- </u-form-item>
|
|
|
-
|
|
|
- <u-form-item label="" >
|
|
|
- <u-button type="error" text="删除" @click="removeRow(index_workOver)"></u-button>
|
|
|
- </u-form-item>
|
|
|
- </u-row>
|
|
|
+ <u-button type="error" style="width: 20%" text="删除" @click="removeRow(index_workOver)"></u-button>
|
|
|
+ </u-form-item>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
|
|
|
<u-form-item label="" >
|
|
|
<u-button style="width: 100%" type="primary" @click="addRow()" plain>新增基本信息</u-button>
|
|
@@ -55,13 +58,66 @@
|
|
|
|
|
|
|
|
|
</u--form>
|
|
|
+
|
|
|
+ <u--form :model="inputForm" labelWidth="100px" class="u-form" labelPosition="left" :rules="rules" ref="inputForm" v-if="nodeFlag">
|
|
|
+
|
|
|
+ <u-form-item label="清运编号" prop="no">
|
|
|
+ <u--input v-model="inputForm.no" :disabled="true" placeholder="工单编号" clearable></u--input>
|
|
|
+ </u-form-item>
|
|
|
+
|
|
|
+ <u-form-item label="所属单位" prop="processingUnitName" :required="true" v-if="disFlag">
|
|
|
+ <u--input v-model="inputForm.processingUnitName" :disabled="true" placeholder="所属单位" clearable></u--input>
|
|
|
+ </u-form-item>
|
|
|
+
|
|
|
+ <u-form-item label="清运专员" prop="clearUserName">
|
|
|
+ <u--input v-model="inputForm.clearUserName" :disabled="true" placeholder="清运专员" clearable></u--input>
|
|
|
+ </u-form-item>
|
|
|
+
|
|
|
+ <u-form-item label="联系方式" prop="clearUserMobile">
|
|
|
+ <u--input v-model="inputForm.clearUserMobile" :disabled="true" placeholder="联系方式" clearable></u--input>
|
|
|
+ </u-form-item>
|
|
|
+
|
|
|
+ <u-form-item label="处理方式" prop="disposeType" :required="true" >
|
|
|
+ <jp-picker v-model="inputForm.disposeType" rangeKey="label" :disabled="true" rangeValue="value" :range="[
|
|
|
+ { label: '转运调剂处理', value: '1' },
|
|
|
+ { label: '自行处理', value: '2' },
|
|
|
+ ]" ></jp-picker>
|
|
|
+ </u-form-item>
|
|
|
+
|
|
|
+ <u-form-item label="垃圾站点" prop="rubbishStation">
|
|
|
+ <u--input v-model="inputForm.rubbishStation" :disabled="true" placeholder="垃圾站点" clearable></u--input>
|
|
|
+ </u-form-item>
|
|
|
+
|
|
|
+
|
|
|
+ <template>
|
|
|
+ <div>
|
|
|
+ <u-form-item
|
|
|
+ v-for="(item, index_workOver) in inputForm.workOverNoList"
|
|
|
+ :key="index_workOver"
|
|
|
+ :label="`巡视工单 ${index_workOver + 1}`"
|
|
|
+ :required="true"
|
|
|
+ :prop="'workOverNoList[' + index_workOver + '].no'"
|
|
|
+ >
|
|
|
+ <u--input
|
|
|
+ v-model="inputForm.workOverNoList[index_workOver].no"
|
|
|
+ :disabled="true"
|
|
|
+ placeholder="请选择巡视工单编号">
|
|
|
+ </u--input>
|
|
|
+ <u-button type="primary" style="width: 20%" text="处理" @click="disposeWorkOver(inputForm.workOverNoList[index_workOver].id)"></u-button>
|
|
|
+ </u-form-item>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+
|
|
|
+ </u--form>
|
|
|
</view>
|
|
|
|
|
|
<!-- Second Section: 上传图片 -->
|
|
|
<view class="form-section">
|
|
|
- <text class="u-demo-block__title">现场照片</text>
|
|
|
+ <text class="u-demo-block__title">清理前照片</text>
|
|
|
<view class="u-page__upload-item">
|
|
|
<u-upload
|
|
|
+ :disabled="true"
|
|
|
:fileList="fileList1"
|
|
|
@afterRead="afterRead"
|
|
|
@delete="deletePic"
|
|
@@ -72,6 +128,38 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
+ <!-- Second Section: 上传图片 -->
|
|
|
+ <view class="form-section">
|
|
|
+ <text class="u-demo-block__title">清理中照片</text>
|
|
|
+ <view class="u-page__upload-item">
|
|
|
+ <u-upload
|
|
|
+ :disabled="true"
|
|
|
+ :fileList="fileList2"
|
|
|
+ @afterRead="afterRead"
|
|
|
+ @delete="deletePic"
|
|
|
+ name="2"
|
|
|
+ multiple
|
|
|
+ :maxCount="10"
|
|
|
+ ></u-upload>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- Second Section: 上传图片 -->
|
|
|
+ <view class="form-section">
|
|
|
+ <text class="u-demo-block__title">清理后照片</text>
|
|
|
+ <view class="u-page__upload-item">
|
|
|
+ <u-upload
|
|
|
+ :disabled="true"
|
|
|
+ :fileList="fileList3"
|
|
|
+ @afterRead="afterRead"
|
|
|
+ @delete="deletePic"
|
|
|
+ name="3"
|
|
|
+ multiple
|
|
|
+ :maxCount="10"
|
|
|
+ ></u-upload>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
<!-- Third Section: 备注 -->
|
|
|
<view class="form-section">
|
|
|
<u--form :model="inputForm" labelWidth="100px" class="u-form" labelPosition="left" :rules="rules" ref="inputForm" v-if="!nodeFlag">
|
|
@@ -89,7 +177,7 @@
|
|
|
</view>-->
|
|
|
</u--form>
|
|
|
</view>
|
|
|
- <WorkOverChoose ref="workOverChoose" @input="selectProjectChange" title="报告项目选择"/>
|
|
|
+ <WorkOverChoose ref="workOverChoose" @input="selectWorkOverChange" title="报告项目选择"/>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -97,8 +185,10 @@
|
|
|
import disposeRubbishService from '@/api/garbageClearance/disposeRubbishService'
|
|
|
import overService from '@/api/garbageClearance/overService'
|
|
|
import WorkOverChoose from './WorkOverChoose'
|
|
|
+ import taskService from "@/api/flowable/taskService"
|
|
|
import {mapState, mapMutations, mapActions} from 'vuex'
|
|
|
import * as $auth from "../../common/auth";
|
|
|
+ import { EventBus } from '@/store/eventBus.js';
|
|
|
export default {
|
|
|
components: {
|
|
|
WorkOverChoose,
|
|
@@ -112,8 +202,12 @@
|
|
|
disFlag: true, // 启用动态获取处理单位则设置为false
|
|
|
processingUnits: [],
|
|
|
fileList1: [],
|
|
|
+ fileList2: [],
|
|
|
+ fileList3: [],
|
|
|
nodeFlag: false,
|
|
|
inputForm: {
|
|
|
+ programId: '',
|
|
|
+ programIds: [],
|
|
|
no: '',
|
|
|
processingUnit: '',
|
|
|
processingUnitName: '',
|
|
@@ -121,6 +215,7 @@
|
|
|
clearUserName: '',
|
|
|
clearUserMobile: '',
|
|
|
remarks: '',
|
|
|
+ status: '',
|
|
|
workOverNoList: [],
|
|
|
disposeType: '',
|
|
|
rubbishStation: '',
|
|
@@ -138,69 +233,78 @@
|
|
|
},
|
|
|
// 页面加载时执行
|
|
|
async created() {
|
|
|
+ EventBus.$on('refreshPhoto', this.refreshPhoto);
|
|
|
|
|
|
- let data = await disposeRubbishService.getMaxNo();
|
|
|
- if (data) {
|
|
|
- let newNo = parseInt(data, 10) + 1;
|
|
|
- this.inputForm.no = 'XJ-J' + newNo;
|
|
|
- } else {
|
|
|
- // 获取当前年份
|
|
|
- let nowY = new Date().getFullYear();
|
|
|
- this.inputForm.no = 'XJ-J' + nowY + '0001';
|
|
|
- }
|
|
|
-
|
|
|
- // 如果要使用动态获取处理单位则设置为true
|
|
|
- if (false) {
|
|
|
- let units = await overService.getProcessingUnit();
|
|
|
- let childs = units[0].children;
|
|
|
-
|
|
|
- if (childs) {
|
|
|
- this.processingUnits = []; // 初始化数组
|
|
|
-
|
|
|
- for (let i = 0; i < childs.length; i++) {
|
|
|
- this.processingUnits.push({
|
|
|
- label: childs[i].name,
|
|
|
- value: childs[i].id
|
|
|
- });
|
|
|
- }
|
|
|
+ if(!this.nodeFlag){
|
|
|
+ let data = await disposeRubbishService.getMaxNo();
|
|
|
+ if (data) {
|
|
|
+ let newNo = parseInt(data, 10) + 1;
|
|
|
+ this.inputForm.no = newNo;
|
|
|
+ } else {
|
|
|
+ // 获取当前年份
|
|
|
+ let nowY = new Date().getFullYear();
|
|
|
+ this.inputForm.no = nowY + '0001';
|
|
|
}
|
|
|
+ //获取垃圾站点信息
|
|
|
+ let rubbishStation = await disposeRubbishService.getRubbishStation();
|
|
|
+ this.inputForm.rubbishStation = rubbishStation;
|
|
|
+
|
|
|
+ this.inputForm.processingUnit = this.userInfo.officeDTO.id
|
|
|
+ this.inputForm.processingUnitName = this.userInfo.officeDTO.name
|
|
|
+ // 不动态获取 根据当前登录人去查
|
|
|
+ await overService.getUserInfoByOffId(this.userInfo.officeDTO.id)
|
|
|
+ .then(data => {
|
|
|
+ this.inputForm.clearUserId = data.id
|
|
|
+ this.inputForm.clearUserName = data.name
|
|
|
+ this.inputForm.clearUserMobile = data.mobile
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ throw e;
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
- this.inputForm.processingUnit = this.userInfo.officeDTO.id
|
|
|
- this.inputForm.processingUnitName = this.userInfo.officeDTO.name
|
|
|
- // 不动态获取 根据当前登录人去查
|
|
|
- await overService.getUserInfoByOffId(this.userInfo.officeDTO.id)
|
|
|
- .then(data => {
|
|
|
- this.inputForm.clearUserId = data.id
|
|
|
- this.inputForm.clearUserName = data.name
|
|
|
- this.inputForm.clearUserMobile = data.mobile
|
|
|
- })
|
|
|
- .catch(e => {
|
|
|
- throw e;
|
|
|
- });
|
|
|
|
|
|
|
|
|
},
|
|
|
props: {
|
|
|
+ businessId: {
|
|
|
+ type: String,
|
|
|
+ default: ''
|
|
|
+ },
|
|
|
+ formReadOnly: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
+ },
|
|
|
status: {
|
|
|
type: String,
|
|
|
default: ''
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
+ 'businessId': {
|
|
|
+ handler (newVal) {
|
|
|
+ if (this.businessId) {
|
|
|
+ this.init(this.businessId)
|
|
|
+ } else {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ // this.$refs.inputForm.reset()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ immediate: true,
|
|
|
+ deep: false
|
|
|
+ },
|
|
|
},
|
|
|
methods: {
|
|
|
- init (id) {
|
|
|
+ async init (id) {
|
|
|
this.nodeFlag = true
|
|
|
this.inputForm.id = id
|
|
|
- /*if (id) {
|
|
|
- financeInvoiceService.queryById(id).then((data) => {
|
|
|
-
|
|
|
- if (this.status === 'testSee') {
|
|
|
+ if (id) {
|
|
|
+ await disposeRubbishService.queryById(id).then((data) => {
|
|
|
+ /*if (this.status === 'testSee') {
|
|
|
this.nodeFlag = true
|
|
|
- this.testFlag = true
|
|
|
} else {
|
|
|
- this.commonApi.getTaskNameByProcInsId(data.procInsId).then((data) => {
|
|
|
+ this.taskService.getTaskNameByProcInsId(data.procInsId).then((data) => {
|
|
|
if (this.isNotEmpty(data)) {
|
|
|
if (data === '发起人重新申请' || this.isEmpty(data)) {
|
|
|
this.nodeFlag = false
|
|
@@ -214,55 +318,112 @@
|
|
|
console.log('没有')
|
|
|
}
|
|
|
})
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
|
|
|
this.inputForm = this.recover(this.inputForm, data)
|
|
|
|
|
|
- if (this.inputForm.workAttachmentDtoList) {
|
|
|
- this.inputForm.workAttachmentDtoList.forEach( (item,index) => {
|
|
|
- this.$set(this.showFileList, index, true);
|
|
|
- })
|
|
|
+ if (data.fileList1) {
|
|
|
+ this.fileList1 = []
|
|
|
+ data.fileList1.forEach(
|
|
|
+ (item) => {
|
|
|
+ const newItem = {
|
|
|
+ attachmentName: item.name,
|
|
|
+ fileSize: item.size,
|
|
|
+ url: item.temporaryUrl,
|
|
|
+ type: item.type, // 如果不需要,可以不写
|
|
|
+ };
|
|
|
+ this.fileList1.push(newItem);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
+ if (data.fileList2) {
|
|
|
+ this.fileList2 = []
|
|
|
+ data.fileList2.forEach(
|
|
|
+ (item) => {
|
|
|
+ const newItem = {
|
|
|
+ attachmentName: item.name,
|
|
|
+ fileSize: item.size,
|
|
|
+ url: item.temporaryUrl,
|
|
|
+ type: item.type, // 如果不需要,可以不写
|
|
|
+ };
|
|
|
+ this.fileList2.push(newItem);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
+ if (data.fileList3) {
|
|
|
+ this.fileList3 = []
|
|
|
+ data.fileList3.forEach(
|
|
|
+ (item) => {
|
|
|
+ const newItem = {
|
|
|
+ attachmentName: item.name,
|
|
|
+ fileSize: item.size,
|
|
|
+ url: item.temporaryUrl,
|
|
|
+ type: item.type, // 如果不需要,可以不写
|
|
|
+ };
|
|
|
+ this.fileList3.push(newItem);
|
|
|
+ }
|
|
|
+ );
|
|
|
}
|
|
|
-
|
|
|
- let i = this.inputForm.financeInvoiceBaseDTOList.length
|
|
|
- let sun = 0
|
|
|
- for (let j = 0; j < i; j++) {
|
|
|
- sun = (100*sun + 100* this.inputForm.financeInvoiceBaseDTOList[j].account)/100
|
|
|
- }
|
|
|
-
|
|
|
- this.inputForm.accountTotal = sun
|
|
|
- this.inputForm.billingDate = this.formatDate(new Date())
|
|
|
- if ( !this.nodeFlag && this.status !== 'testSee') {
|
|
|
- this.inputForm.financeInvoiceDetailDTOList.push({
|
|
|
- code: '',
|
|
|
- number: '',
|
|
|
- account: sun,
|
|
|
- rate: '',
|
|
|
- amount: '',
|
|
|
- tax: '',
|
|
|
- allAmount: ''
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- if (!this.isEmpty(this.inputForm.billingWorkplaceRealId)) {
|
|
|
- this.bankList = []
|
|
|
- workClientService.queryById(this.inputForm.billingWorkplaceRealId).then((data) => {
|
|
|
- if (this.isNotEmpty(data.cwWorkClientBillingDTOList)) {
|
|
|
- data.cwWorkClientBillingDTOList.forEach(i => {
|
|
|
- i.ourBank = i.accountHolder
|
|
|
- let test = {label: i.ourBank, value: i.id, account: i.account}
|
|
|
- this.bankList.push(test)
|
|
|
- this.$set(this.inputForm, 'openBank', i.id);
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.bankList = []
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
})
|
|
|
- }*/
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async selectWorkOverChange(rows, index) {
|
|
|
+ if (rows.length > 0) {
|
|
|
+ rows.forEach((item, rowIndex) => {
|
|
|
+ const exists = this.inputForm.programIds.includes(item.id);
|
|
|
+ if(!exists){
|
|
|
+ this.inputForm.programIds.push(item.id);
|
|
|
+ if (rowIndex === 0) {
|
|
|
+ let r = this.inputForm.workOverNoList[index];
|
|
|
+ if (!r) {
|
|
|
+ r = {};
|
|
|
+ }
|
|
|
+ r.no = item.no;
|
|
|
+ this.$set(this.inputForm.workOverNoList, index, r);
|
|
|
+ } else {
|
|
|
+ let r = {
|
|
|
+ no: item.no
|
|
|
+ }
|
|
|
+ this.inputForm.workOverNoList.push(r);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ const exists = this.inputForm.programIds.includes(item.id);
|
|
|
+ if(!exists){
|
|
|
+ let r = {
|
|
|
+ no: item.no
|
|
|
+ }
|
|
|
+ if (!this.inputForm.detailInfoWorkOvers) {
|
|
|
+ this.$set(this.inputForm, 'detailInfoWorkOvers', []);
|
|
|
+ }
|
|
|
+ this.$set(this.inputForm.detailInfoWorkOvers, index, r);
|
|
|
+ this.inputForm.programIds.push(rows.id);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //根据关联的询单id 查询处理前中后的信息进行填充照片
|
|
|
+ const programIdString = this.inputForm.programIds.join(','); // 用逗号分隔
|
|
|
+ await overService.getPhotoListByAttachmentAndFlag(programIdString,'before').then(data => {
|
|
|
+ this.fileList1 = []
|
|
|
+ data.forEach(
|
|
|
+ (item) => {
|
|
|
+ const newItem = {
|
|
|
+ attachmentName: item.name,
|
|
|
+ fileSize: item.size,
|
|
|
+ url: item.temporaryUrl,
|
|
|
+ type: item.type, // 如果不需要,可以不写
|
|
|
+ };
|
|
|
+ this.fileList1.push(newItem);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }).catch(() => {
|
|
|
+ reject('数据错误');
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
+
|
|
|
addRow() {
|
|
|
this.inputForm.workOverNoList.push({ recipientAgent: this.userInfo.name,
|
|
|
recipientAgentId: this.userInfo.id, recipientOffice: this.userInfo.officeDTO.name });
|
|
@@ -274,7 +435,69 @@
|
|
|
|
|
|
},
|
|
|
|
|
|
- removeRow(type,index) {
|
|
|
+ // 显示 项目选择器
|
|
|
+ disposeWorkOver(id) {
|
|
|
+ if(this.inputForm.status === '2'){
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/edt/PatrolWorkOrderForm?id='+id
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.toEdit(this.inputForm)
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ //刷信photo获取对应的id
|
|
|
+ refreshPhoto() {
|
|
|
+ console.log('刷信photo获取对应的id',this.inputForm.id)
|
|
|
+ disposeRubbishService.queryById(this.inputForm.id).then((data) => {
|
|
|
+
|
|
|
+ if (data.fileList1) {
|
|
|
+ this.fileList1 = []
|
|
|
+ data.fileList1.forEach(
|
|
|
+ (item) => {
|
|
|
+ const newItem = {
|
|
|
+ attachmentName: item.name,
|
|
|
+ fileSize: item.size,
|
|
|
+ url: item.temporaryUrl,
|
|
|
+ type: item.type, // 如果不需要,可以不写
|
|
|
+ };
|
|
|
+ this.fileList1.push(newItem);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
+ if (data.fileList2) {
|
|
|
+ this.fileList2 = []
|
|
|
+ data.fileList2.forEach(
|
|
|
+ (item) => {
|
|
|
+ const newItem = {
|
|
|
+ attachmentName: item.name,
|
|
|
+ fileSize: item.size,
|
|
|
+ url: item.temporaryUrl,
|
|
|
+ type: item.type, // 如果不需要,可以不写
|
|
|
+ };
|
|
|
+ this.fileList2.push(newItem);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
+ if (data.fileList3) {
|
|
|
+ this.fileList3 = []
|
|
|
+ data.fileList3.forEach(
|
|
|
+ (item) => {
|
|
|
+ const newItem = {
|
|
|
+ attachmentName: item.name,
|
|
|
+ fileSize: item.size,
|
|
|
+ url: item.temporaryUrl,
|
|
|
+ type: item.type, // 如果不需要,可以不写
|
|
|
+ };
|
|
|
+ this.fileList3.push(newItem);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ removeRow(index) {
|
|
|
+ console.log('index',index)
|
|
|
// 点击删除按钮时,从表格中移除指定行
|
|
|
this.inputForm.workOverNoList.splice(index, 1);
|
|
|
},
|
|
@@ -342,16 +565,20 @@
|
|
|
|
|
|
let errors = [];
|
|
|
|
|
|
- if (this.fileList1 && this.fileList1.length > 0) {
|
|
|
- // 将 fileList1 中的每个文件对象的属性名调整为新的属性名
|
|
|
- this.inputForm.fileList1 = this.fileList1.map(file => {
|
|
|
- return {
|
|
|
- attachmentName: file.name,
|
|
|
- fileSize: file.size,
|
|
|
- url: file.url,
|
|
|
- type: file.type, // 如果不需要,可以不写
|
|
|
- };
|
|
|
- });
|
|
|
+ if(!this.inputForm.disposeType){
|
|
|
+ errors.push("请选择处理方式")
|
|
|
+ }
|
|
|
+ if(this.inputForm.programId && !this.inputForm.programIds){
|
|
|
+ this.inputForm.programIds = []
|
|
|
+ let fruitsArray = this.inputForm.programId.split(',');
|
|
|
+ this.inputForm.programIds = fruitsArray
|
|
|
+ }
|
|
|
+ if(!this.inputForm.programId && this.inputForm.programIds){
|
|
|
+ const programIdString = this.inputForm.programIds.join(','); // 用逗号分隔
|
|
|
+ this.inputForm.programId = programIdString
|
|
|
+ }
|
|
|
+ if(this.inputForm.programIds.length == 0){
|
|
|
+ errors.push("请选择巡视工单")
|
|
|
}
|
|
|
|
|
|
if (errors.length > 0) {
|
|
@@ -368,9 +595,9 @@
|
|
|
// 所有验证通过,执行保存操作
|
|
|
this.$refs.inputForm.validate().then(() => {
|
|
|
uni.showLoading();
|
|
|
-
|
|
|
- overService.save(this.inputForm).then(data => {
|
|
|
-
|
|
|
+ this.inputForm.status = '2'
|
|
|
+ disposeRubbishService.save(this.inputForm).then(data => {
|
|
|
+ callback(data.businessTable, data.businessId,this.inputForm.disposeType);
|
|
|
uni.showToast({title:"提交成功", icon:"success"});
|
|
|
// 返回上一页
|
|
|
uni.navigateBack({
|