Commit 5c3b90ee authored by pengyunqian's avatar pengyunqian

update:改字段2

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