|
@@ -4,7 +4,7 @@
|
|
<block slot="content">建筑垃圾清运处理</block>
|
|
<block slot="content">建筑垃圾清运处理</block>
|
|
</cu-custom>
|
|
</cu-custom>
|
|
|
|
|
|
- <!-- First Section: 巡视工单 to 联系方式 -->
|
|
|
|
|
|
+ <!-- First Section: 巡查工单 to 联系方式 -->
|
|
<view class="form-section">
|
|
<view class="form-section">
|
|
<!-- 遮罩层 -->
|
|
<!-- 遮罩层 -->
|
|
<view v-if="isProcessing" class="mask"></view>
|
|
<view v-if="isProcessing" class="mask"></view>
|
|
@@ -43,14 +43,14 @@
|
|
<u-form-item
|
|
<u-form-item
|
|
v-for="(item, index_workOver) in inputForm.workOverNoList"
|
|
v-for="(item, index_workOver) in inputForm.workOverNoList"
|
|
:key="index_workOver"
|
|
:key="index_workOver"
|
|
- :label="`巡视工单 ${index_workOver + 1}`"
|
|
|
|
|
|
+ :label="`巡查工单 ${index_workOver + 1}`"
|
|
:required="true"
|
|
:required="true"
|
|
:prop="'workOverNoList[' + index_workOver + '].no'"
|
|
:prop="'workOverNoList[' + index_workOver + '].no'"
|
|
>
|
|
>
|
|
<div style="width: 100%" @click="showWorkOver(index_workOver)">
|
|
<div style="width: 100%" @click="showWorkOver(index_workOver)">
|
|
<u--input v-model="inputForm.workOverNoList[index_workOver].no" readonly
|
|
<u--input v-model="inputForm.workOverNoList[index_workOver].no" readonly
|
|
style="pointer-events: none;"
|
|
style="pointer-events: none;"
|
|
- placeholder="请选择巡视工单编号" @focus="showWorkOver(index_workOver)" clearable></u--input>
|
|
|
|
|
|
+ placeholder="请选择巡查工单编号" @focus="showWorkOver(index_workOver)" clearable></u--input>
|
|
|
|
|
|
<view >
|
|
<view >
|
|
<text class="u-demo-block__title">{{inputForm.workOverNoList[index_workOver].no}}清理前照片</text>
|
|
<text class="u-demo-block__title">{{inputForm.workOverNoList[index_workOver].no}}清理前照片</text>
|
|
@@ -74,7 +74,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<u-form-item label="" >
|
|
<u-form-item label="" >
|
|
- <u-button style="width: 100%" type="primary" @click="addRow()" plain>新增巡视工单</u-button>
|
|
|
|
|
|
+ <u-button style="width: 100%" type="primary" @click="addRow()" plain>新增巡查工单</u-button>
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
|
|
|
|
|
|
|
@@ -115,14 +115,14 @@
|
|
<u-form-item
|
|
<u-form-item
|
|
v-for="(item, index_workOver) in inputForm.workOverNoList"
|
|
v-for="(item, index_workOver) in inputForm.workOverNoList"
|
|
:key="index_workOver"
|
|
:key="index_workOver"
|
|
- :label="`巡视工单 ${index_workOver + 1}`"
|
|
|
|
|
|
+ :label="`巡查工单 ${index_workOver + 1}`"
|
|
:required="true"
|
|
:required="true"
|
|
:prop="'workOverNoList[' + index_workOver + '].no'"
|
|
:prop="'workOverNoList[' + index_workOver + '].no'"
|
|
>
|
|
>
|
|
<u--input
|
|
<u--input
|
|
v-model="inputForm.workOverNoList[index_workOver].no"
|
|
v-model="inputForm.workOverNoList[index_workOver].no"
|
|
:disabled="true"
|
|
:disabled="true"
|
|
- placeholder="请选择巡视工单编号">
|
|
|
|
|
|
+ placeholder="请选择巡查工单编号">
|
|
</u--input>
|
|
</u--input>
|
|
<u-button type="primary" style="width: 20%" text="处理" @click="disposeWorkOver(inputForm.workOverNoList[index_workOver].id)" v-if="!weighFlag"></u-button>
|
|
<u-button type="primary" style="width: 20%" text="处理" @click="disposeWorkOver(inputForm.workOverNoList[index_workOver].id)" v-if="!weighFlag"></u-button>
|
|
</u-form-item>
|
|
</u-form-item>
|
|
@@ -210,6 +210,7 @@
|
|
|
|
|
|
<u-form-item label="重量(t)" prop="weight" :required="true">
|
|
<u-form-item label="重量(t)" prop="weight" :required="true">
|
|
<u--input
|
|
<u--input
|
|
|
|
+ @change="weightChange"
|
|
v-model="inputForm.weight"
|
|
v-model="inputForm.weight"
|
|
@input="handleInput('weight', $event)"
|
|
@input="handleInput('weight', $event)"
|
|
placeholder="重量"
|
|
placeholder="重量"
|
|
@@ -219,6 +220,7 @@
|
|
|
|
|
|
<u-form-item label="运输里程(km)" prop="transportMileage" :required="true">
|
|
<u-form-item label="运输里程(km)" prop="transportMileage" :required="true">
|
|
<u--input
|
|
<u--input
|
|
|
|
+ :disabled="true"
|
|
v-model="inputForm.transportMileage"
|
|
v-model="inputForm.transportMileage"
|
|
@input="handleInput('transportMileage', $event)"
|
|
@input="handleInput('transportMileage', $event)"
|
|
placeholder="运输里程"
|
|
placeholder="运输里程"
|
|
@@ -228,6 +230,7 @@
|
|
|
|
|
|
<u-form-item label="补贴(元)" prop="subsidy" :required="true">
|
|
<u-form-item label="补贴(元)" prop="subsidy" :required="true">
|
|
<u--input
|
|
<u--input
|
|
|
|
+ :disabled="true"
|
|
v-model="inputForm.subsidy"
|
|
v-model="inputForm.subsidy"
|
|
@input="handleInput('subsidy', $event)"
|
|
@input="handleInput('subsidy', $event)"
|
|
placeholder="补贴"
|
|
placeholder="补贴"
|
|
@@ -301,6 +304,7 @@
|
|
weight: '',
|
|
weight: '',
|
|
transportMileage: '',
|
|
transportMileage: '',
|
|
subsidy: '',
|
|
subsidy: '',
|
|
|
|
+ subsidyUnitPrice: '',
|
|
},
|
|
},
|
|
rules: {
|
|
rules: {
|
|
'processingUnit': [
|
|
'processingUnit': [
|
|
@@ -378,8 +382,12 @@
|
|
},
|
|
},
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ weightChange(weight) {
|
|
|
|
+ const product = parseFloat(weight) * parseFloat(this.inputForm.transportMileage) * parseFloat(this.inputForm.subsidyUnitPrice);
|
|
|
|
+ this.inputForm.subsidy = Math.round(product * 100) / 100;
|
|
|
|
+
|
|
|
|
+ },
|
|
handleMouseDown(event) {
|
|
handleMouseDown(event) {
|
|
- console.log('21312312')
|
|
|
|
event.preventDefault(); // 防止选择文本
|
|
event.preventDefault(); // 防止选择文本
|
|
this.$refs.input.focus(); // 使 input 获得焦点
|
|
this.$refs.input.focus(); // 使 input 获得焦点
|
|
},
|
|
},
|
|
@@ -425,6 +433,8 @@
|
|
} else if (taskName === '过磅专员处理') {
|
|
} else if (taskName === '过磅专员处理') {
|
|
this.nodeFlag = true;
|
|
this.nodeFlag = true;
|
|
this.weighFlag = true;
|
|
this.weighFlag = true;
|
|
|
|
+ //在此处获取发起地区的距离以及计算方式
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -588,7 +598,7 @@
|
|
// 点击删除按钮时,从表格中移除指定行
|
|
// 点击删除按钮时,从表格中移除指定行
|
|
this.inputForm.programIds.splice(index, 1);
|
|
this.inputForm.programIds.splice(index, 1);
|
|
this.inputForm.workOverNoList.splice(index, 1);
|
|
this.inputForm.workOverNoList.splice(index, 1);
|
|
- //重新获取巡视工单信息
|
|
|
|
|
|
+ //重新获取巡查工单信息
|
|
this.insertRefreshPhoto()
|
|
this.insertRefreshPhoto()
|
|
},
|
|
},
|
|
|
|
|
|
@@ -693,7 +703,7 @@
|
|
this.inputForm.programId = programIdString
|
|
this.inputForm.programId = programIdString
|
|
}
|
|
}
|
|
if(this.inputForm.programIds.length == 0){
|
|
if(this.inputForm.programIds.length == 0){
|
|
- errors.push("请选择巡视工单")
|
|
|
|
|
|
+ errors.push("请选择巡查工单")
|
|
}
|
|
}
|
|
if(this.weighFlag){
|
|
if(this.weighFlag){
|
|
if(!this.inputForm.weight){
|
|
if(!this.inputForm.weight){
|