From 6dad71cce2a0359c6d23f029ce8b6f6aaf0bb521 Mon Sep 17 00:00:00 2001 From: zxl <763096477@qq.com> Date: 星期一, 22 九月 2025 17:46:31 +0800 Subject: [PATCH] 订单列表 --- manager/src/views/order/order/orderList.vue | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 108 insertions(+), 12 deletions(-) diff --git a/manager/src/views/order/order/orderList.vue b/manager/src/views/order/order/orderList.vue index 9e37593..083b224 100644 --- a/manager/src/views/order/order/orderList.vue +++ b/manager/src/views/order/order/orderList.vue @@ -18,11 +18,20 @@ style="width: 160px" /> </Form-item> - <Form-item label="浼氬憳鍚嶇О" prop="buyerName"> +<!-- <Form-item label="浼氬憳鍚嶇О" prop="buyerName">--> +<!-- <Input--> +<!-- type="text"--> +<!-- v-model="searchForm.buyerName"--> +<!-- placeholder="璇疯緭鍏ヤ細鍛樺悕绉�"--> +<!-- clearable--> +<!-- style="width: 160px"--> +<!-- />--> +<!-- </Form-item>--> + <Form-item label="浼氬憳鏄电О" prop="nickName"> <Input type="text" - v-model="searchForm.buyerName" - placeholder="璇疯緭鍏ヤ細鍛樺悕绉�" + v-model="searchForm.nickName" + placeholder="璇疯緭鍏ヤ細鍛樻樀绉�" clearable style="width: 160px" /> @@ -42,11 +51,29 @@ <Option value="KANJIA">鐮嶄环璁㈠崟</Option> </Select> </Form-item> + <Form-item label="搴楅摵" prop="store"> + <Select + v-model="searchForm.storeSelectId" + placeholder="璇烽�夋嫨" + clearable + style="width: 160px" + filterable + > + <Option + v-for="store in storeSelectList" + :key="store.id" + :label="store.label" + :value="store.id" + > + {{ store.label }} + </Option> + </Select> + </Form-item> <Form-item label="涓嬪崟鏃堕棿"> <DatePicker v-model="selectDate" type="datetimerange" - format="yyyy-MM-dd" + format="yyyy-MM-dd HH:mm:ss" clearable @on-change="selectDateRange" placeholder="閫夋嫨璧峰鏃堕棿" @@ -190,7 +217,25 @@ <Modal width="1200px" v-model="picModelFlag"> <ossManage @callback="callbackSelected" :isComponent="true" :initialize="picModelFlag" ref="ossManage" /> </Modal> - + <Modal + v-model="showGeneralQrCode" + title="浜岀淮鐮�" + width="800" + :mask-closable="false" + :loading="codeLoading" + > + <vue-qr + :text="QRCodeUrl" + :margin="0" + colorDark="#000" + colorLight="#fff" + :size="150" + ></vue-qr> + <div slot="footer"> + <Button type="text" @click="closeGeneralQrCode">鍏抽棴</Button> + <!-- <Button type="primary" @click="generalQrCode">纭</Button>--> + </div> + </Modal> <multipleMap ref="map" @callback="selectedRegion" /> </Card> </div> @@ -203,15 +248,20 @@ import JsonExcel from "vue-json-excel"; import * as API_Member from "@/api/member.js"; import { getTags } from "@/api/tag.js"; +import vueQr from "vue-qr"; +import {getStoreSelect} from "../../../api/order"; export default { name: "orderList", components: { "download-excel": JsonExcel, ossManage, multipleMap, + "vue-qr": vueQr, }, data() { return { + //涓嬫媺妗嗘暟鎹� + storeSelectList:[], // 琛ㄦ牸鐨勮〃澶翠互鍙婂唴瀹� fields: { 璁㈠崟缂栧彿: "sn", @@ -258,6 +308,7 @@ orderType: "", orderSn: "", buyerName: "", + nickName:"", orderStatus: "", }, selectDate: null, @@ -395,6 +446,7 @@ key: "action", align: "center", width: 150, + fixed:"right", render: (h, params) => { const buttons = []; @@ -433,6 +485,24 @@ ) ); } + // // 鏍规嵁璁㈠崟鐘舵�佷负'PAID'鏃舵樉绀洪澶栨搷浣滄寜閽� + // if (params.row.deliverStatus === 'UNDELIVERED') { + // buttons.push( + // h( + // "Button", + // { + // props: { type: "primary", size: "small" }, + // style: { marginRight: "5px" }, + // on: { + // click: () => { + // this.handlerEditorQrcode(params.row); + // }, + // }, + // }, + // "淇敼鍦板潃浜岀淮鐮�" + // ) + // ); + // } return h('div', buttons); }, @@ -468,9 +538,33 @@ options: [], titleColor:'#333', // 榛樿鏍囬棰滆壊 submitDisabled:false, + QRCodeUrl:'', + showGeneralQrCode:false, + codeLoading:false, }; }, methods: { + getStoreSelect(){ + API_Order.getStoreSelect().then(res =>{ + if (res.result){ + this.storeSelectList = res.result; + } + }) + }, + closeGeneralQrCode(){ + this.showGeneralQrCode = false; + }, + // handlerEditorQrcode(row){ + // this.QRCodeUrl = ''; + // this.showGeneralQrCode = true + // this.codeLoading = true; + // + // //鑾峰緱鍟嗗搧瀵瑰簲鐨勭涓�涓猻kuid + // this.codeLoading = false; + // this.QRCodeUrl = this.QRcodeBaseUrl+ '/scanpage/editOrderAddress'+'?orderSn='+row.sn + // console.log(this.QRCodeUrl); + // + // }, // 閫変腑鐨勫浘鐗� callbackSelected(val) { console.log(val) @@ -641,21 +735,22 @@ deliverOrder(order) { console.log('------------->鑾峰彇璁㈠崟淇℃伅',order); console.log('璁㈠崟sn缂栧彿',order.sn); - // 杩欓噷鍙互璋冪敤鐩稿叧鐨凙PI杩涜鍙戣揣鎿嶄綔 + // 璋冪敤鍙戣揣API API_Order.sendMessage(order.sn).then((res) => { console.log('-------------->',res); if (res.success) { this.$Message.success('鏇存柊鐘舵�佹垚鍔�'); - this.getDataList(); // 鍒锋柊鍒楄〃 + // 寤惰繜5绉掑埛鏂板垪琛╩q娑堟伅鏄紓姝ョ殑鏃犳硶瀹炴椂鍚屾闇�瑕佹墽琛屽欢杩熷埛鏂� + setTimeout(() => { + this.getDataList(); + }, 5000); } else { this.$Message.error('鏇存柊鐘舵�佸け璐�'); } + }).catch((error) => { + console.error('鏇存柊鐘舵�佸け璐�:', error); + this.$Message.error('鏇存柊鐘舵�佸け璐ワ紝璇烽噸璇�'); }); - - // 鏆傛椂妯℃嫙鎿嶄綔 - this.$Message.success(`璁㈠崟 ${order.sn} 鏇存柊鐘舵�佹垚鍔燂紒`); - // 鍒锋柊鍒楄〃鏁版嵁 - this.getDataList(); }, // 瀵煎嚭璁㈠崟 async exportOrder() { @@ -698,6 +793,7 @@ }, mounted() { this.init(); + this.getStoreSelect(); }, }; </script> -- Gitblit v1.8.0