| | |
| | | window.open(src, "_blank"); |
| | | }; |
| | | Vue.prototype.endpoint = "https://lmk-1356772813.cos.ap-chengdu.myqcloud.com" |
| | | Vue.prototype.QRcodeBaseUrl = "https://myk.9village.cn" |
| | | Vue.prototype.QRcodeBaseUrl = "https://www.meiyikuang.com" |
| | | Vue.prototype.wapLinkTo = function (goodsId, skuId) { |
| | | // app端二维码 |
| | | if (skuId) { |
| | |
| | | <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> |
| | |
| | | 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"; |
| | | export default { |
| | | name: "orderList", |
| | | components: { |
| | | "download-excel": JsonExcel, |
| | | ossManage, |
| | | multipleMap, |
| | | "vue-qr": vueQr, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | ) |
| | | ); |
| | | } |
| | | // 根据订单状态为'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); |
| | | }, |
| | |
| | | options: [], |
| | | titleColor:'#333', // 默认标题颜色 |
| | | submitDisabled:false, |
| | | QRCodeUrl:'', |
| | | showGeneralQrCode:false, |
| | | codeLoading:false, |
| | | }; |
| | | }, |
| | | methods: { |
| | | closeGeneralQrCode(){ |
| | | this.showGeneralQrCode = false; |
| | | }, |
| | | handlerEditorQrcode(row){ |
| | | this.QRCodeUrl = ''; |
| | | this.showGeneralQrCode = true |
| | | this.codeLoading = true; |
| | | |
| | | //获得商品对应的第一个skuid |
| | | this.codeLoading = false; |
| | | this.QRCodeUrl = this.QRcodeBaseUrl+ '/scanpage/editOrderAddress'+'?orderSn='+row.sn |
| | | console.log(this.QRCodeUrl); |
| | | |
| | | }, |
| | | // 选中的图片 |
| | | callbackSelected(val) { |
| | | console.log(val) |
| | |
| | | type: "PHYSICAL_GOODS", |
| | | check: false, |
| | | }, |
| | | // { |
| | | // title: "虚拟商品", |
| | | // img: require("@/assets/goodsType2.png"), |
| | | // desc: "虚拟核验,无需物流", |
| | | // type: "VIRTUAL_GOODS", |
| | | // check: false, |
| | | // }, |
| | | { |
| | | title: "虚拟商品", |
| | | img: require("@/assets/goodsType2.png"), |
| | | desc: "虚拟核验,无需物流", |
| | | type: "VIRTUAL_GOODS", |
| | | check: false, |
| | | }, |
| | | // { |
| | | // title: "商品模板导入", |
| | | // img: require("@/assets/goodsTypeTpl.png"), |
| | |
| | | </div> |
| | | </vuedraggable> |
| | | <!-- todo 3--> |
| | | <Upload ref="uploadSku" action="-" |
| | | <Upload ref="uploadSku" :action="uploadFileUrl" |
| | | v-if="val.images < 1" |
| | | :before-upload="handleBeforeUpload" |
| | | :format="['jpg', 'jpeg', 'png', 'webp']" |
| | | :max-size="2048" |
| | | :headers="{ ...accessToken }" |
| | | :on-error="() => { $Spin.hide(); }" |
| | | :on-exceeded-size="handleMaxSize" |
| | | :on-format-error="handleFormatError" |
| | |
| | | } |
| | | }, |
| | | // sku图片上传前钩子 |
| | | // async handleBeforeUpload(file) { |
| | | // const check = |
| | | // this.selectedSku.images !== undefined && |
| | | // this.selectedSku.images.length > 5; |
| | | // if (check) { |
| | | // this.$Notice.warning({title: "图片数量不能大于五张"}); |
| | | // return false; |
| | | // } |
| | | // }, |
| | | // sku图片上传前钩子 |
| | | async handleBeforeUpload(file) { |
| | | const check = |
| | | this.selectedSku.images !== undefined && |
| | |
| | | this.$Message.error("已存在相同规格项!"); |
| | | return; |
| | | } |
| | | if (this.zz(0, val) > 20) { |
| | | this.$Message.error("规格值最多十个字符长度!"); |
| | | if (this.zz(0, val) > 30) { |
| | | this.$Message.error("规格值最多十五个字符长度!"); |
| | | // val = val.toString().slice(0, 4); |
| | | this.skuInfo[index].name = this.countCharacters(val, 10); |
| | | this.$forceUpdate();// 调用该方法会触发组件的重新渲染 |
| | |
| | | if (val.value === '') { |
| | | return; |
| | | } |
| | | if (this.zz(0, val.value) > 20) { |
| | | this.$Message.error("规格值最多十个字符长度!"); |
| | | if (this.zz(0, val.value) > 30) { |
| | | this.$Message.error("规格值最多十五个字符长度!"); |
| | | // val.value = val.value.toString().slice(0, 4); |
| | | this.skuInfo[$index].spec_values[index].value = this.countCharacters(val.value, 10); |
| | | this.$forceUpdate();// 调用该方法会触发组件的重新渲染 |
| | |
| | | this.categoryId = cateId[2]; |
| | | this.baseInfoForm.categoryPath = cateId.toString(); |
| | | this.baseInfoForm.goodsType = this.firstData.goodsType; |
| | | |
| | | |
| | | |
| | | |
| | | if (this.categoryId!=null && this.categoryId!=='') { |