+
@@ -214,7 +214,9 @@
-
+
+
+
@@ -278,6 +280,7 @@
const formId = ref(currentRoute.value?.params?.id);
const pageType = ref(currentRoute.value.query?.type);
const pageId = ref(currentRoute.value.query?.id)
+ const isViewForm = currentRoute.value.path.includes('viewForm')
const spinning = ref(false);
const curIdx = ref(null)
@@ -328,17 +331,6 @@
{ title: t('备注'), dataIndex: 'note', sorter: true, width: 200},
{ title: t('操作'), dataIndex: 'operation', width: 120, fixed: 'right',align: 'center'},
]);
- const columnsAppro= ref([
- { title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 100},
- { title: t('标题'), dataIndex: 'title', sorter: true, width:100},
- { title: t('编号'), dataIndex: 'code', sorter: true},
- { title: t('签报类型'), dataIndex: 'typeName', sorter: true, width: 140},
- { title: t('拟稿人'), dataIndex: 'empName', sorter: true, width: 140},
- { title: t('拟稿人所属部门'), dataIndex: 'bDeptName', sorter: true, width: 140},
- { title: t('拟稿时间'), dataIndex: 'dateAppro', sorter: true, width: 140},
- { title: t('附件'), dataIndex: 'file', sorter: true, width: 140},
- { title: t('操作'), dataIndex: 'operation', width: 120, fixed: 'right',align: 'center'},
- ]);
const dataList = ref([])
const dataFile = ref([]);
const dataListAppro = ref([])
@@ -377,6 +369,11 @@
getOption()
if (pageId.value) {
getInfo(pageId.value)
+ if (currentRoute.value.query?.disabled) {
+ isDisable.value = true
+ let idx = columns.value.findIndex(v =>v.dataIndex == 'operation')
+ idx>-1 && columns.value.splice(idx, 1)
+ }
} else {
formState.empName = userInfo.name
formState.empId = userInfo.id
@@ -623,6 +620,9 @@
min-height: 44px;
margin-bottom: 12px;
border-bottom: 1px solid #eee;
- }
+ }
+ .pdcss {
+ padding: 6px 12px !important;
+ }
diff --git a/src/views/contract/ContractPurPng/components/config.ts b/src/views/contract/ContractPurPng/components/config.ts
index 1a4fcd4..135e4d3 100644
--- a/src/views/contract/ContractPurPng/components/config.ts
+++ b/src/views/contract/ContractPurPng/components/config.ts
@@ -8,7 +8,7 @@ export const formConfig = {
export const searchFormSchema: FormSchema[] = [
{
- field: 'kNo',
+ field: 'kName',
label: '合同号/名称',
component: 'Input',
},
@@ -54,6 +54,7 @@ export const columns: BasicColumn[] = [
align: 'left',
sorter: true,
+ width: 120
},
{
@@ -63,19 +64,20 @@ export const columns: BasicColumn[] = [
align: 'left',
sorter: true,
+ width: 120
},
{
- dataIndex: 'approCode',
+ dataIndex: 'approName',
title: '状态',
componentType: 'input',
align: 'left',
-
+ width: 100,
sorter: true,
},
{
- dataIndex: 'cpTableName',
+ dataIndex: 'pointUpName',
title: '上载点',
componentType: 'input',
align: 'left',
@@ -84,16 +86,16 @@ export const columns: BasicColumn[] = [
},
{
- dataIndex: 'onlineSign',
+ dataIndex: 'transName',
title: '是否托运',
componentType: 'input',
align: 'left',
-
+ width: 100,
sorter: true,
},
{
- dataIndex: 'comId',
+ dataIndex: 'comName',
title: '合同主体',
componentType: 'input',
align: 'left',
diff --git a/src/views/contract/ContractPurPng/components/createForm.vue b/src/views/contract/ContractPurPng/components/createForm.vue
index c3963e2..6ebabc1 100644
--- a/src/views/contract/ContractPurPng/components/createForm.vue
+++ b/src/views/contract/ContractPurPng/components/createForm.vue
@@ -110,7 +110,7 @@
上载点
新增
删除
-
+
@@ -125,7 +125,7 @@
*是否托运
-
+
{{ item.name }}
@@ -144,7 +144,7 @@
@@ -152,81 +152,18 @@
-
-
-
新增行
-
-
-
- *开始日期
-
-
- *结束日期
-
-
- *基础量/增量
-
-
- *优先级
-
-
- *月气量(吉焦)
-
-
- *月气量(万方)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.name }}
-
-
-
-
-
-
-
-
-
-
- 删除
-
-
-
-
+
+
-
-
+
+
+
+
+
+
@@ -264,6 +201,8 @@
import contractFactListModal from '/@/components/common/contractFactListModal.vue';
import downloadPointModal from '/@/components/common/downloadPointModal.vue';
import supplierListModal from '/@/components/common/supplierListModal.vue';
+ import contractQtyList from '/@/components/common/contractQtyList.vue';
+
import { useUserStore } from '/@/store/modules/user';
const userStore = useUserStore();
@@ -292,7 +231,8 @@
const formId = ref(currentRoute.value?.params?.id);
const pageType = ref(currentRoute.value.query?.type);
const pageId = ref(currentRoute.value.query?.id)
-
+
+ const contractQty=ref()
const spinning = ref(false);
const curIdx = ref(null)
const { notification } = useMessage();
@@ -325,22 +265,6 @@
labelCol: { span: 8 },
wrapperCol: { span: 16 },
}
- const columns= ref([
- { title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 80},
- { title: t('开始日期'), dataIndex: 'dateFrom', sorter: true, width:150},
- { title: t('结束日期'), dataIndex: 'dateTo', sorter: true, width: 150},
- { title: t('基础量/增量'), dataIndex: 'baseInc', sorter: true, width: 130},
- { title: t('优先级'), dataIndex: 'sort', sorter: true, width: 100},
- { title: t('比值(方/吉焦)'), dataIndex: 'rateM3Gj', sorter: true, width: 150},
- { title: t('月气量(吉焦)'), dataIndex: 'qtyGjMonth', sorter: true, width: 150},
- { title: t('月气量(万方)'), dataIndex: 'qtyM3Month', sorter: true, width: 150},
- { title: t('日气量(吉焦)'), dataIndex: 'qtyGjDay', sorter: true, width: 120},
- { title: t('日气量(万方)'), dataIndex: 'qtyM3Day', sorter: true, width: 120},
- { title: t('照付不议类型'), dataIndex: 'zfbyTypeCode', sorter: true, width: 120},
- { title: t('照付不议比例%/量数值'), dataIndex: 'zfbyValue', sorter: true, width: 120},
- { title: t('备注'), dataIndex: 'note', sorter: true, width: 200},
- { title: t('操作'), dataIndex: 'operation', width: 80, fixed: 'right',align: 'center'},
- ]);
const selectType = ref()
const isShow = ref(false)
const dataListContractAgree = ref([])
@@ -378,10 +302,7 @@
() => props.disabled,
(val) => {
isDisable.value = val
- if (val) {
- let idx = columns.value.findIndex(v =>v.dataIndex == 'operation')
- idx>-1 && columns.value.splice(idx, 1)
- }
+
},
{
immediate: true
@@ -427,6 +348,9 @@
v.dateFrom = v.dateFrom ? dayjs(v.dateFrom) : null
v.dateTo = v.dateTo ? dayjs(v.dateTo) : null
});
+ dataListAppro.value.forEach(v => {
+ v.approId = v.id
+ })
} catch (error) {
spinning.value = false
@@ -488,67 +412,7 @@
}
return endValue.valueOf() <= startValue.valueOf();
}
- const dateFromTb = (startValue, index, record) => {
- if (!startValue) return
- const endValue = dataListContractAgree.value[index]?.dateTo;
- if (!startValue || !endValue) {
- return false
- }
- if (startValue.valueOf() > endValue.valueOf()) {
- message.warning('结束日期须大于等于开始日期')
- dataListContractAgree.value[index].dateFrom = ''
- return
- }
- dayCount(record)
- }
- const dateToTb = (endValue, index, record) => {
- if (!endValue) return
- const startValue = dataListContractAgree.value[index]?.dateFrom;
- if (!endValue || !startValue) {
- return false
- }
- if (startValue.valueOf() > endValue.valueOf()) {
- message.warning('结束日期须大于等于开始日期')
- dataListContractAgree.value.splice(index, 1, { ...dataListContractAgree.value[index], dateTo: '' });
- return
- }
- dayCount(record)
- }
- const numChange = (key, record) => {
- if (key == 'qtyGjMonth') {
- numCount2(record)
- dayCount(record)
- }
- if (key == 'qtyM3Month') {
- numCount1(record)
- dayCount(record)
- }
- if (key == 'rateM3Gj') {
- numCount1(record)
- numCount2(record)
- dayCount(record)
- }
- }
- const numCount1 = (record) => {
- // 月气量(吉焦) =月气量(方)qty_m3_month*rate_m3_gj (比值(方/吉焦)
- record.qtyGjMonth = (Number(record.qtyM3Month) || 0) * (Number(record.rateM3Gj) || 0)
- record.qtyGjMonth = record.qtyGjMonth ? record.qtyGjMonth.toFixed(4) : '0'
- }
- const numCount2 = (record) => {
- // 月气量(方) = 月气量(吉焦) qty_gj_month/rate_m3_gj/10000 显示时字段值/10000;保存时页面值*10000
- record.qtyM3Month = Number(record.rateM3Gj) ? (Number(record.qtyGjMonth) || 0) /Number(record.rateM3Gj) : 0
- record.qtyM3Month = record.qtyM3Month ? record.qtyM3Month.toFixed(4) : '0'
- }
- const dayCount = (record) => {
- // 日气量(吉焦) = 月气量(吉焦)qty_gj_month/开始日期到结束日期的天数;计算结果保留整数
- const days = dayjs(record.dateTo).diff(dayjs(record.dateFrom), 'day');
- record.qtyGjDay = days ? (Number(record.qtyGjMonth) || 0) /days : 0
- record.qtyGjDay = parseInt(record.qtyGjDay)
- // 日气量(方) = 月气量(万方)/开始日期到结束日期的天数;计算结果保留4位小数;显示时字段值/10000;保存时页面值*10000
- record.qtyM3Day = days ? (Number(record.qtyM3Month) || 0) /days : 0
- record.qtyM3Day = record.qtyM3Day ? record.qtyM3Day.toFixed(4) : '0'
- }
const onSearch = (val)=> {
openModalDept(true,{isUpdate: false})
}
@@ -569,11 +433,7 @@
openModalDownLoad(true,{isUpdate: false, type: val})
});
}
- const addContractAgree = () => {
- dataListContractAgree.value.push({
- dateFrom: null, dateTo: null, rateM3Gj: null, qtyGjMonth: null, qtyM3Month: null, qtyGjDay: null, qtyM3Day: null
- })
- }
+
const addUpLoad = ()=> {
dataListPoint.value.push({
"pointUpCode": "",
@@ -635,11 +495,13 @@
let nameList = val.map(v=>v.fullName)
dataListPoint.value[curIdx.value].pointDelyName = nameList.join(',')
dataListPoint.value[curIdx.value].lngContractPurPngPointSalesList = val || []
+ dataListPoint.value[curIdx.value].lngContractPurPngPointSalesList.forEach(v => {
+ v.id = ''
+ v.pointDelyCode = v.code
+ })
}
}
- const btnCheck = (record, index) => {
- dataListContractAgree.value.splice(index, 1)
- }
+
function unique(arr, u_key) {
const map = new Map()
arr.forEach((item, index) => {
@@ -658,9 +520,9 @@
async function handleSubmit(type) {
try {
await formRef.value.validateFields();
- let arr = JSON.parse(JSON.stringify(dataListContractAgree.value))
+ let arr = contractQty.value.getQtyList()
for(let i=0; i
{
+ v.pointUpCode = dataListPoint.value[i].pointUpCode
+ v.transSign = dataListPoint.value[i].transSign
+ })
}
- let arr1 = []
- dataListAppro.value.forEach(v=>{
- v.approId = ''
- arr1.concat(v.lngContractPurPngPointSalesList || [])
- })
let newArr = arr1.map(v=>v.pointDelyCode)
let codeList = dataListPoint.value.map(v =>v.pointUpCode)
const isRepeat=codeList.some((item,index,arr)=>arr.indexOf(item)!=index);
@@ -772,5 +635,10 @@
color: rgba(0, 0, 0, 0.45);
// top: 0;
}
+ .tbStyle {
+ border: 1px dashed #d9d9d9;
+ padding: 10px;
+ margin-bottom: 10px;
+ }
diff --git a/src/views/contract/ContractSales/components/config.ts b/src/views/contract/ContractSales/components/config.ts
index 8da6947..e575e07 100644
--- a/src/views/contract/ContractSales/components/config.ts
+++ b/src/views/contract/ContractSales/components/config.ts
@@ -52,7 +52,7 @@ export const columns: BasicColumn[] = [
title: '有效期开始',
componentType: 'input',
align: 'left',
-
+ width: 120,
sorter: true,
},
@@ -61,7 +61,7 @@ export const columns: BasicColumn[] = [
title: '有效期结束',
componentType: 'input',
align: 'left',
-
+ width: 120,
sorter: true,
},
@@ -70,7 +70,7 @@ export const columns: BasicColumn[] = [
title: '状态',
componentType: 'input',
align: 'left',
-
+ width: 100,
sorter: true,
},
@@ -84,11 +84,11 @@ export const columns: BasicColumn[] = [
},
{
- dataIndex: 'transSignName',
+ dataIndex: 'transName',
title: '是否托运',
componentType: 'input',
align: 'left',
-
+ width: 120,
sorter: true,
},
diff --git a/src/views/contract/ContractSales/components/createForm.vue b/src/views/contract/ContractSales/components/createForm.vue
index fff6941..5844d39 100644
--- a/src/views/contract/ContractSales/components/createForm.vue
+++ b/src/views/contract/ContractSales/components/createForm.vue
@@ -135,7 +135,7 @@
*是否托运
-
+
{{ item.name }}
@@ -155,80 +155,17 @@