Commit 5c3b90ee authored by pengyunqian's avatar pengyunqian

update:改字段2

parents 37d932e4 023fac05
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
<section class="width50p"> <section class="width50p">
<h4 style="margin-bottom:20px">商品详情图</h4> <h4 style="margin-bottom:20px">商品详情图</h4>
<el-upload <el-upload
:data="{ scenario: `goods` }" :data="{ type: 1 }"
:action="uploadUrl" :action="uploadUrl"
:on-preview="previewImage" :on-preview="previewImage"
:on-success="handleDetailSuccess" :on-success="handleDetailSuccess"
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
<section class="width50p"> <section class="width50p">
<h4 style="margin-bottom:20px">商品介绍图</h4> <h4 style="margin-bottom:20px">商品介绍图</h4>
<el-upload <el-upload
:data="{ scenario: `goods` }" :data="{ type:1 }"
:disabled="$route.params.operation !== 'EDIT'" :disabled="$route.params.operation !== 'EDIT'"
:action="uploadUrl" :action="uploadUrl"
auto-upload auto-upload
...@@ -476,9 +476,7 @@ ...@@ -476,9 +476,7 @@
@change="pickerStartTime" @change="pickerStartTime"
> >
</el-time-picker> </el-time-picker>
<span v-else>{{ <span v-else>{{ goodsObj.rule_start_time }}</span>
goodsObj.rule_start_time + "-" + goodsObj.rule_end_time
}}</span>
</el-form-item> </el-form-item>
<el-form-item label="使用结束时间:"> <el-form-item label="使用结束时间:">
<el-time-picker <el-time-picker
...@@ -488,9 +486,7 @@ ...@@ -488,9 +486,7 @@
@change="pickerEndTime" @change="pickerEndTime"
> >
</el-time-picker> </el-time-picker>
<span v-else>{{ <span v-else>{{ goodsObj.rule_end_time }}</span>
goodsObj.rule_start_time + "-" + goodsObj.rule_end_time
}}</span>
</el-form-item> </el-form-item>
<el-form-item label="过期时间"> <el-form-item label="过期时间">
<el-date-picker <el-date-picker
...@@ -546,12 +542,12 @@ ...@@ -546,12 +542,12 @@
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="审核时间" label="更新时间"
prop="create_time" prop="create_time"
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="审核描述" label="更新描述"
prop="note" prop="note"
align="center" align="center"
></el-table-column> ></el-table-column>
...@@ -690,7 +686,7 @@ export default { ...@@ -690,7 +686,7 @@ export default {
if (!val) { if (!val) {
this.rejectReason.reason = ""; this.rejectReason.reason = "";
} }
}, }
}, },
data () { data () {
...@@ -776,7 +772,7 @@ export default { ...@@ -776,7 +772,7 @@ export default {
activeStartTime: "", // 活动开始时间 activeStartTime: "", // 活动开始时间
activeEndTime: "", // 活动结束时间 activeEndTime: "", // 活动结束时间
uploadUrl: `${GOODS_URI}/merchant/lifeinner/upload`, // 金山云上传地址 uploadUrl: `${GOODS_URI}/ksy/ks3apiunencrypt/ks3api_upload`, // 金山云上传地址
addShopShow: false, // 添加门店弹框显示 addShopShow: false, // 添加门店弹框显示
...@@ -849,7 +845,7 @@ export default { ...@@ -849,7 +845,7 @@ export default {
// 上传图片的公共方法 // 上传图片的公共方法
uploadPicture (response, storageList) { uploadPicture (response, storageList) {
const responseURL = `${response.result.bucket}/${response.result.object_id}`; const responseURL = response.result.image_id;
storageList.push(responseURL); storageList.push(responseURL);
}, },
// 删除图片的公共方法 // 删除图片的公共方法
...@@ -992,12 +988,6 @@ export default { ...@@ -992,12 +988,6 @@ export default {
// } // }
// }, // },
// 取消新建门店 // 取消新建门店
closeAddShops () { closeAddShops () {
this.shopForm.shop_name = ""; this.shopForm.shop_name = "";
...@@ -1031,6 +1021,7 @@ export default { ...@@ -1031,6 +1021,7 @@ export default {
// 商品详情图上传成功时 // 商品详情图上传成功时
handleDetailSuccess (res) { handleDetailSuccess (res) {
console.log(res);
this.uploadPicture(res, this.detailUploadList); this.uploadPicture(res, this.detailUploadList);
}, },
// 商品详情图删除完成后的钩子 // 商品详情图删除完成后的钩子
...@@ -1130,8 +1121,8 @@ export default { ...@@ -1130,8 +1121,8 @@ export default {
// 禁用时间 // 禁用时间
disableExpirDate (time) { disableExpirDate (time) {
const nowDate = new Date(); const timeMs = time.getTime();
if (time > nowDate) { if (timeMs > (Date.now() - 86400000)) {
return false; return false;
} else { } else {
return true; return true;
...@@ -1274,6 +1265,8 @@ export default { ...@@ -1274,6 +1265,8 @@ export default {
return this.$message.error("请至少选择一个门店"); return this.$message.error("请至少选择一个门店");
} }
console.log(query);
const res = await editGoods(query); const res = await editGoods(query);
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.reason); return this.$message.error(res.reason);
......
...@@ -588,7 +588,7 @@ export default { ...@@ -588,7 +588,7 @@ export default {
// 查询商品列表 // 查询商品列表
async findProducts () { async findProducts () {
// 获取参数 // 获取参数
const { goods_sku_id, life_account_id } = this.ruleIdForm; const { goods_spu_id, life_account_id } = this.ruleIdForm;
let [start_time, end_time] = this.timeSelect; let [start_time, end_time] = this.timeSelect;
if (start_time && end_time) { if (start_time && end_time) {
start_time = this.formatTime(start_time); start_time = this.formatTime(start_time);
...@@ -600,7 +600,7 @@ export default { ...@@ -600,7 +600,7 @@ export default {
// console.log(start_time, end_time); // console.log(start_time, end_time);
// 整理参数 // 整理参数
const ruleIdForm = { const ruleIdForm = {
goods_sku_id, goods_spu_id,
life_account_id, life_account_id,
start_time, start_time,
end_time, end_time,
...@@ -687,13 +687,13 @@ export default { ...@@ -687,13 +687,13 @@ export default {
second_commission_value: "", second_commission_value: "",
start_time: "", start_time: "",
end_time: "", end_time: "",
goods_sku_id: [], goods_spu_id: [],
}), }),
(this.timeSelect = []), (this.timeSelect = []),
(this.goods_list = []), (this.goods_list = []),
(this.ruleIdForm = { (this.ruleIdForm = {
life_account_id: "", life_account_id: "",
goods_sku_id: "", goods_spu_id: "",
start_time: "", start_time: "",
end_time: "", end_time: "",
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment