|
@@ -12,7 +12,7 @@
|
|
|
:before-close="cancel"
|
|
:before-close="cancel"
|
|
|
>
|
|
>
|
|
|
<el-form
|
|
<el-form
|
|
|
- v-if="dialogType === 'view'"
|
|
|
|
|
|
|
+ v-if="dialogType === 'view' || dialogType === 'accept'"
|
|
|
ref="form"
|
|
ref="form"
|
|
|
:rules="rules"
|
|
:rules="rules"
|
|
|
:model="form"
|
|
:model="form"
|
|
@@ -425,8 +425,21 @@
|
|
|
</template>
|
|
</template>
|
|
|
</ele-pro-table>
|
|
</ele-pro-table>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
+ <div v-if="dialogType == 'accept' || form.status == 4">
|
|
|
|
|
+ <el-form :model="acceptForm" :rules="rules" ref="acceptForm">
|
|
|
|
|
+ <el-form-item label="验收说明" prop="checkRemark">
|
|
|
|
|
+ <el-input :disabled="form.status == 4" type="textarea" v-model="acceptForm.checkRemark" placeholder="请输入验收说明"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ </div>
|
|
|
<div slot="footer">
|
|
<div slot="footer">
|
|
|
- <el-button type="primary" @click="handleSave" v-if="dialogType !== 'view'"
|
|
|
|
|
|
|
+ <el-button type="primary" @click="handleAccept(4)" v-if="dialogType == 'accept'"
|
|
|
|
|
+ >验收</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button type="danger" @click="handleAccept(1)" v-if="dialogType == 'accept'"
|
|
|
|
|
+ >驳回</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button type="primary" @click="handleSave" v-if="dialogType !== 'view' && dialogType !== 'accept'"
|
|
|
>保存</el-button
|
|
>保存</el-button
|
|
|
>
|
|
>
|
|
|
<el-button @click="cancel">返回</el-button>
|
|
<el-button @click="cancel">返回</el-button>
|
|
@@ -438,7 +451,8 @@
|
|
|
<script>
|
|
<script>
|
|
|
import {
|
|
import {
|
|
|
logisticlistcostGetByIdAPI,
|
|
logisticlistcostGetByIdAPI,
|
|
|
- logistictraklistnoteUpdateAPI
|
|
|
|
|
|
|
+ logistictraklistnoteUpdateAPI,
|
|
|
|
|
+ logistictraklistnoteUpdateStatusAPI
|
|
|
} from '@/api/transportManager/shipManage/taskWork';
|
|
} from '@/api/transportManager/shipManage/taskWork';
|
|
|
import { deepClone } from '@/utils';
|
|
import { deepClone } from '@/utils';
|
|
|
import { mapGetters } from 'vuex';
|
|
import { mapGetters } from 'vuex';
|
|
@@ -487,9 +501,12 @@ export default {
|
|
|
endPlace: '',
|
|
endPlace: '',
|
|
|
realStartTime: '',
|
|
realStartTime: '',
|
|
|
realEndTime: '',
|
|
realEndTime: '',
|
|
|
- remark: ''
|
|
|
|
|
|
|
+ remark: '',
|
|
|
},
|
|
},
|
|
|
dialogType: '',
|
|
dialogType: '',
|
|
|
|
|
+ acceptForm: {
|
|
|
|
|
+ checkRemark: ''
|
|
|
|
|
+ },
|
|
|
rules: {
|
|
rules: {
|
|
|
startMileage: {
|
|
startMileage: {
|
|
|
required: true,
|
|
required: true,
|
|
@@ -521,6 +538,9 @@ export default {
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
...mapGetters(['getDictValue']),
|
|
...mapGetters(['getDictValue']),
|
|
|
|
|
+ userInfo() {
|
|
|
|
|
+ return this.$store.getters.user.info;
|
|
|
|
|
+ },
|
|
|
columns() {
|
|
columns() {
|
|
|
let list = [
|
|
let list = [
|
|
|
{
|
|
{
|
|
@@ -642,6 +662,7 @@ export default {
|
|
|
startMileageImagesFileIds: this.formatImageIds(response.startMileageImagesFileIds),
|
|
startMileageImagesFileIds: this.formatImageIds(response.startMileageImagesFileIds),
|
|
|
endMileageImagesFileIds: this.formatImageIds(response.endMileageImagesFileIds)
|
|
endMileageImagesFileIds: this.formatImageIds(response.endMileageImagesFileIds)
|
|
|
};
|
|
};
|
|
|
|
|
+ this.acceptForm.checkRemark = response.checkRemark || '';
|
|
|
|
|
|
|
|
// 处理开始里程图片(使用路径生成URL,同步ID)
|
|
// 处理开始里程图片(使用路径生成URL,同步ID)
|
|
|
this.startMileageImgs = this.form.startMileageImagesPaths
|
|
this.startMileageImgs = this.form.startMileageImagesPaths
|
|
@@ -775,6 +796,7 @@ export default {
|
|
|
data.startMileageImagesFileIds = this.form.startMileageImagesFileIds;
|
|
data.startMileageImagesFileIds = this.form.startMileageImagesFileIds;
|
|
|
data.endMileageImagesFileIds = this.form.endMileageImagesFileIds;
|
|
data.endMileageImagesFileIds = this.form.endMileageImagesFileIds;
|
|
|
|
|
|
|
|
|
|
+
|
|
|
try {
|
|
try {
|
|
|
await logistictraklistnoteUpdateAPI(data);
|
|
await logistictraklistnoteUpdateAPI(data);
|
|
|
this.$message.success('操作成功');
|
|
this.$message.success('操作成功');
|
|
@@ -784,7 +806,20 @@ export default {
|
|
|
this.$message.error('保存失败:' + (error.message || '未知错误'));
|
|
this.$message.error('保存失败:' + (error.message || '未知错误'));
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ async handleAccept(status) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ await logistictraklistnoteUpdateStatusAPI(this.currentRow.id, {
|
|
|
|
|
+ status: status,
|
|
|
|
|
+ checkRemark: this.acceptForm.checkRemark
|
|
|
|
|
+ });
|
|
|
|
|
+ this.$message.success('操作成功');
|
|
|
|
|
+ this.$emit('reload');
|
|
|
|
|
+ this.cancel();
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ this.$message.error('操作失败:' + (error.message || '未知错误'));
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|