diff --git a/package-lock.json b/package-lock.json index 4460a20..b970884 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "dependencies": { "@dataview/datav-vue3": "^0.0.0-test.1672506674342", "@jiaminghi/data-view": "^2.10.0", + "@vuepic/vue-datepicker": "^7.4.0", "amfe-flexible": "^2.2.1", "axios": "^1.6.2", "echarts": "^5.4.3", @@ -1384,6 +1385,21 @@ "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.3.8.tgz", "integrity": "sha512-8PGwybFwM4x8pcfgqEQFy70NaQxASvOC5DJwLQfpArw1UDfUXrJkdxD3BhVTMS+0Lef/TU7YO0Jvr0jJY8T+mw==" }, + "node_modules/@vuepic/vue-datepicker": { + "version": "7.4.0", + "resolved": "https://registry.npmmirror.com/@vuepic/vue-datepicker/-/vue-datepicker-7.4.0.tgz", + "integrity": "sha512-dXYzbcnRet9b+Dkh+f8rhMnjj5QXgejJTQp+ZRALgwP2oeli2c8e4VvJ0NVxoc7QTU8D5x5Et8NP51C450Pkvg==", + "dependencies": { + "date-fns": "^2.30.0", + "date-fns-tz": "^1.3.7" + }, + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "vue": ">=3.2.0" + } + }, "node_modules/@vueuse/core": { "version": "9.13.0", "resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-9.13.0.tgz", @@ -1899,6 +1915,25 @@ "resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.1.2.tgz", "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" }, + "node_modules/date-fns": { + "version": "2.30.0", + "resolved": "https://registry.npmmirror.com/date-fns/-/date-fns-2.30.0.tgz", + "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", + "dependencies": { + "@babel/runtime": "^7.21.0" + }, + "engines": { + "node": ">=0.11" + } + }, + "node_modules/date-fns-tz": { + "version": "1.3.8", + "resolved": "https://registry.npmmirror.com/date-fns-tz/-/date-fns-tz-1.3.8.tgz", + "integrity": "sha512-qwNXUFtMHTTU6CFSFjoJ80W8Fzzp24LntbjFFBgL/faqds4e5mo9mftoRLgr3Vi1trISsg4awSpYVsOQCRnapQ==", + "peerDependencies": { + "date-fns": ">=2.0.0" + } + }, "node_modules/dayjs": { "version": "1.11.10", "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.10.tgz", @@ -3976,6 +4011,15 @@ "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.3.8.tgz", "integrity": "sha512-8PGwybFwM4x8pcfgqEQFy70NaQxASvOC5DJwLQfpArw1UDfUXrJkdxD3BhVTMS+0Lef/TU7YO0Jvr0jJY8T+mw==" }, + "@vuepic/vue-datepicker": { + "version": "7.4.0", + "resolved": "https://registry.npmmirror.com/@vuepic/vue-datepicker/-/vue-datepicker-7.4.0.tgz", + "integrity": "sha512-dXYzbcnRet9b+Dkh+f8rhMnjj5QXgejJTQp+ZRALgwP2oeli2c8e4VvJ0NVxoc7QTU8D5x5Et8NP51C450Pkvg==", + "requires": { + "date-fns": "^2.30.0", + "date-fns-tz": "^1.3.7" + } + }, "@vueuse/core": { "version": "9.13.0", "resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-9.13.0.tgz", @@ -4414,6 +4458,20 @@ "resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.1.2.tgz", "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" }, + "date-fns": { + "version": "2.30.0", + "resolved": "https://registry.npmmirror.com/date-fns/-/date-fns-2.30.0.tgz", + "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", + "requires": { + "@babel/runtime": "^7.21.0" + } + }, + "date-fns-tz": { + "version": "1.3.8", + "resolved": "https://registry.npmmirror.com/date-fns-tz/-/date-fns-tz-1.3.8.tgz", + "integrity": "sha512-qwNXUFtMHTTU6CFSFjoJ80W8Fzzp24LntbjFFBgL/faqds4e5mo9mftoRLgr3Vi1trISsg4awSpYVsOQCRnapQ==", + "requires": {} + }, "dayjs": { "version": "1.11.10", "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.10.tgz", diff --git a/package.json b/package.json index 0a1f430..a824bc2 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,11 @@ "dependencies": { "@dataview/datav-vue3": "^0.0.0-test.1672506674342", "@jiaminghi/data-view": "^2.10.0", + "@vuepic/vue-datepicker": "^7.4.0", "amfe-flexible": "^2.2.1", "axios": "^1.6.2", "echarts": "^5.4.3", - "element-plus": "^2.4.3", + "element-plus": "^3.2.5", "pinia": "^2.1.7", "postcss-pxtorem": "^5.1.1", "vue": "^3.3.8", diff --git a/src/App.vue b/src/App.vue index f4f9b7b..df93535 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,9 +1,32 @@ + + + + - \ No newline at end of file + \ No newline at end of file diff --git a/src/components/townDetail/topLeft.vue b/src/components/townDetail/topLeft.vue index a2c8523..cf3e0ff 100644 --- a/src/components/townDetail/topLeft.vue +++ b/src/components/townDetail/topLeft.vue @@ -23,16 +23,48 @@ \ No newline at end of file diff --git a/src/main.js b/src/main.js index ce09e00..04c2a96 100644 --- a/src/main.js +++ b/src/main.js @@ -3,8 +3,9 @@ import App from './App.vue' import dataV from '@jiaminghi/data-view' import router from "./router"; import ElementPlus from 'element-plus' - - +import * as ElementPlusIconsVue from '@element-plus/icons-vue' +import VueDatePicker from '@vuepic/vue-datepicker'; +import '@vuepic/vue-datepicker/dist/main.css' import { createPinia } from 'pinia' @@ -14,6 +15,10 @@ import 'element-plus/dist/index.css' import 'amfe-flexible' const pinia = createPinia() const app = createApp(App) +app.component('VueDatePicker', VueDatePicker); +for (const [key, component] of Object.entries(ElementPlusIconsVue)) { + app.component(key, component) +} app.use(router) app.use(dataV) app.use(pinia) diff --git a/src/router/index.js b/src/router/index.js index d756152..d5a2f0b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -62,4 +62,22 @@ const router = createRouter({ routes }) +router.beforeEach(async (to, from, next) => { + + let token = localStorage.getItem("TRADE_USER") + + if (to.name == "login" && token) { + next("/") + return + } + + if (to.name != "login" && !token) { + next("/login") //跳转 + return + } + + next() //放行 +}) + + export default router \ No newline at end of file diff --git a/src/store/index.js b/src/store/index.js index 4e1848e..4393680 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -4,11 +4,19 @@ import { export const areaObj = defineStore('counter', { state: () => ({ - userInfo:{}, + userInfo: {}, + // 普通用户请求的参数 area: { // areaCode: 510524, // streetCode: 51052410 + }, + // 商户请求的参数 + store: { + areaCode: "", + streetCode: "", + mer_id: "" + } }), getters: {}, @@ -16,6 +24,24 @@ export const areaObj = defineStore('counter', { changeArea(obj) { this.area = obj }, - + changeUserInfo(obj) { + this.userInfo = obj + + + if (obj?.user?.merchant) { + let { area_id, mer_id, street_id } = obj.user.merchant + this.store.areaCode = area_id + this.store.streetCode = street_id + this.store.mer_id = mer_id + } + + + + + + + + } + } }) \ No newline at end of file diff --git a/src/view/Businesses.vue b/src/view/Businesses.vue index a5b1bd0..4bfb850 100644 --- a/src/view/Businesses.vue +++ b/src/view/Businesses.vue @@ -24,19 +24,25 @@ import { useRouter } from 'vue-router' import { merchant_listApi } from "@/api.js" import { areaObj } from '@/store/index.js' -const areaStore=areaObj() +const areaStore = areaObj() const route = useRouter() let status = ref(0) +const num = (n) => { + let htmls = '' + for (let i = 0; i < n; i++) { + htmls = htmls.concat('') + } + return htmls +} const changeTable = (num) => { configs.data.splice(0, configs.data.length) - console.log(configs.data) status.value = num merchant_listApi( { - ...areaStore.area, + ...areaStore.area, status: status.value, limit: 50 } @@ -45,15 +51,10 @@ const changeTable = (num) => { }) } -const ShwostoreType = ref(true) -const test = () => { - console.log(6) -} + const hdClick = (e) => { - // console.log(e) if (e.columnIndex == 10) { - // alert(45) route.replace('/storeLogin') } @@ -69,7 +70,7 @@ const addConfigData = (data) => { `
${item.real_name}
`, `
${item.mer_address}
`, `
${item.mark || '--'}
`, - `
${item.is_best}
`, + `
${item.is_best ? "推荐" : "不推荐"}
`, `
${item.create_time}
`, `
${item.margin}
`, `
${item.merchantCategory.category_name}
`, @@ -85,7 +86,7 @@ const addConfigData = (data) => { `
${item.real_name}
`, `
${item.mer_address}
`, `
${item.mark || "--"}
`, - `
${item.is_best}
`, + `
${item.is_best ? "推荐" : "不推荐"}
`, `
${item.create_time}
`, `
${item.margin}
`, `
${item.merchantCategory.category_name}
`, diff --git a/src/view/commodity.vue b/src/view/commodity.vue index 297cf50..bd267f1 100644 --- a/src/view/commodity.vue +++ b/src/view/commodity.vue @@ -12,18 +12,16 @@ v-if="!ShwostoreType">
{{ item.name }}
- +
- +
+ + - -
@@ -35,7 +33,7 @@ import { ref, reactive, onMounted } from "vue" import { getProductCategoryListApi, getProductListApi, product_status_filterApi } from "@/api.js" import { areaObj } from "../store"; -import scrollTable from "@/components/scrollTable.vue" +import scrollTable from "@/components/scrollTable.vue" // 五角星样式,有用 const areaStore = areaObj() @@ -59,14 +57,11 @@ const initProduct = (num) => { type: type.value }).then(res => { - console.log(res.data.list) a(configs2, res.data.list, true) }) } - - let proFilterList = reactive([]) product_status_filterApi({ @@ -99,9 +94,15 @@ const tableClick = (e) => { } } +const num = (n) => { + let htmls = '' + for (let i = 0; i < n; i++) { + htmls = htmls.concat('') + } + return htmls +} const ShwostoreType = ref(true) - const a = (aaa, data, flag) => { if (flag) { @@ -110,17 +111,20 @@ const a = (aaa, data, flag) => { aaa.data.push( [ `
${i + 1}
`, - `
- + `
+
`, `
${item.store_name}
`, `
${item.merchant?.mer_name || '--'}
`, - `
${item.storeCategory?.cate_name || '--'}
`, + `
${item.merchant?.is_trader ? '自营' : '非自营' || '--'}
`, `
${item.price}
`, - `
排序
`, + `
${item.storeCategory?.cate_name || '--'}
`, `
${item.attrValue[0].sales}
`, `
${item.attrValue[0].stock}
`, - `${item.star}`, + `
+ ${num(item.star)} +
`, + `
${item.update_time}
`, ] ) @@ -128,16 +132,24 @@ const a = (aaa, data, flag) => { aaa.data.push( [ `
${i + 1}
`, - `
-
`, + `
+ + +
`, `
${item.store_name}
`, `
${item.merchant.mer_name}
`, - `
${item.storeCategory?.cate_name || '--'}
`, + `
${item.merchant?.is_trader ? '自营' : '非自营' || '--'}
`, `
${item.price}
`, - `
排序
`, + `
${item.storeCategory?.cate_name || "--"}
`, `
${item.attrValue[0].sales}
`, `
${item.attrValue[0].stock}
`, - ` ${item.star}`, + `
+ + ${num(item.star)} + +
`, + + `
${item.update_time}
`, ] ) @@ -154,7 +166,7 @@ const a = (aaa, data, flag) => { `
${i + 1}
`, `
${item.cate_name}
`, `
- +
`, `
${item.is_show ? '显示' : '不显示'}
`, `
${item.is_hot ? '推荐' : '不推荐'}
`, @@ -182,6 +194,7 @@ const a = (aaa, data, flag) => { }) } + // } const configs = reactive({ @@ -252,6 +265,8 @@ onMounted(() => { transform: translate(-50%, -50%); // background-color: #fff; box-sizing: border-box; + // padding-top: 5px; + // transform: translateY(5px); // position: absolute; .content { @@ -279,19 +294,17 @@ onMounted(() => { } .act-btn { - background-image: url('/static/index/actbg.png'); background-size: 100% 100%; border: none; - // border-bottom: 6px solid #BF6D5D - // border-bottom: 6px solid #BF6D5D; + } } .table { width: 100%; height: 75vh; - margin-top: 2vh; + margin-top: 0vh; } } @@ -309,23 +322,37 @@ onMounted(() => { .actmanageBtn { background-image: url('/static/index/actbg2.png'); - // background-size: 100% 100%; } - :deep(.ceil) { padding: 0 !important; margin-bottom: 5px; - margin-right: 2px; } :deep(.header-item) { padding: 0 !important; + // transform: translateY(10px); + } -.sjx {} +[type="radio"] { + -webkit-appearance: none; + width: 20px; + height: 20px; + -webkit-mask: url("data:image/svg+xml,%3Csvg width='12' height='11' viewBox='0 0 12 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 0l1.693 3.67 4.013.476L8.74 6.89l.788 3.964L6 8.88l-3.527 1.974.788-3.964L.294 4.146l4.013-.476L6 0z' fill='%23F67600'/%3E%3C/svg%3E"); + -webkit-mask-size: 20px; + -webkit-mask-repeat: no-repeat; + -webkit-mask-position: center; + background-color: coral; + /*默认是选中的样式,橙色*/ + margin: 0; + transition: .2s; +} -.row {} +[type="radio"]:checked~[type="radio"] { + background-color: #E8EAED; + /*未选中的样式,灰色*/ +} \ No newline at end of file diff --git a/src/view/finance.vue b/src/view/finance.vue index 32bb3d3..c189f4a 100644 --- a/src/view/finance.vue +++ b/src/view/finance.vue @@ -57,15 +57,6 @@ item[1].slice(0, -1) }}元 {{ item[2] }}
-
充值金额: {{ detailData.bill.number @@ -140,7 +131,7 @@ import { useRouter } from 'vue-router' import Bill from "@/components/Bill.vue" import { financial_record_titleApi, financial_recordApi, financial_record_detailApi, financial_record_detailApi2, bill_listApi, withdraw_listApi } from "@/api.js" import { areaObj } from '@/store/index.js' -const areaStore=areaObj() +const areaStore = areaObj() @@ -223,12 +214,21 @@ const billList = reactive([ num: 1245 }, ]) +const testList = [ + + { + uid: "sadsa", + nickname: "sdasd", + number: 44212, + title: "asasa", + mark: "assdfjhdsjh", + create_time: '2020-12-10' + } +] financial_record_titleApi( { ...areaStore.area - - } ).then(res => { @@ -244,8 +244,7 @@ const changeTable = (type, num) => { configs.data.splice(0, configs.data.length) withdraw_listApi( { - areaCode: 510524, - streetCode: 510524100, + ...areaStore.area, limit: 50, } ).then(res => { @@ -256,20 +255,22 @@ const changeTable = (type, num) => { configs1.data.splice(0, configs1.data.length) bill_listApi( { - areaCode: 510524, - streetCode: 510524100, + ...areaStore.area, + limit: 50, } ).then(res => { addDta(res.data.list) + // addDta(testList) + }) } if (type == 2) { configs2.data.splice(0, configs2.data.length) financial_recordApi({ - areaCode: 510524, - streetCode: 510524100, + ...areaStore.area, + limit: 50, type: num }).then(res => { @@ -281,43 +282,68 @@ const changeTable = (type, num) => { headerIndex.value = type addConfigHead() - // a(configList[headerIndex.value], congigData[headerIndex.value]) } const hdClick = (e) => { if (e.columnIndex == 10) { - // route.push('/storeLogin') } } +const extractTypeFn = (type) => { + if (type == 0) return "银行卡" + if (type == 1) return "支付宝" + if (type == 2) return "微信" + if (type == 3) return "零钱" +} +const statusFn = (type) => { + if (type == -1) return "未通过" + if (type == 0) return "审核中" + if (type == 1) return "已提现" +} const addDta = (data) => { data.reverse().forEach((item, i) => { if (headerIndex.value == 0) { if (i % 2 == 0) { - configs1.data.push( + configs.data.push( [ `
${i + 1}
`, - `
${i + 1}
`, + `
+ +
`, `
${item.real_name}
`, - `
${item.number}
`, - `
${item.title}
`, - `
${item.mark}
`, - `
${item.create_time}
`, + `
${item.uid}
`, + `
${item.real_name}
`, + `
${item.extract_price}
`, + `
${extractTypeFn(item.extract_type)}
`, + `
${"--"}
`, + `
${item.bank_code}
`, + `
${statusFn(item.status)}
`, + `
${item.fail_msg || '--'}
`, + `
${item.create_time || '--'}
`, + ], ) } else { - configs1.data.push( + configs.data.push( [`
${item.uid}
`, - `
${item.nickname}
`, - `
${item.number}
`, - `
${item.title}
`, - `
${item.mark}
`, - `
${item.create_time}
`, + `
+ +
`, + `
${item.real_name}
`, + `
${item.uid}
`, + `
${item.real_name}
`, + `
${item.extract_price}
`, + `
${extractTypeFn(item.extract_type)}
`, + `
${"--"}
`, + `
${item.bank_code}
`, + `
${statusFn(item.status)}
`, + `
${item.fail_msg || '--'}
`, + `
${item.create_time || '--'}
`, ] ) @@ -445,7 +471,6 @@ const addConfigHead = () => { }) - } @@ -461,7 +486,7 @@ const hdClick3 = (e) => { if (billType.value == 1) { financial_record_detailApi( - { areaCode: 510524, streetCode: 510524100, date: billData[e.rowIndex].time } + { ...areaStore.area, date: billData[e.rowIndex].time } ).then(res => { for (let key in res.data) { @@ -472,7 +497,7 @@ const hdClick3 = (e) => { } if (billType.value == 2) { financial_record_detailApi2( - { areaCode: 510524, streetCode: 510524100, date: billData[e.rowIndex].time } + { ...areaStore.area, date: billData[e.rowIndex].time } ).then(res => { for (let key in res.data) { @@ -494,8 +519,7 @@ onMounted(() => { changeTable(0) addConfigHead() financial_recordApi({ - areaCode: 510524, - streetCode: 510524100, + ...areaStore.area, limit: 50 }).then(res => { addDta(res.data.list) diff --git a/src/view/index.vue b/src/view/index.vue index 5872005..9976ca6 100644 --- a/src/view/index.vue +++ b/src/view/index.vue @@ -34,14 +34,23 @@ import bottomLeft from "@/components/index/bottomLeft.vue" import bottomCenter from "@/components/index/bottomCenter.vue" import bottomRight from "@/components/index/bottomRight.vue" import { areaObj } from '@/store/index.js' +import { useRouter } from "vue-router" +const router = useRouter() + + + + + + const areaStore = areaObj() +console.log(areaStore.areaCodes, 45454) + const areaCodes = reactive({ ...areaStore.area }) -console.log(areaCodes,44545) const loading = ref(false) diff --git a/src/view/login.vue b/src/view/login.vue index 04708c2..c3b0142 100644 --- a/src/view/login.vue +++ b/src/view/login.vue @@ -2,15 +2,27 @@ @@ -42,11 +33,7 @@ import { ref, reactive, onMounted } from "vue" import Bill from "@/components/Bill.vue" import { order_listApi, order_list_count_titleApi, refund_order_listApi, take_order_listApi, take_order_count_titleApi } from "@/api.js" import { areaObj } from "../store"; -const areaStore=areaObj() - - -const value = ref(1) - +const areaStore = areaObj() const billList = reactive([ { icon: "DD", @@ -64,7 +51,6 @@ const billList = reactive([ }, ]) - const billList1 = reactive([ { icon: "WX", @@ -83,6 +69,26 @@ const billList1 = reactive([ ]) +const statusMap = (num) => { + + // const statusMap = { + // '0': '待审核', + // '-1': '审核未通过', + // '1': '待退货', + // '2': '待收货', + // '3': '已退款' + // } + if (num == 0) return '待审核'; + if (num == 1) return '待退货'; + if (num == 2) return '待收货'; + if (num == 3) return '已退款'; + + + if (num == -1) return '审核未通过'; + + +} + const orderStatus = (status) => { if (status == 0) return "待发货" @@ -94,7 +100,6 @@ const orderStatus = (status) => { if (status == 11) return "尾款超时未付" if (status == -1) return "已退款" } - const payType = (type) => { if (type == 0) return "余额支付" if (type == 1) return "微信支付" @@ -106,8 +111,24 @@ const payType = (type) => { if (type == 8) return "信用购-先货后款" } - - +const refundStatusFn = (item) => { + // + // 待付款 + // + // {{ scope.row.order.status | orderStatusFilter }} + // {{ scope.row.order.status | takeOrderStatusFilter }} + // + // + // 已删除 + if (item.order.is_del == 0) { + if (item.order.paid == 0) return "待付款" + else { + if (item.order.order_type == 0 || item.order.order_type === 2) return orderStatus(item.order.status) + else return statusMap(item.order.status) + } + } + else return '已删除' +} const btnFlag = reactive([true, false, false]) const hdClick = (i) => { btnFlag.forEach((item, index) => { @@ -121,7 +142,7 @@ const hdClick = (i) => { configs.data.splice(0, configs.data.length) order_listApi( { - ...areaStore.area, + ...areaStore.area, limit: 50 } ).then(res => { @@ -129,8 +150,7 @@ const hdClick = (i) => { }) order_list_count_titleApi( { - areaCode: 510524, - streetCode: 510524100, + ...areaStore.area, limit: 50 } ).then(res => { @@ -145,8 +165,7 @@ const hdClick = (i) => { refund_order_listApi( { - areaCode: 510524, - streetCode: 510524100, + ...areaStore.area, limit: 50 } ).then(res => { @@ -158,8 +177,7 @@ const hdClick = (i) => { configs3.data.splice(0, configs.data.length) take_order_listApi( { - areaCode: 510524, - streetCode: 510524100, + ...areaStore.area, limit: 50 } ).then(res => { @@ -168,8 +186,7 @@ const hdClick = (i) => { take_order_count_titleApi( { - areaCode: 510524, - streetCode: 510524100, + ...areaStore.area, limit: 50 } ).then(res => { @@ -185,7 +202,6 @@ const hdClick = (i) => { } - const tableHdClick = (e) => { if (e.ceil) { if (e.columnIndex == 0) { @@ -194,8 +210,7 @@ const tableHdClick = (e) => { let tag2 = document.getElementById(`card${e.rowIndex}`) tag.style.display = 'none' tag2.style.display = 'block' - console.log(tag.style.display) - console.log(tag2.style.display) + } else { let tag = document.getElementsByClassName(`order`) @@ -205,8 +220,6 @@ const tableHdClick = (e) => { tag2[i].style.display = 'none' } - console.log(tag[0].style.display) - console.log(tag2[0].style.display) } @@ -257,29 +270,29 @@ const addConfigData = (data) => {
订单类型 - 2023.11.214 + ${item.order_type ? "自提" : "普通"}
用户备注 - 2023.11.214 + ${item.remark || '--'}
商家备注 - 2023.11.214 + ${item.admin_mark || '--'}
`, `
${item.real_name}
`, `
${item.user.nickname}
`, - `
排序
`, `
${item.merchant.mer_name}
`, + `
${item.merchant.is_trader ? '自营' : '非自营'}
`, `
${item.orderProduct[0].cart_info.product.store_name} - ${item.orderProduct[0].cart_info.product.unit_name} + ${item.orderProduct[0].product_num}${item.orderProduct[0].cart_info.product.unit_name}
`, `
${item.cost}
`, `
${orderStatus(item.status)}
`, @@ -309,34 +322,34 @@ const addConfigData = (data) => {
总单号: - 35356565656565 + ${item.groupOrder.group_order_sn}
下单时间 - 2023.11.214 + ${item.pay_time}
商品总价 - 2023.11.214 + ${item.total_price}
订单类型 - 2023.11.214 + ${item.order_type ? "自提" : "普通"}
用户备注 - 2023.11.214 + ${item.remark || '--'}
商家备注 - 2023.11.214 + ${item.admin_mark || '--'}
@@ -346,12 +359,15 @@ const addConfigData = (data) => { `, `
${item.real_name}
`, `
${item.user.nickname}
`, - `
排序
`, `
${item.merchant.mer_name}
`, - `
+ `
${item.merchant.is_trader ? '自营' : '非自营'}
`, + `
${item.orderProduct[0].cart_info.product.store_name} - ${item.orderProduct[0].cart_info.product.unit_name} + + + + ${item.orderProduct[0].product_num}${item.orderProduct[0].cart_info.product.unit_name} @@ -372,8 +388,6 @@ const addConfigData = (data) => { }) - - } const addConfigData2 = (data) => { data.forEach((item, i) => { @@ -401,34 +415,34 @@ const addConfigData2 = (data) => {
总单号: - 35356565656565 + ${item.order.order_sn}
- 下单时间 - ${item.pay_time} + 申请退款时间 + ${item.create_time}
- 商品总价 - 2023.11.214 + 退款商品总价 + ${item.refundProduct[0].refund_price}
- 订单类型 - 2023.11.214 + 退款商品总数 + ${item.refundProduct[0].refund_num}
用户备注 - 2023.11.214 + ${item.admin_mark || '--'}
商家备注 - 2023.11.214 + ${item.mer_mark || '--'}
@@ -436,23 +450,23 @@ const addConfigData2 = (data) => {
`, - `
排sd序
`, - `
排序
`, - `
排序
`, - `
排序
`, + `
${item.user.nickname}
`, + `
${item.merchant.mer_name}
`, + `
${item.merchant.is_trader ? '自营' : '非自营'}
`, + `
${item.mer_delivery_address || '--'}
`, `
${item.refund_price}
`, - `
+ `
${item.refundProduct[0].product.cart_info.product.store_name} - ${item.refundProduct[0].product.cart_info.product.unit_name} + ${item.refundProduct[0].product.product_num} ${item.refundProduct[0].product.cart_info.product.unit_name}
`, `
- ${item.status} + ${statusMap(item.status) || ''} 退款原因: ${item.refund_message} 状态变更时间 ${item.status_time} @@ -478,51 +492,51 @@ const addConfigData2 = (data) => { '>
${item.refund_order_sn}
- - -
`, - `
排sd序
`, - `
排序
`, - `
排序
`, - `
排序
`, + + `, + `
${item.user.nickname}
`, + `
${item.merchant.mer_name}
`, + `
${item.merchant.is_trader ? '自营' : '非自营'}
`, + `
${item.mer_delivery_address || '--'}
`, `
${item.refund_price}
`, `
@@ -530,11 +544,15 @@ const addConfigData2 = (data) => { ${item.refundProduct[0].product.cart_info.product.store_name} - ${item.refundProduct[0].product.cart_info.product.unit_name} + ${item.refundProduct[0].product.product_num} ${item.refundProduct[0].product.cart_info.product.unit_name} +
`, `
- ${item.status} + + + + ${statusMap(item.status) || ''} 退款原因: ${item.refund_message} 状态变更时间 ${item.status_time} @@ -573,7 +591,7 @@ const addConfigData3 = (data) => { top:50%; left:0 '> -
${item.order_sn} + ${item.groupOrder.group_order_sn} `, `
核销订单
`, - `
排序
`, - `
排序
`, - `
排序
`, - `
${item.refund_price}
`, - `
排序
`, - `
- ${item.status} - 退款原因: ${item.refund_message} - 状态变更时间 ${item.status_tiem} + `
${item.user_address}
`, + `
${item.real_name}
`, + `
${item.merchant.mer_name}
`, + `
${item.merchant.is_trader ? '自营' : '非自营'}
`, + `
+ + ${item.orderProduct[0].cart_info.product.store_name} + + + + ${item.orderProduct[0].product_num}${item.orderProduct[0].cart_info.product.unit_name} + + + +
`, - `
排序
`, - `
排序
`, + `
+ ${item.pay_price} +
`, + `
${item.real_name}
`, + `
${item.status == -1 ? "已退款" : "已核销"}
`, ] ) @@ -647,58 +670,64 @@ const addConfigData3 = (data) => { left:0 '>
${item.order_sn} - `, `
核销订单
`, - `
排序
`, - `
排序
`, - `
排序
`, - `
排序
`, - `
排序
`, - `
${item.status} - 退款原因: ${item.refund_message} - 状态变更时间 ${item.status_tiem}
`, - `
排序
`, - `
排序
`, + `
${item.user_address}
`, + `
${item.real_name}
`, + `
${item.merchant.mer_name}
`, + `
${item.merchant.is_trader ? '自营' : '非自营'}
`, + `
+ + ${item.orderProduct[0].cart_info.product.store_name} + + + + ${item.orderProduct[0].product_num}${item.orderProduct[0].cart_info.product.unit_name} + + + + +
`, + `
${item.pay_price} +
`, + `
${item.real_name}
`, + `
${item.status == -1 ? "已退款" : "已核销"}
`, ] @@ -722,13 +751,13 @@ const configs = reactive({ evenRowBGC: "", rowNum: 20, - columnWidth: [250, 170, 170, 170, 170, 500, 170, 170, 170, 200], + columnWidth: [250, 170, 170, 170, 170, 500, 100, 100, 330, 100], header: [ `
订单编号
`, `
用户信息
`, `
收货人/订购人
`, `
商户名称
`, - `
商户分类
`, + `
商户类别
`, `
商品信息
`, `
实际支付
`, `
订单状态
`, @@ -749,8 +778,8 @@ const configs2 = reactive({ header: [ `
订单编号
`, `
用户信息
`, - `
商户名称
`, - `
商户分类
`, + `
商户名别
`, + `
商户类别
`, `
订单属地
`, `
退款金额
`, `
商品信息
`, @@ -768,11 +797,11 @@ const configs3 = reactive({ rowNum: 20, header: [ `
订单编号
`, - `
订单类型
`, + `
订单类别
`, `
订单属地
`, `
收货人
`, `
商户名称
`, - `
商户分类
`, + `
商户类别
`, `
商品信息
`, `
实际支付
`, `
核销员
`, @@ -784,7 +813,6 @@ const configs3 = reactive({ onMounted(() => { hdClick(0) - // a(configs) }) diff --git a/src/view/storeLogin.vue b/src/view/storeLogin.vue index 8f7eacf..c545767 100644 --- a/src/view/storeLogin.vue +++ b/src/view/storeLogin.vue @@ -10,16 +10,17 @@
商 品 数 量
NUMBER OF COMMODITIES
-
1234 +
{{ data.today.productNum }}
-
昨日数据:0.0
+
昨日数据:{{ data.yesterday.productNum }}
-
周环比:0.0
+
周环比:{{ data.lastWeekRate.productNum }}%
@@ -33,16 +34,17 @@
累 计 支 付 金 额
ACCOMULATED PAYMENT AMOUNT
-
1234 +
{{ data.today.payPrice }}
-
昨日数据:0.0
+
昨日数据:{{ data.yesterday.payPrice }}
-
周环比:0.0
+
周环比:{{ data.lastWeekRate.payPrice }}%
@@ -57,16 +59,17 @@
累 计 支 付 人 数
ACCOMULATED NUMBER OF PAYMENTS
-
1234 +
{{ data.today.payUser }}
-
昨日数据:0.0
+
昨日数据:{{ data.yesterday.payUser }}
-
周环比:0.0
+
周环比:{{ data.lastWeekRate.payUser }}%
@@ -80,16 +83,17 @@
累 计 访 客 人 数
ACCOMULATED NUMBER OF VISITORS
-
1234 +
{{ data.today.visitNum }}
-
昨日数据:0.0
+
昨日数据:{{ data.yesterday.visitNum }}
-
周环比:0.0
+
周环比:{{ data.lastWeekRate.visitNum }}%
@@ -103,16 +107,17 @@
关 注 店 铺 数 量
NUMBER OF FOLLOWING SHOPS
-
1234 +
{{ data.today.likeStore }}
-
昨日数据:0.0
+
昨日数据:{{ data.yesterday.likeStore }}
-
周环比:0.0
+
周环比:{{ data.lastWeekRate.likeStore }}%
@@ -125,17 +130,17 @@
- +
- +
- +
@@ -144,6 +149,12 @@