Merge branch 'test' of e.coding.net:g-cphe0354/yinshoukeguanliduan/management into test

This commit is contained in:
duan 2024-09-02 17:25:41 +08:00
commit 3805882787
5 changed files with 3891 additions and 20 deletions

View File

@ -19,7 +19,7 @@ const api = {
// 文件上传 // 文件上传
fileUploadApi: baseUrl + '/api/localStorage', fileUploadApi: baseUrl + '/api/localStorage',
// 上传版本文件 // 上传版本文件
versonUploadApi: baseUrl + '/api/uploadVersionFile', versonUploadApi: baseUrl + '/api/qiNiuContent/uploadVersionFile',
// baseUrl // baseUrl
baseApi: baseUrl baseApi: baseUrl
} }

View File

@ -103,8 +103,9 @@
<el-table :data="form.skuList" border> <el-table :data="form.skuList" border>
<el-table-column label="售价" prop="salePrice"> <el-table-column label="售价" prop="salePrice">
<template v-slot="scope"> <template v-slot="scope">
<el-input-number @change="priceFormat(scope.row, 'salePrice')" @blur="priceFormat(scope.row, 'salePrice')" <el-input-number size="mini" @change="priceFormat(scope.row, 'salePrice')"
v-model="scope.row.salePrice" controls-position="right"></el-input-number> @blur="priceFormat(scope.row, 'salePrice')" v-model="scope.row.salePrice"
controls-position="right"></el-input-number>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="会员价" prop="memberPrice"> <el-table-column label="会员价" prop="memberPrice">
@ -214,10 +215,9 @@
</el-table-column> </el-table-column>
<el-table-column label="图片" prop="coverImg" width="80"> <el-table-column label="图片" prop="coverImg" width="80">
<template v-slot="scope"> <template v-slot="scope">
<uploadImg type="text" :limit="1" @success="res => (scope.row.coverImg = res[0])" <uploadImg v-if="!scope.row.coverImg" type="text" :limit="1" @success="res => (scope.row.coverImg = res[0])" />
v-if="!scope.row.coverImg" />
<el-image style="width:30px;height:30px;" :src="scope.row.coverImg" v-else /> <el-image style="width:30px;height:30px;" :src="scope.row.coverImg" v-else />
<i class="el-icon-error " v-if="scope.row.coverImg" @click="scope.row.coverImg = ''"></i> <i class="el-icon-error " v-if="scope.row.coverImg" @click="scope.row.coverImg = ''" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="售价" prop="salePrice"> <el-table-column label="售价" prop="salePrice">
@ -427,15 +427,15 @@ export default {
selectSpec: [], selectSpec: [],
selectSpecResult: false, selectSpecResult: false,
defaultSku: { defaultSku: {
salePrice: 0, salePrice: undefined,
memberPrice: 0, memberPrice: undefined,
costPrice: 0, costPrice: undefined,
originPrice: 0, originPrice: undefined,
stockNumber: 0, stockNumber: undefined,
firstShared: 0, firstShared: undefined,
barCode: `${localStorage.getItem("shopId")}${dayjs().valueOf()}`, barCode: `${localStorage.getItem("shopId")}${dayjs().valueOf()}`,
isGrounding: 1, isGrounding: 1,
productId: this.$route.query.goods_id, productId: this.$route.query.goods_id ? this.$route.query.goods_id : '',
shopId: localStorage.getItem("shopId"), shopId: localStorage.getItem("shopId"),
suit: 0 suit: 0
}, },
@ -690,8 +690,30 @@ export default {
console.log(error); console.log(error);
} }
}, },
// //
submitHandle() { submitHandle() {
console.log(this.form.skuList)
const hasUndefined = this.form.skuList.some(obj => {
for (const key in obj) {
if (obj[key] === undefined) {
return true; // undefinedtrue
}
}
return false; // undefinedfalse
});
//
if (hasUndefined) {
this.$message({
message: '请完善规格属性的参数!',
type: 'warning'
});
return false;
}
this.imgList.forEach(ele => {
arr.push(ele.url)
})
let arr = [] let arr = []
this.imgList.forEach(ele => { this.imgList.forEach(ele => {
arr.push(ele.url) arr.push(ele.url)

View File

@ -52,6 +52,7 @@
<el-table-column label="售价"> <el-table-column label="售价">
<template v-slot="scope"> <template v-slot="scope">
<span>{{ scope.row.lowPrice }}</span> <span>{{ scope.row.lowPrice }}</span>
<span v-if="scope.row.typeEnum == '多规格'">~{{ scope.row.maxPrice }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="商品规格" prop="typeEnum"> <el-table-column label="商品规格" prop="typeEnum">

File diff suppressed because one or more lines are too long

View File

@ -250,7 +250,7 @@
type="success" type="success"
size="medium" size="medium"
:disabled="!order.list.length" :disabled="!order.list.length"
@click="toCreateOrder(false)" @click="toCreateOrderDebounce(false)"
> >
仅下单 仅下单
</el-button> </el-button>
@ -261,7 +261,7 @@
<el-button <el-button
size="medium" size="medium"
:disabled="!order.list.length && !order.old.list.length" :disabled="!order.list.length && !order.old.list.length"
@click="toCreateOrder(true)" @click="toCreateOrderDebounce(true)"
> >
去结账 去结账
</el-button> </el-button>
@ -373,14 +373,14 @@
<div <div
class="btn" class="btn"
:class="{ disabled: !order.list.length ||key}" :class="{ disabled: !order.list.length }"
@click="saveOrder" @click="saveOrder"
> >
存单 存单
</div> </div>
<div <div
class="btn relative" class="btn relative"
:class="{ disabled: !prveOrder.list.length ||key}" :class="{ disabled: !prveOrder.list.length }"
@click="cacheOrderShow" @click="cacheOrderShow"
> >
取单 取单
@ -1133,6 +1133,7 @@ export default {
canUpdate: true, canUpdate: true,
// //
createOrder: { createOrder: {
status: "",
discount: 1, discount: 1,
form: {}, form: {},
data: {}, data: {},
@ -1532,6 +1533,13 @@ export default {
this.isCreateOrder = false; this.isCreateOrder = false;
}, },
// //
toCreateOrderDebounce(isNowPay){
if(this.createOrder.status!=''&&this.createOrder.status!='success'){
return
}
this.createOrder.status='loading'
this.toCreateOrder(isNowPay)
},
async toCreateOrder(isNowPay = false) { async toCreateOrder(isNowPay = false) {
console.log(this.order) console.log(this.order)
console.log(this.order.orderId) console.log(this.order.orderId)
@ -1547,6 +1555,7 @@ export default {
console.log(this.postPay); console.log(this.postPay);
console.log(isNowPay); console.log(isNowPay);
console.log(this.postPay && isNowPay); console.log(this.postPay && isNowPay);
this.createOrder.status='success'
if (this.postPay && !isNowPay) { if (this.postPay && !isNowPay) {
this.$notify({ this.$notify({
title: "下单成功", title: "下单成功",
@ -1559,7 +1568,6 @@ export default {
const { masterId } = await this.getMasterId(); const { masterId } = await this.getMasterId();
this.masterId = masterId; this.masterId = masterId;
} }
this.isCreateOrder = true; this.isCreateOrder = true;
}, },
@ -2158,6 +2166,7 @@ export default {
this.prveOrder.selIndex=-1 this.prveOrder.selIndex=-1
this.order.old.selIndex = -1; this.order.old.selIndex = -1;
this.isCreateOrder = false; this.isCreateOrder = false;
this.createOrder.status=""
this.note.content = ""; this.note.content = "";
this.vipUser = { id: "" }; this.vipUser = { id: "" };
this.allPack = false; this.allPack = false;
@ -2175,10 +2184,10 @@ export default {
masterId: this.masterId, masterId: this.masterId,
tableId: this.table.tableId, tableId: this.table.tableId,
}); });
if (this.key) {
this.order.old.list = res.records;
} else {
this.order.list = res.records; this.order.list = res.records;
if (this.key) {
// this.order.old.list = res.records;
} else {
} }
this.order.total = res.total; this.order.total = res.total;
}, },