|
|
|
@ -7,7 +7,7 @@
|
|
|
|
|
:inline="true" |
|
|
|
|
:rules="details.rules" |
|
|
|
|
:model="query" |
|
|
|
|
class="el-fr-d" |
|
|
|
|
class="table_form" |
|
|
|
|
label-width="100px" |
|
|
|
|
> |
|
|
|
|
<!-- 顶部 --> |
|
|
|
@ -843,6 +843,63 @@
|
|
|
|
|
<!-- <el-button type="primary" icon="Printer" @click="handlePrint">打 印</el-button> --> |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<!-- 改单原因 --> |
|
|
|
|
<el-dialog |
|
|
|
|
title="修改信息" |
|
|
|
|
:center="true" |
|
|
|
|
:align-center="true" |
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
:close-on-press-escape="false" |
|
|
|
|
:show-close="false" |
|
|
|
|
:visible.sync="details.popUpShow.causeVisited" |
|
|
|
|
width="50%" |
|
|
|
|
v-model="details.popUpShow.causeVisited" |
|
|
|
|
> |
|
|
|
|
<el-form :model="details.causeForm" ref="causeFormRef" label-width="120px"> |
|
|
|
|
<el-form-item |
|
|
|
|
label="修改原因:" |
|
|
|
|
style="margin-right: 0" |
|
|
|
|
prop="editResonCode" |
|
|
|
|
:rules="[{ required: true, message: '请选择修改原因', trigger: ['blur', 'change'] }]" |
|
|
|
|
> |
|
|
|
|
<el-select |
|
|
|
|
v-model="details.causeForm.editResonCode" |
|
|
|
|
clearable |
|
|
|
|
placeholder="请选择修改原因" |
|
|
|
|
style="width: 100%" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in query.editWaybillReasonTypeList" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictKey" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="备注:" style="margin-right: 0"> |
|
|
|
|
<el-input type="textarea" v-model="details.causeForm.remark" placeholder="请输入描述" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
|
|
<tablecmt |
|
|
|
|
style="height: 40vh" |
|
|
|
|
ref="tableNode" |
|
|
|
|
:columnList="details.changeColumnList" |
|
|
|
|
:tableData="details.changeData" |
|
|
|
|
:loading="loadingObj.list" |
|
|
|
|
> |
|
|
|
|
<template #default="slotProps"> </template> |
|
|
|
|
</tablecmt> |
|
|
|
|
|
|
|
|
|
<div class="flex-c-c mt20"> |
|
|
|
|
<el-button icon="CircleClose" @click="() => (details.popUpShow.causeVisited = false)" |
|
|
|
|
>取 消</el-button |
|
|
|
|
> |
|
|
|
|
<el-button type="primary" icon="CircleCheck" @click="handleSubmitCause">确 认</el-button> |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
@ -862,7 +919,7 @@ import dayjs from 'dayjs';
|
|
|
|
|
import { mapGetters } from 'vuex'; |
|
|
|
|
/** 获取字典 */ |
|
|
|
|
import { getDictionaryBiz } from '@/api/system/dict'; |
|
|
|
|
import { downloadXls, computeNumber, debounce } from '@/utils/util'; |
|
|
|
|
import { downloadXls, computeNumber, debounce, setNodeHeight } from '@/utils/util'; |
|
|
|
|
import { getLazyTreeAll } from '@/api/base/region'; |
|
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'; |
|
|
|
|
import type { FormInstance, FormRules } from 'element-plus'; |
|
|
|
@ -888,6 +945,7 @@ const instance = getCurrentInstance();
|
|
|
|
|
|
|
|
|
|
// 获取表单实例 |
|
|
|
|
const ruleFormRef = ref<FormInstance>(); |
|
|
|
|
const causeFormRef = ref<FormInstance>(); |
|
|
|
|
|
|
|
|
|
// vuex |
|
|
|
|
const $store = useStore(); |
|
|
|
@ -1205,6 +1263,8 @@ const details = reactive<any>({
|
|
|
|
|
popUpShow: { |
|
|
|
|
/** 是否继续开单 */ |
|
|
|
|
titleVisited: false, |
|
|
|
|
/** 改单原因 */ |
|
|
|
|
titleVisited: false, |
|
|
|
|
}, |
|
|
|
|
itemRules: { |
|
|
|
|
/** 计价方式 */ |
|
|
|
@ -1265,6 +1325,43 @@ const details = reactive<any>({
|
|
|
|
|
/** 装卸费 */ |
|
|
|
|
// { name: '仓库存储费', key: 'storageFee' }, |
|
|
|
|
], |
|
|
|
|
/** 修改原因 */ |
|
|
|
|
causeForm: {}, |
|
|
|
|
/** 修改列表 */ |
|
|
|
|
changeColumnList: [ |
|
|
|
|
{ |
|
|
|
|
prop: 'itemName', |
|
|
|
|
label: '修改项', |
|
|
|
|
type: 1, |
|
|
|
|
values: '', |
|
|
|
|
width: '', |
|
|
|
|
checkarr: [], |
|
|
|
|
fixed: false, |
|
|
|
|
sortable: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
prop: 'oldValue', |
|
|
|
|
label: '修改前', |
|
|
|
|
type: 1, |
|
|
|
|
values: '', |
|
|
|
|
width: '', |
|
|
|
|
checkarr: [], |
|
|
|
|
fixed: false, |
|
|
|
|
sortable: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
prop: 'newValue', |
|
|
|
|
label: '修改后', |
|
|
|
|
type: 1, |
|
|
|
|
values: '', |
|
|
|
|
width: '', |
|
|
|
|
checkarr: [], |
|
|
|
|
fixed: false, |
|
|
|
|
sortable: false, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
/** 修改数据 */ |
|
|
|
|
changeData: [], |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const { query, data, drawerShow, loadingObj } = toRefs(details); |
|
|
|
@ -1912,33 +2009,43 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
|
|
|
|
|
|
|
|
|
|
// 记录提交参数 |
|
|
|
|
details.submitData = submitData; |
|
|
|
|
// const response = await postUpdateWaybillVerify(submitData); |
|
|
|
|
// if (response.data.code !== 200) return; |
|
|
|
|
|
|
|
|
|
// if (!response.data.data) return ElMessage.warning('没有更改的数据'); |
|
|
|
|
|
|
|
|
|
// ElMessageBox.alert(response.data.data.replaceAll(';', ' <br /> '), '被更改数据', { |
|
|
|
|
// dangerouslyUseHTMLString: true, |
|
|
|
|
// confirmButtonText: '确认', |
|
|
|
|
// callback: async (action: Action) => { |
|
|
|
|
// try { |
|
|
|
|
// details.loadingObj.submitLoadingBtn = true; |
|
|
|
|
|
|
|
|
|
// const res = await postUpdateWaybill(submitData); |
|
|
|
|
// const { code, msg } = res.data; |
|
|
|
|
// if (code !== 200) return; |
|
|
|
|
// if (msg) ElMessage.success(msg); |
|
|
|
|
|
|
|
|
|
// back(); |
|
|
|
|
// } catch (error) { |
|
|
|
|
// console.log('error :>> ', error); |
|
|
|
|
// } finally { |
|
|
|
|
// details.loadingObj.submitLoadingBtn = false; |
|
|
|
|
// } |
|
|
|
|
// }, |
|
|
|
|
// }); |
|
|
|
|
|
|
|
|
|
const response = await postUpdateWaybillVerify(submitData); |
|
|
|
|
if (response.data.code !== 200) return; |
|
|
|
|
|
|
|
|
|
if (!response.data.data) return ElMessage.warning('没有更改的数据'); |
|
|
|
|
|
|
|
|
|
ElMessageBox.alert(response.data.data.replaceAll(';', ' <br /> '), '被更改数据', { |
|
|
|
|
// if you want to disable its autofocus |
|
|
|
|
// autofocus: false, |
|
|
|
|
dangerouslyUseHTMLString: true, |
|
|
|
|
confirmButtonText: '确认', |
|
|
|
|
callback: async (action: Action) => { |
|
|
|
|
try { |
|
|
|
|
details.loadingObj.submitLoadingBtn = true; |
|
|
|
|
if (!response.data.data || response.data.data.length === 0) |
|
|
|
|
return ElMessage.warning('没有更改的数据'); |
|
|
|
|
|
|
|
|
|
const res = await postUpdateWaybill(submitData); |
|
|
|
|
const { code, msg } = res.data; |
|
|
|
|
if (code !== 200) return; |
|
|
|
|
if (msg) ElMessage.success(msg); |
|
|
|
|
details.changeData = response.data.data; |
|
|
|
|
details.popUpShow.causeVisited = true; |
|
|
|
|
await nextTick(); |
|
|
|
|
|
|
|
|
|
back(); |
|
|
|
|
} catch (error) { |
|
|
|
|
console.log('error :>> ', error); |
|
|
|
|
} finally { |
|
|
|
|
details.loadingObj.submitLoadingBtn = false; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
setNodeHeight(tableNode.value.$el, '40vh'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const { code, msg } = res.data; |
|
|
|
@ -2087,6 +2194,39 @@ const handleFindPrice = async (condition?: any) => {
|
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** 改单提交 */ |
|
|
|
|
const handleSubmitCause = () => { |
|
|
|
|
causeFormRef.value.validate(async valid => { |
|
|
|
|
if (!valid) return; |
|
|
|
|
|
|
|
|
|
const submitData = { ...details.submitData, ...details.causeForm }; |
|
|
|
|
for (let i = 0; i < details.query.editWaybillReasonTypeList.length; i++) { |
|
|
|
|
const value = details.query.editWaybillReasonTypeList[i]; |
|
|
|
|
|
|
|
|
|
if (value.dictKey !== details.causeForm.editResonCode) continue; |
|
|
|
|
|
|
|
|
|
submitData.editReson = value.dictValue; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
details.loadingObj.submitLoadingBtn = true; |
|
|
|
|
details.popUpShow.causeVisited = false; |
|
|
|
|
|
|
|
|
|
const res = await postUpdateWaybill(submitData); |
|
|
|
|
const { code, msg } = res.data; |
|
|
|
|
if (code !== 200) return; |
|
|
|
|
if (msg) ElMessage.success(msg); |
|
|
|
|
|
|
|
|
|
back(); |
|
|
|
|
} catch (error) { |
|
|
|
|
console.log('error :>> ', error); |
|
|
|
|
} finally { |
|
|
|
|
details.loadingObj.submitLoadingBtn = false; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
watch( |
|
|
|
|
() => $route.query, |
|
|
|
|
() => { |
|
|
|
@ -2100,15 +2240,21 @@ watch(
|
|
|
|
|
<style scoped lang="scss"> |
|
|
|
|
$borderColor: #172e60; |
|
|
|
|
|
|
|
|
|
.table_form { |
|
|
|
|
:deep(.el-date-editor.el-input, .el-date-editor.el-input__wrapper) { |
|
|
|
|
height: 100% !important; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
:deep(.el-input__wrapper) { |
|
|
|
|
box-shadow: none; |
|
|
|
|
border-bottom: 1px solid #777; |
|
|
|
|
border-bottom: 1px solid $borderColor; |
|
|
|
|
border-radius: 0; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
:deep(.table_form .el-form-item) { |
|
|
|
|
flex: 1 !important; |
|
|
|
|
margin: 0 !important; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 页面字体大小 |
|
|
|
|
.avue-crud { |
|
|
|
@ -2246,11 +2392,6 @@ $borderColor: #172e60;
|
|
|
|
|
width: 100%; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
:deep(.el-form-item) { |
|
|
|
|
flex: 1; |
|
|
|
|
margin: 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
:deep(.el-radio) { |
|
|
|
|
margin: 0; |
|
|
|
|
} |
|
|
|
|