diff --git a/src/views/system/goodsInfo/goodsInfojs.js b/src/views/system/goodsInfo/goodsInfojs.js index c48f50e..ceb0587 100644 --- a/src/views/system/goodsInfo/goodsInfojs.js +++ b/src/views/system/goodsInfo/goodsInfojs.js @@ -59,10 +59,10 @@ export default { value: "BUSINESS", label: "买卖", }, - { - value: "LEASE", - label: "租赁", - }, + // { + // value: "LEASE", + // label: "租赁", + // }, ], options: [{ value: 0, @@ -73,6 +73,17 @@ export default { label: "是", }, ], + integraloption: [ + { + value: 0, + label: "否", + }, + { + value: 1, + label: "是", + }, + ], + value:"", // goodAttributeDetailsLists:[], goodDetailsLists: [], ids: [], @@ -162,6 +173,12 @@ export default { this.infos(); }, methods: { + changeExchangeFlag(item) { + if (item.integralExchangeFlag == 0) { + item.integralExchangeCount = '' + item.integralExchangeSill = '' + } + }, imgs(item) { this.imgsurl.pictureUrlList.push(item); }, @@ -217,6 +234,9 @@ export default { goodsPrice: "", goodsStock: "", sort: null, + integralExchangeCount:null, + integralExchangeFlag:null, + integralExchangeSill:null, idd: this.idd, }; this.goodDetailsLists.push(obj); @@ -317,6 +337,9 @@ export default { attributePitureUrl: "", goodsPrice: "", goodsStock: "", + integralExchangeCount:null, + integralExchangeFlag:null, + integralExchangeSill:null, sort: null, idd: 9999999, }, ]; @@ -360,6 +383,9 @@ export default { attributePitureUrl: "", goodsPrice: "", goodsStock: "", + integralExchangeCount:null, + integralExchangeFlag:null, + integralExchangeSill:null, sort: null, idd: 9999999, }, ]; @@ -387,6 +413,16 @@ export default { console.log(this.goodDetailsLists); this.form.goodAttributeDetailsLists = []; this.form.goodDetailsLists = this.goodDetailsLists; + if (!this.form.goodDetailsLists.integralExchangeFlag) { + this.form.goodDetailsLists.integralExchangeFlag = null + } + if (this.form.goodDetailsLists.integralExchangeSill=="") { + this.form.goodDetailsLists.integralExchangeSill = null + + } + if (this.form.goodDetailsLists.integralExchangeCount == "") { + this.form.goodDetailsLists.integralExchangeCount = null + } console.log(this.form); this.$refs["form"].validate((valid) => { if (valid) { diff --git a/src/views/system/goodsInfo/index.vue b/src/views/system/goodsInfo/index.vue index 5d8199a..bac0029 100644 --- a/src/views/system/goodsInfo/index.vue +++ b/src/views/system/goodsInfo/index.vue @@ -260,7 +260,46 @@ > - + + + + + + + + + + @@ -561,7 +486,7 @@ import { editExpressNo, goodsOrderrefund, weChatRefundOrderApply, - selectOrderEvaluate, + selectOrderEvaluate } from "@/api/system/goodsOrder"; import { getListByUser } from "@/api/system/userlist.js"; import baseurl from "@/api/baseurl.js"; @@ -584,44 +509,58 @@ export default { orderStatuslist: [ { value: "WAIT_PAY", - label: "待付款", + label: "待付款" }, { value: "PAY", - label: "待发货", + label: "待发货" }, { value: "WAIT_RECEIVED_GOODS", - label: "待收货", + label: "待收货" }, { value: "RECEIVED_GOODS", - label: "待评价", + label: "待评价" }, { value: "EVALUATED", - label: "交易完成", + label: "交易完成" }, { value: "CANCEL", - label: "已取消", + label: "已取消" }, { value: "WAIT_RETURNED_GOODS", - label: "待退货", + label: "待退货" }, { value: "RETURNED_GOODS", - label: "已退货", + label: "已退货" }, { value: "WAIT_REFUND", - label: "退款中", + label: "退款中" }, { value: "REFUNDED", - label: "退款成功", + label: "退款成功" + } + ], + orderTypelist: [ + { + value: "INTEGRAL_EXCHANGE", + label: "积分兑换" }, + { + value: "DIRECT_BUY", + label: "直接购买" + }, + { + value: "HEALTH_CONSULTATION", + label: "健康咨询" + } ], // 遮罩层 loading: true, @@ -655,24 +594,24 @@ export default { receiveAddress: null, phone: null, orderTime: null, - orderChannel: null, + orderChannel: null }, queryexpressNo: { id: "", - expressNo: null, + expressNo: null }, //权限查询 getListByUserquery: { pageNum: 1, - pageSize: 10, + pageSize: 10 }, refundinfo: { - id: "", + id: "" }, // 表单参数 form: {}, // 表单校验 - rules: {}, + rules: {} }; }, created() { @@ -747,7 +686,7 @@ export default { /** 查询商品订单列表 */ getList() { this.loading = true; - listGoodsOrder(this.queryParams).then((response) => { + listGoodsOrder(this.queryParams).then(response => { this.goodsOrderList = response.rows; this.total = response.total; this.loading = false; @@ -756,7 +695,7 @@ export default { // 查看商品信息 seeOrder(row) { const id = row.orderNo; - getGoodsOrderlist(id).then((res) => { + getGoodsOrderlist(id).then(res => { this.orderList = res.data; this.innerorder = true; this.ratelist = {}; @@ -776,7 +715,7 @@ export default { // 确定按钮 searchlogistics() { console.log(this.queryexpressNo); - editExpressNo(this.queryexpressNo).then((res) => { + editExpressNo(this.queryexpressNo).then(res => { if (res.code == 200) { this.$modal.msgSuccess("录入成功"); } @@ -793,7 +732,7 @@ export default { // 确认退款 refund(id) { console.log(id); - goodsOrderRefundinfo(id).then((res) => { + goodsOrderRefundinfo(id).then(res => { this.refundlist = res.data; console.log(this.refundlist); this.innerrefund = true; @@ -803,12 +742,13 @@ export default { //确认退款 确定按钮 submitRefundOrder() { var obj = {}; + obj.orderType = this.refundlist.orderType; obj.orderNo = this.refundlist.goOrderNo; obj.refundReason = this.refundlist.dictLabel; obj.refundPrice = this.refundlist.godTotalPrice; obj.remark = this.refundlist.refundReasonRemark; obj.goodsStatus = this.refundlist.orderStatus; - weChatRefundOrderApply(obj).then((res) => { + weChatRefundOrderApply(obj).then(res => { if (res.code == 200) { this.$modal.msgSuccess("退款有延迟,请耐心等待"); } @@ -863,7 +803,7 @@ export default { receiveAddress: null, phone: null, orderTime: null, - orderChannel: null, + orderChannel: null }; this.form = { pageNum: 1, @@ -884,7 +824,7 @@ export default { createTime: null, updateBy: null, updateTime: null, - orderStatus: "", + orderStatus: "" }; this.resetForm("queryParams"); }, @@ -916,7 +856,7 @@ export default { // 多选框选中数据 handleSelectionChange(selection) { - this.ids = selection.map((item) => item.id); + this.ids = selection.map(item => item.id); this.single = selection.length !== 1; this.multiple = !selection.length; }, @@ -930,7 +870,7 @@ export default { handleUpdate(row) { this.reset(); const id = row.id || this.ids; - getGoodsOrder(id).then((response) => { + getGoodsOrder(id).then(response => { this.form = response.data; this.open = true; this.title = "修改商品订单"; @@ -938,16 +878,16 @@ export default { }, /** 提交按钮 */ submitForm() { - this.$refs["form"].validate((valid) => { + this.$refs["form"].validate(valid => { if (valid) { if (this.form.id != null) { - updateGoodsOrder(this.form).then((response) => { + updateGoodsOrder(this.form).then(response => { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }); } else { - addGoodsOrder(this.form).then((response) => { + addGoodsOrder(this.form).then(response => { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); @@ -961,7 +901,7 @@ export default { const ids = row.id || this.ids; this.$modal .confirm('是否确认删除商品订单编号为"' + ids + '"的数据项?') - .then(function () { + .then(function() { return delGoodsOrder(ids); }) .then(() => { @@ -975,14 +915,14 @@ export default { this.download( "system/goodsOrder/export", { - ...this.getListByUserquery, + ...this.getListByUserquery }, `goodsOrder_${new Date().getTime()}.xlsx` ); }, //权限列表 info() { - getListByUser(this.getListByUserquery).then((res) => { + getListByUser(this.getListByUserquery).then(res => { this.total2 = res.total; this.nurseStationlist = res.rows; this.queryParams.nurseStationId = res.rows[0].id; @@ -993,13 +933,13 @@ export default { infos() { var queryFor = { pageNum: 1, - pageSize: 9999, + pageSize: 9999 }; - getListByUser(queryFor).then((res) => { + getListByUser(queryFor).then(res => { console.log(res); this.handstationlist = res.rows; }); - }, - }, + } + } };