|
@@ -4,13 +4,14 @@
|
|
|
<div class="title">基本信息</div>
|
|
|
<div>
|
|
|
<el-button type="primary" @click="transferCli()">转移</el-button>
|
|
|
- <el-button type="primary" @click="editInfo(info)">编辑</el-button>
|
|
|
+ <el-button type="primary" v-permission="['orderEdit']" @click="editInfo(info)">编辑</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form flex flex-wrap justify-between">
|
|
|
- <div v-for="item in formItems" :key="item.label" class="formItem flex" :style="{ width: item.width }">
|
|
|
+ <div v-for="item in formItems" :key="item.label" class="formItem flex" :style="`width: ${item.width}`">
|
|
|
<div :class="item.labelClass">{{ item.label }}:</div>
|
|
|
- <div class="flex-1 overflow-hidden text-ellipsis whitespace-nowrap ml-1">{{ item.value }}</div>
|
|
|
+ <div class="flex-1 overflow-hidden text-ellipsis whitespace-nowrap ml-1" v-ellipsis-tooltip>{{
|
|
|
+ item.value }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -62,7 +63,7 @@ import { ref, reactive, onMounted, onUnmounted, defineExpose, inject, watchEffec
|
|
|
import { GenerateForm } from '@zmjs/form-design';
|
|
|
import { getFromValue, getTemplateKey } from '@/utils/tools';
|
|
|
import { get, post } from '@/utils/request';
|
|
|
-import { GETGENERATEFOEM, GETPERSONNEL, URL_OEDERUPDATE, URL_PRODUTWITHORDER, URL_TRANSFER } from '../api';
|
|
|
+import { GETGENERATEFOEM, GETPERSONNEL, URL_OEDERUPDATE, URL_PRODUTWITHORDER, URL_TRANSFER, paymentStatus } from '../api';
|
|
|
import { formatDate } from '@/utils/times';
|
|
|
|
|
|
const globalPopup = inject<GlobalPopup>('globalPopup')
|
|
@@ -102,6 +103,7 @@ function editOrderSave() {
|
|
|
...res,
|
|
|
orderEndDate: res.orderEndDate ? formatDate(res.orderEndDate) : '',
|
|
|
orderStartDate: res.orderStartDate ? formatDate(res.orderStartDate) : '',
|
|
|
+ placeTime: res.placeTime ? formatDate(res.placeTime) : '',
|
|
|
orderProductDetailString: JSON.stringify(productTableListValue.value || [])
|
|
|
}).then((_res) => {
|
|
|
closeVisible('editOrderVisible')
|
|
@@ -178,32 +180,38 @@ function closeVisible(type: keyof typeof allVisible) {
|
|
|
}
|
|
|
|
|
|
const formItems = reactive([
|
|
|
- { label: '订单编号', key: 'orderCode', value: '', labelClass: 'w-20 text-right text-gray-500', width: '48%' },
|
|
|
- { label: '订单名称', key: 'orderName', value: '', labelClass: 'w-22 text-right text-gray-500', width: '48%' },
|
|
|
- { label: '客户名称', key: 'customName', value: '', labelClass: 'w-22 text-right text-gray-500', width: '48%' },
|
|
|
- { label: '商机名称', key: 'businessOpportunityName', value: '', labelClass: 'w-22 text-right text-gray-500', width: '48%' },
|
|
|
- { label: '订单金额', key: 'price', value: '', labelClass: 'w-22 text-right text-gray-500', width: '48%' },
|
|
|
- { label: '回款状态', key: 'receivedStatus', value: '', labelClass: 'w-22 text-right text-gray-500', width: '48%' },
|
|
|
- { label: '已回款金额', key: 'receivedPayment', value: '', labelClass: 'w-24 text-right text-gray-500', width: '48%' },
|
|
|
- { label: '未回款', key: 'unReceivedPayment', value: '', labelClass: 'w-22 text-right text-gray-500', width: '48%' },
|
|
|
- { label: '订单类型', key: 'type', value: '', labelClass: 'w-22 text-right text-gray-500', width: '48%' },
|
|
|
- { label: '下单时间', key: 'placeTime', value: '', labelClass: 'w-22 text-right text-gray-500', width: '48%' },
|
|
|
- { label: '订单开始时间', key: 'orderStartDate', value: '', labelClass: 'w-30 text-right text-gray-500', width: '48%' },
|
|
|
- { label: '订单结束时间', key: 'orderEndDate', value: '', labelClass: 'w-30 text-right text-gray-500', width: '48%' },
|
|
|
- { label: '负责人', key: 'inchargerName', value: '', labelClass: 'w-22 text-right text-gray-500', width: '48%' },
|
|
|
- { label: '创建人', key: 'createName', value: '', labelClass: 'w-22 text-right text-gray-500', width: '48%' },
|
|
|
- { label: '创建时间', key: 'createTime', value: '', labelClass: 'w-22 text-right text-gray-500', width: '48%' },
|
|
|
- { label: '客户签约人', key: 'customSigner', value: '', labelClass: 'w-24 text-right text-gray-500', width: '48%' },
|
|
|
- { label: '公司签约人', key: 'companySigner', value: '', labelClass: 'w-24 text-right text-gray-500', width: '48%' },
|
|
|
- { label: '备注', key: 'remark', value: '', labelClass: 'w-22 text-right text-gray-500', width: '100%' },
|
|
|
+ { label: '订单编号', key: 'orderCode', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
|
|
|
+ { label: '订单名称', key: 'orderName', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
|
|
|
+ { label: '客户名称', key: 'customName', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
|
|
|
+ { label: '商机名称', key: 'businessOpportunityName', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
|
|
|
+ { label: '订单金额', key: 'price', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
|
|
|
+ { label: '回款状态', key: 'statusValue', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
|
|
|
+ { label: '已回款金额', key: 'receivedPayment', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
|
|
|
+ { label: '未回款', key: 'unReceivedPayment', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
|
|
|
+ { label: '订单类型', key: 'type', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
|
|
|
+ { label: '下单时间', key: 'placeTime', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
|
|
|
+ { label: '订单开始时间', key: 'orderStartDate', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
|
|
|
+ { label: '订单结束时间', key: 'orderEndDate', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
|
|
|
+ { label: '负责人', key: 'inchargerName', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
|
|
|
+ { label: '创建人', key: 'creatorName', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
|
|
|
+ { label: '创建时间', key: 'createTime', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
|
|
|
+ { label: '客户签约人', key: 'customSigner', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
|
|
|
+ { label: '公司签约人', key: 'companySigner', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
|
|
|
+ { label: '备注', key: 'remark', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '100%' },
|
|
|
])
|
|
|
|
|
|
watchEffect(() => {
|
|
|
const { data } = props
|
|
|
info.value = data
|
|
|
formItems.forEach(item => {
|
|
|
- item.value = info.value[item.key] || '';
|
|
|
+ if (item.key === 'statusValue') {
|
|
|
+ const status = info.value['status'];
|
|
|
+ item.value = status !== '' && status !== null ? (paymentStatus.find(p => p.value === status)?.label || '') : '';
|
|
|
+ } else {
|
|
|
+ item.value = info.value[item.key] || '';
|
|
|
+ }
|
|
|
});
|
|
|
+
|
|
|
})
|
|
|
|
|
|
async function getSystemField() {
|
|
@@ -234,6 +242,8 @@ onMounted(async () => {
|
|
|
|
|
|
.form {
|
|
|
.formItem {
|
|
|
+ width: 48%;
|
|
|
+
|
|
|
.text {
|
|
|
display: -webkit-box;
|
|
|
/* Safari */
|