|
@@ -25,7 +25,7 @@
|
|
@close="close"
|
|
@close="close"
|
|
@select="select"
|
|
@select="select"
|
|
/>
|
|
/>
|
|
-
|
|
|
|
|
|
+
|
|
<template v-for="(item, index) in settlementList" :key="index">
|
|
<template v-for="(item, index) in settlementList" :key="index">
|
|
<wd-card :title="'开票日期:' + item.COL_0.value">
|
|
<wd-card :title="'开票日期:' + item.COL_0.value">
|
|
<view class="justify-between items-center flex">
|
|
<view class="justify-between items-center flex">
|
|
@@ -103,11 +103,11 @@ function changeSearchType({ item, index }) {
|
|
actions.value = oilList.value;
|
|
actions.value = oilList.value;
|
|
} else if (index === 2) {
|
|
} else if (index === 2) {
|
|
actions.value = userList.value;
|
|
actions.value = userList.value;
|
|
- }
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
function searchFocus() {
|
|
function searchFocus() {
|
|
showSheet.value = true;
|
|
showSheet.value = true;
|
|
-}
|
|
|
|
|
|
+}
|
|
function searchChange(value) {
|
|
function searchChange(value) {
|
|
// 如果输入框为空则清空 searchForm
|
|
// 如果输入框为空则清空 searchForm
|
|
if (!value.value) {
|
|
if (!value.value) {
|
|
@@ -117,25 +117,25 @@ function searchChange(value) {
|
|
customerName: '',
|
|
customerName: '',
|
|
};
|
|
};
|
|
getSettlementList();
|
|
getSettlementList();
|
|
- }
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
// cancelChange
|
|
// cancelChange
|
|
function cancelChange(value) {
|
|
function cancelChange(value) {
|
|
getSettlementList();
|
|
getSettlementList();
|
|
-}
|
|
|
|
|
|
+}
|
|
const actions = ref([]);
|
|
const actions = ref([]);
|
|
-// 油品名称
|
|
|
|
|
|
+// 油品名称
|
|
const oilList = ref([{ name: '柴油' }, { name: '汽油' }]);
|
|
const oilList = ref([{ name: '柴油' }, { name: '汽油' }]);
|
|
-// 客户名称
|
|
|
|
|
|
+// 客户名称
|
|
const userList = ref([]);
|
|
const userList = ref([]);
|
|
-// 获取客户列表
|
|
|
|
|
|
+// 获取客户列表
|
|
const getUserList = () => {
|
|
const getUserList = () => {
|
|
DemoApi.getCustomerList().then((res) => {
|
|
DemoApi.getCustomerList().then((res) => {
|
|
userList.value = res.data.map((item) => {
|
|
userList.value = res.data.map((item) => {
|
|
return { name: item.COL_ALIAS_1 };
|
|
return { name: item.COL_ALIAS_1 };
|
|
- })
|
|
|
|
|
|
+ });
|
|
});
|
|
});
|
|
-}
|
|
|
|
|
|
+};
|
|
getUserList();
|
|
getUserList();
|
|
const projectList = ref([]);
|
|
const projectList = ref([]);
|
|
const getProjectList = () => {
|
|
const getProjectList = () => {
|
|
@@ -143,22 +143,22 @@ const getProjectList = () => {
|
|
DemoApi.getProjectNameList().then((res) => {
|
|
DemoApi.getProjectNameList().then((res) => {
|
|
projectList.value = res.data.map((item) => {
|
|
projectList.value = res.data.map((item) => {
|
|
return { name: item.项目名称 };
|
|
return { name: item.项目名称 };
|
|
- })
|
|
|
|
|
|
+ });
|
|
actions.value = projectList.value;
|
|
actions.value = projectList.value;
|
|
- })
|
|
|
|
-};
|
|
|
|
|
|
+ });
|
|
|
|
+};
|
|
getProjectList();
|
|
getProjectList();
|
|
-
|
|
|
|
|
|
+
|
|
function close() {
|
|
function close() {
|
|
showSheet.value = false;
|
|
showSheet.value = false;
|
|
-}
|
|
|
|
|
|
+}
|
|
const searchForm = ref({
|
|
const searchForm = ref({
|
|
projectName: '',
|
|
projectName: '',
|
|
oilName: '',
|
|
oilName: '',
|
|
customerName: '',
|
|
customerName: '',
|
|
});
|
|
});
|
|
const toast = useToast();
|
|
const toast = useToast();
|
|
-
|
|
|
|
|
|
+
|
|
function select({ item, index }) {
|
|
function select({ item, index }) {
|
|
showSheet.value = false;
|
|
showSheet.value = false;
|
|
if (searchType.value === '项目名称') {
|
|
if (searchType.value === '项目名称') {
|
|
@@ -167,9 +167,9 @@ function select({ item, index }) {
|
|
searchForm.value.oilName = item.name;
|
|
searchForm.value.oilName = item.name;
|
|
} else if (searchType.value === '客户名称') {
|
|
} else if (searchType.value === '客户名称') {
|
|
searchForm.value.customerName = item.name;
|
|
searchForm.value.customerName = item.name;
|
|
- }
|
|
|
|
|
|
+ }
|
|
value.value = item.name;
|
|
value.value = item.name;
|
|
-}
|
|
|
|
|
|
+}
|
|
// 分页数据
|
|
// 分页数据
|
|
const pageQuery = ref({
|
|
const pageQuery = ref({
|
|
current: 1,
|
|
current: 1,
|
|
@@ -177,8 +177,8 @@ const pageQuery = ref({
|
|
descs: 536,
|
|
descs: 536,
|
|
total: 0,
|
|
total: 0,
|
|
});
|
|
});
|
|
-
|
|
|
|
-// 获取结算管理列表
|
|
|
|
|
|
+
|
|
|
|
+// 获取结算管理列表
|
|
const formKey = ref<string>('4d62523c9ef74cdacb90146125929f37');
|
|
const formKey = ref<string>('4d62523c9ef74cdacb90146125929f37');
|
|
const idKeyData = ref<string>('');
|
|
const idKeyData = ref<string>('');
|
|
const settlementList = ref([]);
|
|
const settlementList = ref([]);
|
|
@@ -188,14 +188,14 @@ const getSettlementList = () => {
|
|
const { dbLinkId, idKey } = res.data;
|
|
const { dbLinkId, idKey } = res.data;
|
|
idKeyData.value = idKey;
|
|
idKeyData.value = idKey;
|
|
tableData.value = JSON.parse(res.data.tables || '[]');
|
|
tableData.value = JSON.parse(res.data.tables || '[]');
|
|
- // 匹配fieldName == menu name的值 并且再menu添加 fieldId
|
|
|
|
|
|
+ // 匹配fieldName == menu name的值 并且再menu添加 fieldId
|
|
menu.value.map((item) => {
|
|
menu.value.map((item) => {
|
|
tableData.value.map((table) => {
|
|
tableData.value.map((table) => {
|
|
if (table.fieldName === item.content) {
|
|
if (table.fieldName === item.content) {
|
|
item.fieldId = table.fieldId;
|
|
item.fieldId = table.fieldId;
|
|
- }
|
|
|
|
|
|
+ }
|
|
});
|
|
});
|
|
- })
|
|
|
|
|
|
+ });
|
|
const params = {
|
|
const params = {
|
|
dbLinkId,
|
|
dbLinkId,
|
|
pageQuery: pageQuery.value,
|
|
pageQuery: pageQuery.value,
|
|
@@ -210,22 +210,24 @@ const getSettlementList = () => {
|
|
};
|
|
};
|
|
if (searchForm.value[item.filedName]) {
|
|
if (searchForm.value[item.filedName]) {
|
|
obj.values.push(searchForm.value[item.filedName]);
|
|
obj.values.push(searchForm.value[item.filedName]);
|
|
- }
|
|
|
|
|
|
+ }
|
|
params.paramList.push(obj);
|
|
params.paramList.push(obj);
|
|
- })
|
|
|
|
|
|
+ });
|
|
|
|
|
|
DemoApi.getFormDataList(params).then((resp) => {
|
|
DemoApi.getFormDataList(params).then((resp) => {
|
|
const { columnDict, pageData } = resp.data;
|
|
const { columnDict, pageData } = resp.data;
|
|
pageQuery.value.total = pageData.total;
|
|
pageQuery.value.total = pageData.total;
|
|
pageQuery.value.current = pageData.current;
|
|
pageQuery.value.current = pageData.current;
|
|
pageQuery.value.size = pageData.size;
|
|
pageQuery.value.size = pageData.size;
|
|
- // columnDict 是 pageData.records 和 tableData 的映射关系
|
|
|
|
- // columnDict的key是tableData的fieldId,value是pageData.records的 key
|
|
|
|
- // pageData.records 是后台返回的数据
|
|
|
|
- // tableData 是前台配置的表头
|
|
|
|
|
|
+ // columnDict 是 pageData.records 和 tableData 的映射关系
|
|
|
|
+ // columnDict的key是tableData的fieldId,value是pageData.records的 key
|
|
|
|
+ // pageData.records 是后台返回的数据
|
|
|
|
+ // tableData 是前台配置的表头
|
|
const idKey = columnDict[idKeyData.value];
|
|
const idKey = columnDict[idKeyData.value];
|
|
|
|
+ // console.log(idKey);
|
|
const arr = [];
|
|
const arr = [];
|
|
pageData.records.map((val) => {
|
|
pageData.records.map((val) => {
|
|
|
|
+ console.log(val);
|
|
const obj = {};
|
|
const obj = {};
|
|
obj.id = val[idKey];
|
|
obj.id = val[idKey];
|
|
for (const key in columnDict) {
|
|
for (const key in columnDict) {
|
|
@@ -239,28 +241,28 @@ const getSettlementList = () => {
|
|
fieldId: item.fieldId,
|
|
fieldId: item.fieldId,
|
|
pageDataRecordKey: columnDict[key],
|
|
pageDataRecordKey: columnDict[key],
|
|
};
|
|
};
|
|
- }
|
|
|
|
|
|
+ }
|
|
});
|
|
});
|
|
- }
|
|
|
|
|
|
+ }
|
|
arr.push(obj);
|
|
arr.push(obj);
|
|
- })
|
|
|
|
- // 回到顶部
|
|
|
|
|
|
+ });
|
|
|
|
+ // 回到顶部
|
|
settlementList.value = arr;
|
|
settlementList.value = arr;
|
|
- })
|
|
|
|
|
|
+ });
|
|
});
|
|
});
|
|
-}
|
|
|
|
|
|
+};
|
|
getSettlementList();
|
|
getSettlementList();
|
|
function handleChangePagination() {
|
|
function handleChangePagination() {
|
|
getSettlementList();
|
|
getSettlementList();
|
|
-}
|
|
|
|
|
|
+}
|
|
function goEdit(item) {
|
|
function goEdit(item) {
|
|
router.push({
|
|
router.push({
|
|
path: 'pages/settlement/form',
|
|
path: 'pages/settlement/form',
|
|
query: { filedsData: JSON.stringify(item || '[]'), formKey: formKey.value },
|
|
query: { filedsData: JSON.stringify(item || '[]'), formKey: formKey.value },
|
|
});
|
|
});
|
|
-}
|
|
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
-
|
|
|
|
|
|
+
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
.search-type {
|
|
.search-type {
|
|
position: relative;
|
|
position: relative;
|