From c1d92e8ac6d3fcca14d10d89511cce860c298996 Mon Sep 17 00:00:00 2001 From: 15820893422 <1978476055@qq.com> Date: Sat, 30 Mar 2024 18:52:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 6 +- src/api/product.js | 22 +- src/components/templatesFrom/index.vue | 6 +- src/utils/newToExcel.js | 350 ++--- src/views/order/index.vue | 186 +-- src/views/product/addProduct/index.vue | 1132 ++++++++++++----- src/views/product/productList/index.vue | 262 ++-- .../systemForm/setSystem/modifyStoreInfo.vue | 388 +++--- 8 files changed, 1434 insertions(+), 918 deletions(-) diff --git a/.env.development b/.env.development index d0dceee..f9e41a6 100644 --- a/.env.development +++ b/.env.development @@ -2,11 +2,11 @@ ENV = 'development' # base api -# VUE_APP_BASE_API = 'http://192.168.31.106:8324' -VUE_APP_BASE_API = 'http://many.shop.lo' +VUE_APP_BASE_API = 'http://192.168.1.32:8080' +# VUE_APP_BASE_API = 'https://plus.hwms.shop' # socket 连接地址 -VUE_APP_WS_URL = 'ws://many.shop.lo' +VUE_APP_WS_URL = 'ws://plus.hwms.shop' # VUE_APP_WS_URL = 'ws://mer1.crmeb.net' # vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable, diff --git a/src/api/product.js b/src/api/product.js index 14d0096..996c156 100644 --- a/src/api/product.js +++ b/src/api/product.js @@ -57,6 +57,12 @@ export function attrCreatApi(data) { export function attrEdittApi(id, data) { return request.post(`store/attr/template/${id}`, data) } +/** + * @description 上传 -- 编辑 + */ +export function httpRequest(data) { + return request.post(`upload/pdf`, data) +} /** * @description 属性规则 -- 删除 */ @@ -528,11 +534,11 @@ export function batchesTempApi(data) { } /** 参数模板 -- 添加 */ export function productSpecs(data) { - return request.post(`store/params/temp/create`,data) + return request.post(`store/params/temp/create`, data) } /** 参数模板 -- 编辑 */ export function specsUpdate(id, data) { - return request.post(`store/params/temp/update/${id}`,data) + return request.post(`store/params/temp/update/${id}`, data) } /** 参数模板 -- 详情 */ export function productSpecsInfo(id) { @@ -552,7 +558,7 @@ export function specsDetailApi(id) { } /** 添加商品 -- 参数筛选 */ export function specsSelectedApi(data) { - return request.get(`store/params/temp/select`,data) + return request.get(`store/params/temp/select`, data) } /** 添加商品 -- 参数筛选详情 */ export function productSpecsDetailApi(data) { @@ -567,7 +573,7 @@ export function productBathSvipApi(data) { return request.post(`store/product/batch_svip`, data) } /** 商品列表 -- 立即生成规格 */ -export function generateAttrApi(id,data) { +export function generateAttrApi(id, data) { return request.post(`store/product/get_attr_value/${id}`, data) } /** 商品列表 -- 系统表单下拉 */ @@ -580,11 +586,11 @@ export function associatedFormInfo(id) { } /** 商品列表 -- 批量设置 */ export function batchSetProduct(data) { - return request.post(`store/product/batch_process`,data) + return request.post(`store/product/batch_process`, data) } /** 商品列表 -- 商品操作记录 */ -export function operateRecordList(id,data) { - return request.get(`store/product/get_operate_list/${id}`,data) +export function operateRecordList(id, data) { + return request.get(`store/product/get_operate_list/${id}`, data) } /** @@ -616,4 +622,4 @@ export function unitDeleteApi(id) { */ export function unitOptionsApi() { return request.get(`product/unit/option`) -} \ No newline at end of file +} diff --git a/src/components/templatesFrom/index.vue b/src/components/templatesFrom/index.vue index c6f0baf..fdc0ee5 100644 --- a/src/components/templatesFrom/index.vue +++ b/src/components/templatesFrom/index.vue @@ -118,7 +118,7 @@ - + 自定义 @@ -126,7 +126,7 @@ 关闭
- (说明: 选择"开启"时, 仅支持上表添加的配送区域) + (说明: 选择"开启"时,仅支持上表添加的可配送区域下单,除此之外的全部区域无法下单)
@@ -482,7 +482,7 @@ export default { } .noBox ::v-deep .el-form-item__content{ margin-left: 0 !important; -} +} .tempBox ::v-deep .el-input-number--mini{ width: 100px !important; } diff --git a/src/utils/newToExcel.js b/src/utils/newToExcel.js index 735e916..ea8e5ff 100644 --- a/src/utils/newToExcel.js +++ b/src/utils/newToExcel.js @@ -8,198 +8,200 @@ // | Author: CRMEB Team // +---------------------------------------------------------------------- -import { isEmpty } from 'element-ui/lib/utils/util'; +import { isEmpty } from 'element-ui/lib/utils/util' import ExcelJS from 'exceljs' import * as FileSaver from 'file-saver' -export default function createWorkBook(header, title, data, foot, filename,sheets){ - const letter = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']; - let lcomun = 1; - let worksheet ; +export default function createWorkBook(header, title, data, foot, filename, sheets) { + const letter = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'] + let lcomun = 1 + let worksheet - const workBook = new ExcelJS.Workbook(); - let long = header.length; + const workBook = new ExcelJS.Workbook() + const long = header.length -/** - * 创建工作薄 - * @param {*} sheets - */ -function createSheets(sheets) { - let sheet = Array.isArray(sheets) ? sheets[0] : sheets; - let style = Array.isArray(sheets) ? sheets[1] : {}; - worksheet = workBook.addWorksheet(sheet,style); -} - -/** - * 设置表名介绍等 - * @param {*} title - * @param {*} long - */ -function setTitle(title,long){ - if (isEmpty(title)) return ; - title = Array.isArray(title) ? title : title.split(','); - for (let i = 0; i < title.length; i++) { - let ti = worksheet.getRow(i + 1); - ti.getCell(1).value = title[i]; - ti.height = 30; - ti.font = {bold: true,size: 20,vertAlign: 'subscript',}; - ti.alignment = { vertical: 'bottom', horizontal: 'center' }; - ti.outlineLevel = 1; - worksheet.mergeCells(i + 1 , 1, i + 1, long) - ti.commit(); - lcomun++; - } -} -/** - * 设置表头行 - * @param {*} header - */ -function setHeader(header){ - if (isEmpty(header)) return ; - const headerRow = worksheet.getRow(lcomun); - for (let index = 1; index <= header.length; index++) { - headerRow.getCell(index).value = header[index - 1]; - } - headerRow.height = 25; - headerRow.width = 50; - headerRow.font = {bold: true, size: 18,vertAlign: 'subscript',}; - headerRow.alignment = { vertical: 'bottom', horizontal: 'center' }; - headerRow.outlineLevel = 1; - headerRow.commit(); - lcomun++; -} - -/** - * 导出内容 - * @param {*} data - */ -function setContent(data){ - if (isEmpty(data)) return ; - for (let h = 0; h < data.length; h++) { - let satarLcomun = lcomun; - let lcomunNow = worksheet.getRow(lcomun); - let hasMerge = false; - let starKey = 0; - let endKey = 0; - /** 循环列 */ - //需要操作第几列 - let sk = 0; - for (let l = 0; l < data[h].length; l++) { - if (Array.isArray(data[h][l])) { - //数组长度 - starKey = sk; - hasMerge = true; - setArrayContent(data[h][l],sk); - sk = sk + data[h][l][0].length - endKey =sk; - } else { - //不是数组 - lcomunNow.getCell(getLetter(sk)).value = data[h][l]; - lcomunNow.getCell(getLetter(sk)).border = {top: {style:'thin'},left: {style:'thin'},bottom: {style:'thin'},right: {style:'thin'}}; - lcomunNow.alignment = { vertical: 'middle', horizontal: 'center' }; - sk++ - } - } - if (hasMerge) setMergeLcomun(satarLcomun, lcomun, starKey, endKey); - lcomunNow.height = 25; - lcomunNow.commit(); - lcomun++ - } -} -/** - * 占多行的数组 - * @param {*} arr - * @param {*} sk - */ -function setArrayContent(arr, sk) { /** - * 循环二维数组,在循环行 - */ - let al = arr.length; - let sl = al - 1 ; - for (let i = 0; i < arr.length; i++ ) { - let lcomunNow = worksheet.getRow(lcomun); - for(let v = 0; v < arr[i].length; v++) { - lcomunNow.getCell(getLetter(sk+v)).value = arr[i][v]; - lcomunNow.getCell(getLetter(sk+v)).border = {top: {style:'thin'},left: {style:'thin'},bottom: {style:'thin'},right: {style:'thin'}}; - lcomunNow.alignment = { vertical: 'middle', horizontal: 'center' }; - } - lcomunNow.height = 25; - lcomunNow.commit() - if (i < sl) lcomun++ + * 创建工作薄 + * @param {*} sheets + */ + function createSheets(sheets) { + const sheet = Array.isArray(sheets) ? sheets[0] : sheets + const style = Array.isArray(sheets) ? sheets[1] : {} + worksheet = workBook.addWorksheet(sheet, style) } -} -/** - * 合并操作 - * @param {*} satarLcomun - * @param {*} endLcomun - * @param {*} starKey - * @param {*} endKey - */ -function setMergeLcomun(satarLcomun, endLcomun, starKey, endKey){ - for(let ml = 0 ; ml < long ; ml++ ){ - if (ml < starKey || ml >= endKey) { - worksheet.mergeCells(getLetter(ml) + satarLcomun +':'+getLetter(ml) + endLcomun) - } - } -} -/** - * 设置表末尾统计备注等 - * @param {*} footData + /** + * 设置表名介绍等 + * @param {*} title + * @param {*} long */ -function setFoot(footData){ - if (isEmpty(footData)) return ; - if (Array.isArray(footData)) { - for (let f = 0; f < footData.length; f++) { - let lcomunNow = worksheet.getRow(lcomun); - lcomunNow.getCell(1).value = footData[f]; - lcomunNow.getCell(1).border = {top: {style:'thin'},left: {style:'thin'},bottom: {style:'thin'},right: {style:'thin'}}; - lcomunNow.alignment = { vertical: 'middle', horizontal: 'left' }; - worksheet.mergeCells('A' + lcomun +':'+getLetter(long-1) + lcomun) + function setTitle(title, long) { + if (isEmpty(title)) return + title = Array.isArray(title) ? title : title.split(',') + for (let i = 0; i < title.length; i++) { + const ti = worksheet.getRow(i + 1) + ti.getCell(1).value = title[i] + ti.height = 30 + ti.font = { bold: true, size: 20, vertAlign: 'subscript' } + ti.alignment = { vertical: 'bottom', horizontal: 'center' } + ti.outlineLevel = 1 + worksheet.mergeCells(i + 1, 1, i + 1, long) + ti.commit() lcomun++ } - } else { - let lcomunNow = worksheet.getRow(lcomun); - lcomunNow.getCell(1).value = footData[f]; - lcomunNow.getCell(1).border = {top: {style:'thin'},left: {style:'thin'},bottom: {style:'thin'},right: {style:'thin'}}; - lcomunNow.alignment = { vertical: 'middle', horizontal: 'left' }; - worksheet.mergeCells('A' + lcomun +':'+getLetter(long-1) + lcomun) } -} + /** + * 设置表头行 + * @param {*} header + */ + function setHeader(header) { + if (isEmpty(header)) return + const headerRow = worksheet.getRow(lcomun) + for (let index = 1; index <= header.length; index++) { + headerRow.getCell(index).value = header[index - 1] + } + headerRow.height = 25 + headerRow.width = 50 + headerRow.font = { bold: true, size: 18, vertAlign: 'subscript' } + headerRow.alignment = { vertical: 'bottom', horizontal: 'center' } + headerRow.outlineLevel = 1 + headerRow.commit() + lcomun++ + } -/** + /** + * 导出内容 + * @param {*} data + */ + function setContent(data) { + if (isEmpty(data)) return + for (let h = 0; h < data.length; h++) { + const satarLcomun = lcomun + const lcomunNow = worksheet.getRow(lcomun) + let hasMerge = false + let starKey = 0 + let endKey = 0 + /** 循环列 */ + // 需要操作第几列 + let sk = 0 + for (let l = 0; l < data[h].length; l++) { + if (Array.isArray(data[h][l])) { + // 数组长度 + starKey = sk + hasMerge = true + setArrayContent(data[h][l], sk) + // console.log(data[h][l][0].length) + if (data[h][l][0]) { + sk = sk + data[h][l][0].length + } + endKey = sk + } else { + // 不是数组 + lcomunNow.getCell(getLetter(sk)).value = data[h][l] + lcomunNow.getCell(getLetter(sk)).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } } + lcomunNow.alignment = { vertical: 'middle', horizontal: 'center' } + sk++ + } + } + if (hasMerge) setMergeLcomun(satarLcomun, lcomun, starKey, endKey) + lcomunNow.height = 25 + lcomunNow.commit() + lcomun++ + } + } + /** + * 占多行的数组 + * @param {*} arr + * @param {*} sk + */ + function setArrayContent(arr, sk) { + /** + * 循环二维数组,在循环行 + */ + const al = arr.length + const sl = al - 1 + for (let i = 0; i < arr.length; i++) { + const lcomunNow = worksheet.getRow(lcomun) + for (let v = 0; v < arr[i].length; v++) { + lcomunNow.getCell(getLetter(sk + v)).value = arr[i][v] + lcomunNow.getCell(getLetter(sk + v)).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } } + lcomunNow.alignment = { vertical: 'middle', horizontal: 'center' } + } + lcomunNow.height = 25 + lcomunNow.commit() + if (i < sl) lcomun++ + } + } + /** + * 合并操作 + * @param {*} satarLcomun + * @param {*} endLcomun + * @param {*} starKey + * @param {*} endKey + */ + function setMergeLcomun(satarLcomun, endLcomun, starKey, endKey) { + for (let ml = 0; ml < long; ml++) { + if (ml < starKey || ml >= endKey) { + worksheet.mergeCells(getLetter(ml) + satarLcomun + ':' + getLetter(ml) + endLcomun) + } + } + } + + /** + * 设置表末尾统计备注等 + * @param {*} footData + */ + function setFoot(footData) { + if (isEmpty(footData)) return + if (Array.isArray(footData)) { + for (let f = 0; f < footData.length; f++) { + const lcomunNow = worksheet.getRow(lcomun) + lcomunNow.getCell(1).value = footData[f] + lcomunNow.getCell(1).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } } + lcomunNow.alignment = { vertical: 'middle', horizontal: 'left' } + worksheet.mergeCells('A' + lcomun + ':' + getLetter(long - 1) + lcomun) + lcomun++ + } + } else { + const lcomunNow = worksheet.getRow(lcomun) + lcomunNow.getCell(1).value = footData[f] + lcomunNow.getCell(1).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } } + lcomunNow.alignment = { vertical: 'middle', horizontal: 'left' } + worksheet.mergeCells('A' + lcomun + ':' + getLetter(long - 1) + lcomun) + } + } + + /** * 处理超过26个字母的列 - * @param {*} number - * @returns + * @param {*} number + * @returns */ -function getLetter(number){ - if (number < 26) { - return letter[number]; - } else { - let n = number % 26 - let l = Math.floor(number % 26) - return letter[l]+letter[n] + function getLetter(number) { + if (number < 26) { + return letter[number] + } else { + const n = number % 26 + const l = Math.floor(number % 26) + return letter[l] + letter[n] + } } -} -/** + /** * 导出下载 - * @param {*} filename + * @param {*} filename */ -function saveAndDowloade(filename){ - if (!filename) filename = new Date().getTime(); - workBook.xlsx.writeBuffer().then(data => { - const blob = new Blob([data], {type: 'application/octet-stream'}) - FileSaver.saveAs(blob, filename + '.xlsx') - }) -} - - createSheets(sheets); - setTitle(title,long); - setHeader(header); - setContent(data); - setFoot(foot); - saveAndDowloade(filename); + function saveAndDowloade(filename) { + if (!filename) filename = new Date().getTime() + workBook.xlsx.writeBuffer().then(data => { + const blob = new Blob([data], { type: 'application/octet-stream' }) + FileSaver.saveAs(blob, filename + '.xlsx') + }) + } + createSheets(sheets) + setTitle(title, long) + setHeader(header) + setContent(data) + setFoot(foot) + saveAndDowloade(filename) } diff --git a/src/views/order/index.vue b/src/views/order/index.vue index 2bbeb7d..06344f2 100644 --- a/src/views/order/index.vue +++ b/src/views/order/index.vue @@ -1,7 +1,7 @@ - + @@ -277,7 +277,7 @@ 手动发货 - {{orderType == 1 ? '虚拟发货' : '无需物流'}} + {{ orderType == 1 ? '虚拟发货' : '无需物流' }} 电子面单打印 自己配送 同城配送 @@ -300,8 +300,8 @@ - - + + @@ -376,32 +376,32 @@ :row-key="(row) => { return row.product_id }" @selection-change="handleSelectionChange" > - + - + - + - 取 消 + 取 消 提交 @@ -433,15 +433,15 @@ + /> @@ -482,11 +482,11 @@ import { expressLst, exprTempsLst, getEleTempData, - getDeliveryStoreLst, + getDeliveryStoreLst } from '@/api/order' import createWorkBook from '@/utils/newToExcel.js' import { serveInfoApi } from '@/api/setting' -import orderDetail from './orderDetails.vue'; +import orderDetail from './orderDetails.vue' import fileList from '@/components/exportFile/fileList' import deliveryRecord from '@/components/deliveryRecord/index' import orderCancellate from './orderCancellate' @@ -495,9 +495,9 @@ import cardsData from '@/components/cards/index' import { getToken } from '@/utils/auth' import SettingMer from '@/libs/settingMer' import { roterPre } from '@/settings' -import timeOptions from '@/utils/timeOptions'; -//修改引入打印扩展 -import printJS from 'print-js'; +import timeOptions from '@/utils/timeOptions' +// 修改引入打印扩展 +import printJS from 'print-js' export default { components: { orderDetail, @@ -533,7 +533,7 @@ export default { type: this.$route.query.order_type || '1', username: '', filter_delivery: '', - filter_product : '', + filter_product: '', pay_type: '', order_id: this.$route.query.id ? this.$route.query.id : '', activity_type: '' @@ -551,12 +551,12 @@ export default { { value: 4, label: '核销订单' }, { value: 3, label: '虚拟发货' }, { value: 6, label: '自动发货' } - ], //发货方式 + ], // 发货方式 productTypeList: [ { value: 1, label: '实物商品' }, { value: 2, label: '虚拟商品' }, { value: 3, label: '卡密商品' } - ], //商品类型 + ], // 商品类型 orderChartType: {}, timeVal: [], fromList: { @@ -621,15 +621,15 @@ export default { }, deliveryList: [], eleTempsLst: [], - productList: [], //订单商品 + productList: [], // 订单商品 productNum: 0, - storeList: [], //门店列表 + storeList: [], // 门店列表 multipleSelection: [], shipment: { delivery_type: 1, station_id: '', - is_split:"0", - split:[] + is_split: '0', + split: [] }, original: { delivery_name: '', @@ -701,10 +701,10 @@ export default { this.getStoreList() }, methods: { - /**重置 */ - searchReset(){ + /** 重置 */ + searchReset() { this.timeVal = [] - this.tableFrom.date = "" + this.tableFrom.date = '' this.$refs.searchForm.resetFields() this.getList(1) }, @@ -713,17 +713,17 @@ export default { if (row.stock > row.product_num)row.stock = row.product_num }, changeDrawer(v) { - this.drawer = v; + this.drawer = v }, closeDrawer() { - this.drawer = false; + this.drawer = false }, // 分单发货选择商品 handleSelectionChange(val) { this.multipleSelection = val const data = [] this.multipleSelection.map((item) => { - data.push({id:item.order_product_id,num:item.product_num}) + data.push({ id: item.order_product_id, num: item.product_num }) }) this.ids = data }, @@ -761,18 +761,18 @@ export default { from_tel: data.mer_from_tel, delivery_type: delivery_type, delivery_name: data.mer_from_com, - temp_id: "" + temp_id: '' // temp_id: data.mer_config_temp_id } - if(data.mer_from_com != ''){ + if (data.mer_from_com != '') { this.getTempsLst(data.mer_from_com) } }) - .catch((res) => { - this.$message.error(res.message) - }) + .catch((res) => { + this.$message.error(res.message) + }) }, - //获取门店列表 + // 获取门店列表 getStoreList() { getDeliveryStoreLst().then((res) => { this.storeList = res.data @@ -781,11 +781,11 @@ export default { }) }, changeSend(e) { - this.$refs['shipment'].clearValidate(); - if(e == 3){ - //如果是无需配送,就重置拆单信息 - this.shipment.is_split = '0'; - delete this.shipment.split; + this.$refs['shipment'].clearValidate() + if (e == 3) { + // 如果是无需配送,就重置拆单信息 + this.shipment.is_split = '0' + delete this.shipment.split } }, getPicture(name) { @@ -802,18 +802,18 @@ export default { }, // 批量发送货 batchSend() { - if (!this.allCheck&&this.checkedIds.length == 0) { + if (!this.allCheck && this.checkedIds.length == 0) { return this.$message.warning('请先选择订单') } else { this.isBatch = true this.sendVisible = true this.shipment.delivery_type = 2 this.shipment.select_type = this.allCheck ? 'all' : 'select' - if(this.allCheck){ + if (this.allCheck) { this.shipment.where = this.tableFrom - }else{ + } else { this.shipment.order_id = this.checkedIds - } + } } }, handleClose() { @@ -913,15 +913,15 @@ export default { }) }, // 订单退款 - onOrderRefund(id){ - this.$refs.orderRefund.getOrderDetails(id) + onOrderRefund(id) { + this.$refs.orderRefund.getOrderDetails(id) }, // 退款回调 - refundSuccess(){ + refundSuccess() { setTimeout(() => { - this.drawer = false; - this.getList(); - },500) + this.drawer = false + this.getList() + }, 500) }, // 表格某一行添加特定的样式 addTdClass(val) { @@ -938,27 +938,27 @@ export default { // 详情 onOrderDetails(id) { this.orderId = id - this.$refs.orderDetail.getInfo(id); - this.drawer = true; + this.$refs.orderDetail.getInfo(id) + this.drawer = true }, async exports(value) { - let excelData = JSON.parse(JSON.stringify(this.tableFrom)), data = [] + const excelData = JSON.parse(JSON.stringify(this.tableFrom)); let data = [] excelData.page = 1 - excelData.ids = this.checkedIds.toString() + excelData.ids = this.checkedIds.toString() let pageCount = 1 - let lebData = {}; + let lebData = {} for (let i = 0; i < pageCount; i++) { lebData = value == 1 ? await this.downOrderData(excelData) : await this.downInvoiceData(excelData) - pageCount = Math.ceil(lebData.count/excelData.limit) + pageCount = Math.ceil(lebData.count / excelData.limit) if (lebData.export.length) { data = data.concat(lebData.export) excelData.page++ - } + } } - createWorkBook(lebData.header, lebData.title, data, lebData.foot,lebData.filename); + createWorkBook(lebData.header, lebData.title, data, lebData.foot, lebData.filename) return }, - /**订单 */ + /** 订单 */ downOrderData(excelData) { return new Promise((resolve, reject) => { exportOrderApi(excelData).then((res) => { @@ -966,7 +966,7 @@ export default { }) }) }, - /**发货单 */ + /** 发货单 */ downInvoiceData(excelData) { return new Promise((resolve, reject) => { exportInvoiceApi(excelData).then((res) => { @@ -993,13 +993,13 @@ export default { // 订单核销 orderCancellation(code) { const that = this - that.$refs.orderCancellate.dialogVisible = true; - if(code) { - that.$refs.orderCancellate.productDetails(code) - that.$refs.orderCancellate.isColum = true; - }else{ - that.$refs.orderCancellate.isColum = false; - that.$refs.orderCancellate.resetData() + that.$refs.orderCancellate.dialogVisible = true + if (code) { + that.$refs.orderCancellate.productDetails(code) + that.$refs.orderCancellate.isColum = true + } else { + that.$refs.orderCancellate.isColum = false + that.$refs.orderCancellate.resetData() } }, // 去核销 @@ -1114,8 +1114,8 @@ export default { pay_postage: res.data.pay_postage, total_price: res.data.total_price, integral_price: res.data.integral_price, - coupon_price: (Number(res.data.coupon_price) + Number(res.data.svip_discount)).toFixed(2) , - pay_price: (Number(res.data.total_price) + Number(res.data.pay_postage) - Number(res.data.coupon_price) - Number(res.data.svip_discount)).toFixed(2) + coupon_price: (Number(res.data.coupon_price) + Number(res.data.svip_discount)).toFixed(2), + pay_price: (Number(res.data.total_price) + Number(res.data.pay_postage) - Number(res.data.coupon_price) - Number(res.data.svip_discount)).toFixed(2) } this.loading = false }).catch(({ message }) => { @@ -1136,7 +1136,7 @@ export default { this.formValidate.pay_price = (this.formValidate.total_price + this.formValidate.pay_postage - this.formValidate.coupon_price).toFixed(2) }, // 发货 - send(row,id) { + send(row, id) { this.isBatch = false this.sendVisible = true this.isResend = false @@ -1148,9 +1148,9 @@ export default { item.stock_num = item.product_num }) this.productList = row.orderProduct - this.productNum = row.orderProduct && row.orderProduct[0] && row.orderProduct[0]['product_num'] || 0 + this.productNum = row.orderProduct && row.orderProduct[0] && row.orderProduct[0]['product_num'] || 0 delete this.shipment.order_id - if(this.tableFrom.order_type == 2)this.shipment.delivery_type = 3 + if (this.tableFrom.order_type == 2) this.shipment.delivery_type = 3 }, sendReset() { this.shipment = { @@ -1190,13 +1190,13 @@ export default { this.shipment.delivery_name = this.shipment.to_name this.shipment.delivery_id = this.shipment.to_phone } - if(this.shipment.is_split != '0' && this.shipment.is_split && this.orderType != 2){ + if (this.shipment.is_split != '0' && this.shipment.is_split && this.orderType != 2) { if (!this.multipleSelection.length) { return this.$message.warning('请选择拆单商品!') } const data = [] this.multipleSelection.map((item) => { - data.push({id:item.order_product_id,num:item.product_num_input}) + data.push({ id: item.order_product_id, num: item.product_num_input }) }) this.ids = data this.shipment.split = this.ids @@ -1205,13 +1205,13 @@ export default { if (valid) { delete this.shipment.to_name delete this.shipment.to_phone - console.log(this.shipment); + console.log(this.shipment) // return this.isBatch ? batchDeliveryApi(this.shipment).then(res => { this.sendVisible = false this.$message.success(res.message) this.getList('') - if(this.drawer)this.$refs.orderDetail.getInfo(id); + if (this.drawer) this.$refs.orderDetail.getInfo(id) // this.$refs[name].resetFields() this.sendReset() }).catch(({ message }) => { @@ -1222,10 +1222,10 @@ export default { this.$message.success(res.message) this.getList('') // this.$refs[name].resetFields() - if(this.drawer)this.$refs.orderDetail.getInfo(id); + if (this.drawer) this.$refs.orderDetail.getInfo(id) this.sendReset() - //修改增加打印机打印 - if (res.data.label) this.printImg(res.data.label); + // 修改增加打印机打印 + if (res.data.label) this.printImg(res.data.label) }).catch(({ message }) => { this.$message.error(message) }) @@ -1234,7 +1234,7 @@ export default { } }) }, - //修改增加打印方法 + // 修改增加打印方法 printImg(url) { printJS({ // printable: 'http://api.kuaidi100.com/label/getImage/20230518/9CBFE5F980044698A54CF19EB1585125', @@ -1244,8 +1244,8 @@ export default { style: `img{ width: 100%; height: 476px; - }`, - }); + }` + }) }, // 列表 getList(num) { diff --git a/src/views/product/addProduct/index.vue b/src/views/product/addProduct/index.vue index 598b79b..7ab0c66 100644 --- a/src/views/product/addProduct/index.vue +++ b/src/views/product/addProduct/index.vue @@ -18,7 +18,7 @@ class="formValidate mt20" :rules="ruleValidate" :model="formValidate" - label-width="130px" + label-width="150px" @submit.native.prevent > @@ -55,6 +55,16 @@ /> + + + + + @@ -224,7 +234,7 @@ /> --> - + - -
- - - - + @@ -279,8 +279,260 @@
+ + + + + + + + + + + 国产 + 进口 + + + +
+
进口企业/境内总代企业资质
+ + + + + + + + + 点击上传 + + + + +
品牌方资质
+ + + + 点击上传 + + + + +
产品资质
+ + + + 点击上传 + + + + + + + + 点击上传 + + + + + + + + 点击上传 + + + + +
+
+
生产企业资质
+ + + + + + + + + 点击上传 + + + + + + + + 点击上传 + + + + +
品牌方资质
+ + + + 点击上传 + + + + + + + + 点击上传 + + + + +
产品资质
+ + + + 点击上传 + + + + + + + + 点击上传 + + + + +
+
- + 单独设置 默认设置 - (平台设置,一级佣金{{extension_one_rate}}%,二级佣金{{extension_two_rate}}%) + (平台设置,一级佣金{{ extension_one_rate }}%,二级佣金{{ extension_two_rate }}%) @@ -419,7 +671,7 @@ size="small" @click="createAttrName" >确定 - 取消 + 取消 @@ -446,7 +698,7 @@ :span="24" class="noForm" > - + @@ -505,8 +757,8 @@ - - + - + @@ -672,16 +924,16 @@ + @blur="memberPrice(formThead[iii], scope.row)" + /> - +
@@ -777,11 +1029,11 @@ >