diff --git a/src/api/coupon.js b/src/api/coupon.js new file mode 100644 index 0000000..d7c4b17 --- /dev/null +++ b/src/api/coupon.js @@ -0,0 +1,79 @@ +import request from '@/utils/request' + +/** + * 获取优惠券列表 + * @returns + */ +export function getTbShopCoupon(params) { + return request({ + url: '/api/tbShopCoupon', + method: 'get', + params: { + ...params + } + }) +} + +/** + * 获取优惠券详情 + * @returns + */ +export function getTbShopCouponInfo(id) { + return request({ + url: '/api/tbShopCoupon/' + id, + method: 'get', + params: {} + }) +} + +/** + * 增加优惠券 + * @returns + */ +export function addTbShopCoupon(params) { + return request({ + url: '/api/tbShopCoupon', + method: 'post', + data: { + ...params + } + }) +} + +/** + * 删除优惠券 + * @returns + */ +export function delTbShopCoupon(params) { + return request({ + url: '/api/tbShopCoupon', + method: 'delete', + data: params + }) +} + +/** + * 获取领取列表 + * @returns + */ +export function queryReceive(params) { + return request({ + url: '/api/tbShopCoupon/queryReceive', + method: 'post', + data: { + ...params + } + }) +} + +/** + * 获取领取列表 + * @returns + */ +export function delReceive(params) { + return request({ + url: '/api/tbShopCoupon/receive', + method: 'delete', + data: params + }) +} diff --git a/src/api/invoicing.js b/src/api/invoicing.js index cbf2b92..e144ba4 100644 --- a/src/api/invoicing.js +++ b/src/api/invoicing.js @@ -71,7 +71,7 @@ export function tbProductStockDetailSum(params) { */ export function tbShopPurveyorGet(params) { return request({ - url: `/api/tbShopPurveyor`, + url: `/api/tbShopPurveyorTransact`, method: "get", params }); @@ -173,7 +173,14 @@ export function tbProductStockOperateOutAndOn(data) { data }); } - +// 副单位 +export function unittbConsInfo(params) { + return request({ + url: `/api/tbConsInfo`, + method: "put", + data:params + }); +} /** * 库存列表 * @returns diff --git a/src/api/pad.js b/src/api/pad.js index ebb8bd5..e2a24e6 100644 --- a/src/api/pad.js +++ b/src/api/pad.js @@ -69,3 +69,15 @@ export function productGroupPut(data) { data }); } + +/** + * 拖动排序 + * @returns + */ +export function productCategorySort(data) { + return request({ + url: "/api/pad/productCategory/sort", + method: "post", + data + }); +} diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue index 8216188..1fa97ea 100644 --- a/src/layout/components/TagsView/index.vue +++ b/src/layout/components/TagsView/index.vue @@ -164,6 +164,7 @@ export default { } }, openMenu(tag, e) { + console.log(11111) const menuMinWidth = 105 const offsetLeft = this.$el.getBoundingClientRect().left // container margin left const offsetWidth = this.$el.offsetWidth // container width diff --git a/src/utils/index.js b/src/utils/index.js index abbf4b6..98df082 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -438,3 +438,15 @@ export function formatDecimal(num = 0, decimal = 2, isInt = false) { return parseFloat(num).toFixed(decimal); } } + +/** + * 传入数组,以及要交换位置的2个元素的下标 + * @param {*} arr + * @param {*} i1 + * @param {*} i2 + * @returns + */ +export function swapArrayEle(arr, i1, i2) { + arr[i1] = arr.splice(i2, 1, arr[i1])[0]; + return arr; +} diff --git a/src/views/application/member_points.vue b/src/views/application/member_points.vue new file mode 100644 index 0000000..32aa4bb --- /dev/null +++ b/src/views/application/member_points.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/src/views/coupon_manage/add_coupon.vue b/src/views/coupon_manage/add_coupon.vue new file mode 100644 index 0000000..d253601 --- /dev/null +++ b/src/views/coupon_manage/add_coupon.vue @@ -0,0 +1,407 @@ + + + + + + diff --git a/src/views/coupon_manage/components/addCoupon.vue b/src/views/coupon_manage/components/addCoupon.vue deleted file mode 100644 index fa12b7a..0000000 --- a/src/views/coupon_manage/components/addCoupon.vue +++ /dev/null @@ -1,277 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/views/coupon_manage/components/coupon_details.vue b/src/views/coupon_manage/components/coupon_details.vue new file mode 100644 index 0000000..e36e8ba --- /dev/null +++ b/src/views/coupon_manage/components/coupon_details.vue @@ -0,0 +1,289 @@ + + + + + diff --git a/src/views/coupon_manage/couponEnum.js b/src/views/coupon_manage/couponEnum.js index 9bf81ab..f4cbaf5 100644 --- a/src/views/coupon_manage/couponEnum.js +++ b/src/views/coupon_manage/couponEnum.js @@ -1,32 +1,51 @@ export default { - classType: [ - { - value: 'product', - label: '商品券' - }, - { - value: 'common', - label: '通用券' - } - ], - type: [ - { - value: '0', - label: '满减' - }, - { - value: '1', - label: '折扣' - } - ], - effectType: [ - { - value: '0', - label: '一直有效' - }, - { - value: '1', - label: '时限有效' - } - ] -} \ No newline at end of file + classType: [ + { + value: 'product', + label: '商品券' + }, + { + value: 'common', + label: '通用券' + } + ], + type: [ + { + value: '0', + label: '满减' + }, + { + value: '1', + label: '折扣' + } + ], + cycle: [ + { label: '周一' }, + { label: '周二' }, + { label: '周三' }, + { label: '周四' }, + { label: '周五' }, + { label: '周六' }, + { label: '周七' } + ], + validityType: [ + { + value: 'fixed', + label: '领券后有效期内可用' + }, + { + value: 'custom', + label: '固定有效期范围内可用' + } + ], + useTimeType: [ + { + value: 'all', + label: '全时段可用' + }, + { + value: 'custom', + label: '指定时间段' + } + ] +} diff --git a/src/views/coupon_manage/coupon_list.vue b/src/views/coupon_manage/coupon_list.vue index 9c9b65a..7a7d802 100644 --- a/src/views/coupon_manage/coupon_list.vue +++ b/src/views/coupon_manage/coupon_list.vue @@ -1,118 +1,161 @@ \ No newline at end of file + diff --git a/src/views/devices/details.vue b/src/views/devices/details.vue index 4cd8639..8571bba 100644 --- a/src/views/devices/details.vue +++ b/src/views/devices/details.vue @@ -49,7 +49,7 @@ 部分分类 -
仅打印制作单[厨房]
+
仅打印制作单[厨房]
- +
- +
@@ -242,7 +242,7 @@ {{ scope.row.conUnit }} - + @@ -352,7 +352,6 @@ - + + + + +
@@ -592,7 +624,7 @@ import { tbConsInfoFlowstock } from "@/api/consumable"; import AddConsTakin from "../components/addConsTakin"; -import { tbConsInfodownload, tbConsInfoinputStock } from '@/api/invoicing' +import { tbConsInfodownload, tbConsInfoinputStock, unittbConsInfo } from '@/api/invoicing' import { downloadFile } from "@/utils"; import UploadExcel from '@/components/UploadExcel' import consRecordDetail from "../components/cons_record_detail"; @@ -677,6 +709,9 @@ export default { total: 0 }, ruleFormLoading: false, + dialogtitleunit: false, + unitItem: { switchs: 2 }, + switchs: 2, ruleForms: [], ruleForm: { conCode: "", @@ -769,6 +804,15 @@ export default { } }) }, + async submitUnit() { + const res = await unittbConsInfo([{ + conUnitTwoConvert: this.unitItem.conUnitTwoConvert * 1, + conUnitTwo: this.unitItem.conUnitTwo, + id: this.unitItem.id + }]) + this.unitItem = {} + this.dialogtitleunit = false + }, //跳转订单列表 toGoodslist(orderNo) { this.$router.push({ @@ -843,13 +887,22 @@ export default { console.log(error); } }, + // 单位编辑 + editorHandles(row) { + this.unitItem = row; + this.switchs = 2 + if (row.conUnitTwo) { + this.switchs = 1 + } + this.dialogtitleunit = true; + }, + // 编辑 editorHandle(row) { this.dialogtitle = "编辑"; for (let key in this.ruleForm) { this.ruleForm[key] = row[key]; } - console.log(row, '调试1') this.ruleForm.id = row.id; this.dialogshow = true; }, @@ -1306,4 +1359,70 @@ export default { } } } + +.unitStyle { + display: flex; + align-items: center; + border-radius: 2px 2px 2px 2px; + + >div:first-child { + width: 95px; + height: 42px; + line-height: 42px; + text-align: center; + border-right: 1px solid #DDDFE6; + font-family: Source Han Sans CN, Source Han Sans CN; + font-weight: 400; + font-size: 14px; + color: #999999; + } + + >div:nth-child(2) { + width: 80px; + height: 42px; + line-height: 42px; + text-align: center; + border-right: 1px solid #DDDFE6; + font-family: Source Han Sans CN, Source Han Sans CN; + font-weight: 400; + font-size: 14px; + color: #3F9EFF; + } + + >div:last-child { + font-family: Source Han Sans CN, Source Han Sans CN; + font-weight: 400; + font-size: 14px; + color: #999999; + + >input { + width: 39px; + height: 28px; + background: #FFFFFF; + border-radius: 2px 2px 2px 2px; + border: 1px solid #DDDFE6; + margin: 0 16px; + } + + } +} + +.unitStyleBottom { + margin-top: 30px; + line-height: 42px; + text-align: center; + font-family: Source Han Sans CN, Source Han Sans CN; + font-weight: 400; + font-size: 14px; + color: #3F9EFF; + + +} + +.unitWidth { + // width: 418px; + height: 42px; + border-radius: 2px 2px 2px 2px; + border: 1px solid #DDDFE6; +} diff --git a/src/views/invoicing/operation_in.vue b/src/views/invoicing/operation_in.vue index 4494e8b..5c53a01 100644 --- a/src/views/invoicing/operation_in.vue +++ b/src/views/invoicing/operation_in.vue @@ -84,6 +84,10 @@ + + + + @@ -122,6 +126,17 @@
原价¥{{ scope.row.costPrice }}/{{ scope.row.conUnit }}
+ + +