+
@@ -936,30 +623,19 @@
-
-
+
+
{{ item.name }}
-
+
否
@@ -967,45 +643,27 @@
-
+
-
-
+
+
- 添加运费模板
+ 添加运费模板
-
+
默认为0,则不限制购买件数
@@ -1216,38 +874,16 @@
- 上一步
+ 上一步
- 下一步
+ 下一步
- 提交
+ 提交
- 预览
+ 预览
@@ -1257,11 +893,7 @@
@@ -1375,7 +1007,7 @@ const objTitle = {
single_price: {
title: '单个售价'
},
- single_procure_price:{
+ single_procure_price: {
title: '单个批发价'
},
svip_price: {
@@ -1411,7 +1043,7 @@ export default {
taoBao,
copyRecord
},
- data () {
+ data() {
const url =
SettingMer.https + '/upload/image/0/file?ueditor=1&token=' + getToken()
return {
@@ -1550,10 +1182,8 @@ export default {
previewVisible: false,
previewKey: '',
deliveryType: [],
- virtual: [
- { tit: '普通商品', id: 0, tit2: '物流发货' },
- { tit: '虚拟商品', id: 1, tit2: '虚拟发货' }
- ],
+ virtual: [{ tit: '普通商品', id: 0, tit2: '物流发货' },
+ { tit: '虚拟商品', id: 1, tit2: '虚拟发货' }],
customBtn: 0, // 自定义留言开关
// 自定义留言下拉选择
CustomList: [
@@ -1624,11 +1254,11 @@ export default {
}
},
computed: {
- attrValue () {
+ attrValue() {
const obj = Object.assign({}, this.attrVal)
return obj
},
- oneFormBatch () {
+ oneFormBatch() {
const obj = [Object.assign({}, defaultObj.attrValue[0])]
if (this.OneattrValue[0] && this.OneattrValue[0]['image']) { obj[0]['image'] = this.OneattrValue[0]['image'] }
delete obj[0].bar_code
@@ -1643,7 +1273,7 @@ export default {
immediate: false,
deep: true
},
- currentTab (newVal) {
+ currentTab(newVal) {
if (newVal == 4) {
this.$nextTick(e => {
this.setSort()
@@ -1652,16 +1282,18 @@ export default {
}
},
- created () {
+ created() {
this.tempRoute = Object.assign({}, this.$route)
if (this.$route.params.id && this.formValidate.spec_type === 1) {
this.$watch('formValidate.attr', this.watCh)
}
},
- mounted () {
+ mounted() {
// console.log(this.$store.state.user.merchantType.type_code); // 店铺类型, 非市级供应链不显示批发价
if (this.$store.state.user.merchantType.type_code != 'TypeSupplyChain') {
- delete this.attrVal.procure_price
+ if(this.$store.state.user.merchantType.mer_type_id != 22) {
+ delete this.attrVal.procure_price
+ }
delete this.attrVal.single_number
delete this.attrVal.single_procure_price
delete this.attrVal.single_price
@@ -1693,12 +1325,12 @@ export default {
this.getLabelLst()
this.$store.dispatch('settings/setEdit', true);
},
- destroyed () {
+ destroyed() {
window.removeEventListener('popstate', this.goBack, false)
},
methods: {
- setSort () {
+ setSort() {
// // ref一定跟table上面的ref一致
// const el = this.$refs.tableParameter.$el.querySelectorAll(
// '.el-table__body-wrapper > table > tbody'
@@ -1714,17 +1346,17 @@ export default {
// }
// })
},
- elChangeExForArray (index1, index2, array) {
+ elChangeExForArray(index1, index2, array) {
const temp = array[index1]
array[index1] = array[index2]
array[index2] = temp
return array
},
- goBack () {
+ goBack() {
sessionStorage.clear()
window.history.back()
},
- handleCloseCoupon (tag) {
+ handleCloseCoupon(tag) {
this.formValidate.couponData.splice(
this.formValidate.couponData.indexOf(tag),
1
@@ -1735,7 +1367,7 @@ export default {
})
},
// 参数模板
- getSpecsLst (id) {
+ getSpecsLst(id) {
let cate_id = id ? id : this.formValidate.cate_id
specsSelectedApi({ cate_id: cate_id })
.then(res => {
@@ -1746,7 +1378,7 @@ export default {
this.$message.error(res.message)
})
},
- productCon () {
+ productCon() {
productConfigApi()
.then(res => {
this.extensionStatus = res.data.extension_status
@@ -1775,17 +1407,17 @@ export default {
})
},
// 获取标签项
- getLabelLst () {
+ getLabelLst() {
labelListApi({
type: 1
}).then(res => {
- this.labelList = res.data.list
- })
+ this.labelList = res.data.list
+ })
.catch(res => {
this.$message.error(res.message)
})
},
- addCoupon () {
+ addCoupon() {
const _this = this
this.$modalCoupon(
this.formValidate.couponData,
@@ -1801,14 +1433,14 @@ export default {
}
)
},
- delSpecs (index) {
+ delSpecs(index) {
this.formValidate.params.splice(index, 1)
},
- addSpecs () {
+ addSpecs() {
this.formValidate.params.push({ name: '', value: '', sort: 0 })
},
// 参数模板详情
- getSpecsList () {
+ getSpecsList() {
let merParams = [...this.customSpecs], sysParams = [...[this.formValidate.param_temp_id]]
let params = [...merParams, ...sysParams]
console.log(params)
@@ -1828,19 +1460,19 @@ export default {
})
}
},
- setTagsViewTitle () {
+ setTagsViewTitle() {
const title = '编辑商品'
const route = Object.assign({}, this.tempRoute, {
title: `${title}-${this.$route.params.id}`
})
this.$store.dispatch('tagsView/updateVisitedView', route)
},
- onChangeGroup () {
+ onChangeGroup() {
this.checkboxGroup.includes('is_good')
? (this.formValidate.is_good = 1)
: (this.formValidate.is_good = 0)
},
- watCh (val) {
+ watCh(val) {
const tmp = {}
const tmpTab = {}
this.formValidate.attr.forEach((o, i) => {
@@ -1868,13 +1500,14 @@ export default {
this.manyTabTit = tmp
this.manyTabDate = tmpTab
this.formThead = Object.assign({}, this.formThead, tmp)
+ console.log(this.form.formThead)
},
- attrFormat (arr) {
+ attrFormat(arr) {
let data = []
const res = []
return format(arr)
- function format (arr) {
+ function format(arr) {
if (arr.length > 1) {
arr.forEach((v, i) => {
if (i === 0) data = arr[i]['detail']
@@ -1952,29 +1585,29 @@ export default {
}
},
// 运费模板
- addTem () {
+ addTem() {
const _this = this
this.$modalTemplates(0, function () {
_this.getShippingList()
})
},
// 添加服务保障模板
- addServiceTem () {
+ addServiceTem() {
this.$refs.serviceGuarantee.add()
},
// 删除视频;
- delVideo () {
+ delVideo() {
const that = this
that.$set(that.formValidate, 'video_link', '')
},
- zh_uploadFile () {
+ zh_uploadFile() {
if (this.videoLink) {
this.formValidate.video_link = this.videoLink
} else {
this.$refs.refid.click()
}
},
- zh_uploadFile_change (evfile) {
+ zh_uploadFile_change(evfile) {
const that = this
that.progress = 10
const suffix = evfile.target.files[0].name.substr(
@@ -1989,7 +1622,7 @@ export default {
type: res.data.type,
evfile: evfile,
res: res,
- uploading (status, progress) {
+ uploading(status, progress) {
that.upload.videoIng = status
}
})
@@ -2005,18 +1638,18 @@ export default {
})
},
// 添加规则;
- addRule () {
+ addRule() {
const _this = this
this.$modalAttr(this.formDynamics, function () {
_this.productGetRule()
})
},
// 选择规格
- onChangeSpec (num) {
+ onChangeSpec(num) {
if (num === 1) this.productGetRule()
},
// 切换积分抵扣
- changeIntergral (e) {
+ changeIntergral(e) {
if (e == -1) {
this.formValidate.integral_rate = -1
} else {
@@ -2024,7 +1657,7 @@ export default {
}
},
// 选择属性确认
- confirm () {
+ confirm() {
if (!this.selectRule) {
return this.$message.warning('请选择属性')
}
@@ -2035,7 +1668,7 @@ export default {
})
},
// 商户分类;
- getCategorySelect () {
+ getCategorySelect() {
categorySelectApi()
.then(res => {
this.merCateList = res.data
@@ -2045,7 +1678,7 @@ export default {
})
},
// 平台分类;
- getCategoryList () {
+ getCategoryList() {
categoryListApi()
.then(res => {
res.data.forEach(item => {
@@ -2060,7 +1693,7 @@ export default {
})
},
// 品牌筛选;
- getBrandListApi () {
+ getBrandListApi() {
categoryBrandListApi()
.then(res => {
this.BrandList = res.data
@@ -2070,39 +1703,39 @@ export default {
})
},
// 获取商品属性模板;
- productGetRule () {
+ productGetRule() {
templateLsitApi().then(res => {
this.ruleList = res.data
})
},
// 运费模板;
- getShippingList () {
+ getShippingList() {
shippingListApi().then(res => {
this.shippingList = res.data
})
},
// 获取服务保障模板
- getGuaranteeList () {
+ getGuaranteeList() {
guaranteeListApi().then(res => {
this.guaranteeList = res.data
})
},
- showInput (item) {
+ showInput(item) {
this.$set(item, 'inputVisible', true)
},
- virtualbtn (id, type) {
+ virtualbtn(id, type) {
if (this.$route.params.id) {
return this.$message.warning('商品类型不能切换!')
}
this.formValidate.type = id
this.productCon()
},
- customMessBtn (e) {
+ customMessBtn(e) {
if (!e) {
this.formValidate.extend = []
}
},
- addcustom () {
+ addcustom() {
if (this.formValidate.extend.length > 9) {
this.$message.warning('最多添加10条')
} else {
@@ -2114,10 +1747,10 @@ export default {
})
}
},
- delcustom (index) {
+ delcustom(index) {
this.formValidate.extend.splice(index, 1)
},
- onChangetype (item) {
+ onChangetype(item) {
if (item === 1) {
this.OneattrValue.map(item => {
this.$set(item, 'extension_one', null)
@@ -2140,7 +1773,7 @@ export default {
})
}
},
- onChangeSpecs (item) {
+ onChangeSpecs(item) {
if (item == 1 || item == 2) {
this.attrVal = {
price: null,
@@ -2167,18 +1800,19 @@ export default {
bar_code: '',
cost: null,
ot_price: null,
+ prepure_price:null
// weight: null,
// volume: null
}
}
},
- memberPrice (formHead, row) {
+ memberPrice(formHead, row) {
if (formHead.title == '售价') {
row.svip_price = this.accMul(row.price, this.svip_rate)
}
},
// 乘法
- accMul (arg1, arg2) {
+ accMul(arg1, arg2) {
var max = 0
var s1 = arg1.toString()
var s2 = arg2.toString()
@@ -2194,11 +1828,11 @@ export default {
)
},
// 删除表格中的属性
- delAttrTable (index) {
+ delAttrTable(index) {
this.ManyAttrValue.splice(index, 1)
},
// 批量添加
- batchAdd () {
+ batchAdd() {
for (const val of this.ManyAttrValue) {
console.log(this.oneFormBatch[0])
if (this.oneFormBatch[0].image != '') this.$set(val, 'image', this.oneFormBatch[0].image)
@@ -2215,29 +1849,29 @@ export default {
}
},
// 添加按钮
- addBtn () {
+ addBtn() {
this.clearAttr()
this.isBtn = true
},
// 取消
- offAttrName () {
+ offAttrName() {
this.isBtn = false
},
- clearAttr () {
+ clearAttr() {
this.formDynamic.attrsName = ''
this.formDynamic.attrsVal = ''
},
// 删除规格
- handleRemoveAttr (index) {
+ handleRemoveAttr(index) {
this.formValidate.attr.splice(index, 1)
this.manyFormValidate.splice(index, 1)
},
// 删除属性
- handleClose (item, index) {
+ handleClose(item, index) {
item.splice(index, 1)
},
// 添加规则名称
- createAttrName () {
+ createAttrName() {
if (this.formDynamic.attrsName && this.formDynamic.attrsVal) {
const data = {
value: this.formDynamic.attrsName,
@@ -2261,7 +1895,7 @@ export default {
}
},
// 添加属性
- createAttr (num, idx) {
+ createAttr(num, idx) {
if (num) {
this.formValidate.attr[idx].detail.push(num);
var hash = {};
@@ -2278,7 +1912,7 @@ export default {
}
},
// 详情
- getInfo () {
+ getInfo() {
this.fullscreenLoading = true;
productDetailApi(this.$route.params.id)
.then(async res => {
@@ -2292,7 +1926,7 @@ export default {
this.$message.error(res.message);
});
},
- infoData (info) {
+ infoData(info) {
this.deduction_set = info.integral_rate == -1 ? -1 : 1;
this.formValidate = {
image: info.image,
@@ -2346,6 +1980,7 @@ export default {
bar_code: "",
cost: null,
ot_price: null,
+ procure_price:null,//采购价新加
// weight: null,
// volume: null
};
@@ -2354,6 +1989,7 @@ export default {
}
if (this.formValidate.spec_type === 0) {
this.OneattrValue = info.attrValue;
+ console.log(this.OneattrValue)
} else {
this.ManyAttrValue = info.attrValue;
this.ManyAttrValue.forEach(val => {
@@ -2372,15 +2008,15 @@ export default {
this.fullscreenLoading = false;
},
//关闭淘宝弹窗并生成数据;
- onClose (data) {
+ onClose(data) {
this.modals = false;
this.infoData(data);
},
- handleRemove (i) {
+ handleRemove(i) {
this.formValidate.slider_image.splice(i, 1);
},
// 点击商品图
- modalPicTap (tit, num, i) {
+ modalPicTap(tit, num, i) {
const _this = this;
const attr = [];
this.$modalUpload(function (img) {
@@ -2418,20 +2054,20 @@ export default {
}, tit);
},
// 删除详情图片
- deleteContentImg (index) {
+ deleteContentImg(index) {
this.formValidate.content.image.splice(index, 1)
},
- handleSubmitUp () {
+ handleSubmitUp() {
this.currentTab = (Number(this.currentTab) - 1).toString();
},
- handleSubmitNest (name) {
+ handleSubmitNest(name) {
this.$refs[name].validate(valid => {
if (valid) {
this.currentTab = (Number(this.currentTab) + 1).toString();
}
});
},
- validateAttr () {
+ validateAttr() {
Object.keys(this.formValidate.attrValue[0]).forEach((item) => {
if (this.formValidate.attrValue[0][item] == undefined && item != 'bar_code') {
this.formValidate.attrValue[0][item] = 0;
@@ -2439,7 +2075,7 @@ export default {
})
},
// 提交
- handleSubmit (name) {
+ handleSubmit(name) {
this.$store.dispatch("settings/setEdit", false);
this.onChangeGroup();
if (this.formValidate.spec_type === 1) {
@@ -2518,7 +2154,7 @@ export default {
});
},
//预览
- handlePreview (name) {
+ handlePreview(name) {
this.onChangeGroup();
if (this.formValidate.spec_type === 1) {
this.formValidate.attrValue = this.ManyAttrValue;
@@ -2536,13 +2172,13 @@ export default {
});
},
// 表单验证
- validate (prop, status, error) {
+ validate(prop, status, error) {
if (status === false) {
this.$message.warning(error);
}
},
// 规格图片验证
- specPicValidate (ManyAttrValue) {
+ specPicValidate(ManyAttrValue) {
for (let i = 0; i < ManyAttrValue.length; i++) {
if (ManyAttrValue[i].image === "" || !ManyAttrValue[i].image) {
this.$message.warning("请上传商品规格图!");
@@ -2552,16 +2188,16 @@ export default {
}
},
// 移动
- handleDragStart (e, item) {
+ handleDragStart(e, item) {
this.dragging = item;
},
- handleDragEnd (e, item) {
+ handleDragEnd(e, item) {
this.dragging = null;
},
- handleDragOver (e) {
+ handleDragOver(e) {
e.dataTransfer.dropEffect = "move";
},
- handleDragEnter (e, item) {
+ handleDragEnter(e, item) {
e.dataTransfer.effectAllowed = "move";
if (item === this.dragging) {
return;
@@ -2573,7 +2209,7 @@ export default {
this.formValidate.slider_image = newItems;
},
// 添加自定义弹窗
- addCustomDialog (editorId) {
+ addCustomDialog(editorId) {
window.UE.registerUI(
"test-dialog",
function (editor, uiName) {
@@ -2639,9 +2275,11 @@ export default {
height: 100%;
background: rgba(0, 0, 0, 0.5);
}
+
.goods_detail .goods_detail_wrapper {
z-index: -10;
}
+
/deep/ .upLoadPicBox {
.upLoad {
-webkit-box-orient: vertical;
@@ -2652,65 +2290,81 @@ export default {
flex-direction: column;
line-height: 20px;
}
+
span {
font-size: 10px;
}
}
+
.proCoupon {
/deep/ .el-form-item__content {
margin-top: 5px;
}
}
+
.tabPic {
width: 40px !important;
height: 40px !important;
+
img {
width: 100%;
height: 100%;
}
}
+
.noLeft {
/deep/ .el-form-item__content {
margin-left: 0 !important;
}
}
+
.tabNumWidth {
/deep/ .el-input-number--medium {
width: 100px;
}
+
/deep/ .el-input-number__increase {
width: 20px !important;
font-size: 12px !important;
}
+
/deep/ .el-input-number__decrease {
width: 20px !important;
font-size: 12px !important;
}
+
/deep/ .el-input-number--medium .el-input__inner {
padding-left: 25px !important;
padding-right: 25px !important;
}
+
/deep/.priceBox .el-input-number__decrease,
/deep/.priceBox .el-input-number__increase {
display: none;
}
+
/deep/.priceBox .el-input-number.is-controls-right .el-input__inner {
padding: 0 5px;
}
+
/deep/ thead {
line-height: normal !important;
}
+
/deep/.cell {
line-height: normal !important;
text-overflow: clip !important;
}
}
+
.virtual_boder {
border: 1px solid #1890ff;
}
+
.virtual_boder2 {
border: 1px solid #e7e7e7;
}
+
.virtual_san {
position: absolute;
bottom: 0;
@@ -2720,6 +2374,7 @@ export default {
border-bottom: 26px solid #1890ff;
border-left: 26px solid transparent;
}
+
.virtual_dui {
position: absolute;
bottom: -2px;
@@ -2727,6 +2382,7 @@ export default {
color: #ffffff;
font-family: system-ui;
}
+
.virtual {
width: 120px;
height: 60px;
@@ -2738,20 +2394,24 @@ export default {
position: relative;
cursor: pointer;
line-height: 23px;
+
.virtual_top {
font-size: 14px;
font-weight: 600;
color: rgba(0, 0, 0, 0.85);
}
+
.virtual_bottom {
font-size: 12px;
font-weight: 400;
color: #999999;
}
}
+
.virtual:nth-child(2n) {
margin: 0 12px;
}
+
.addfont {
display: inline-block;
font-size: 13px;
@@ -2760,49 +2420,60 @@ export default {
margin-left: 14px;
cursor: pointer;
}
+
.titTip {
display: inline-bolck;
font-size: 12px;
font-weight: 400;
color: #999999;
}
+
.addCustom_content {
margin-top: 20px;
+
.custom_box {
margin-bottom: 10px;
}
}
+
.addCustomBox {
margin-top: 12px;
font-size: 13px;
font-weight: 400;
color: #1890ff;
+
.btn {
cursor: pointer;
width: max-content;
}
+
.remark {
display: flex;
margin-top: 14px;
}
}
+
.selWidth {
width: 50%;
}
+
.ml15 {
margin-left: 15px;
}
+
.button-new-tag {
height: 28px;
line-height: 26px;
padding-top: 0;
padding-bottom: 0;
}
+
.input-new-tag {
width: 90px;
margin-left: 10px;
vertical-align: bottom;
}
+
.pictrue {
width: 60px;
height: 60px;
@@ -2810,15 +2481,18 @@ export default {
margin-right: 10px;
position: relative;
cursor: pointer;
+
img {
width: 100%;
height: 100%;
}
}
+
.details_pictrue {
width: 120px;
height: 120px;
}
+
.iview-video-style {
width: 40%;
height: 180px;
@@ -2828,6 +2502,7 @@ export default {
position: relative;
overflow: hidden;
}
+
.iconv {
color: #fff;
line-height: 180px;
@@ -2838,6 +2513,7 @@ export default {
left: 50%;
margin-left: -25px;
}
+
.iview-video-style .mark {
position: absolute;
width: 100%;
@@ -2846,15 +2522,19 @@ export default {
background-color: rgba(0, 0, 0, 0.5);
text-align: center;
}
+
.uploadVideo {
margin-left: 10px;
}
+
.perW50 {
width: 50%;
}
+
.submission {
margin-left: 10px;
}
+
.btndel {
position: absolute;
z-index: 1;
@@ -2863,6 +2543,7 @@ export default {
left: 46px;
top: -4px;
}
+
.labeltop {
/deep/ .el-form-item__label {
float: none !important;
diff --git a/src/views/product/productLabel/index.vue b/src/views/product/productLabel/index.vue
index d9a4deb..5cdf404 100644
--- a/src/views/product/productLabel/index.vue
+++ b/src/views/product/productLabel/index.vue
@@ -4,49 +4,30 @@
添加商品标签
-
+
+
-
+
编辑
- 删除
+ 删除
-
+
@@ -67,7 +48,8 @@ import {
labelCreateApi,
labelUpdateApi,
labelDeleteApi,
- labelStatusApi } from '@/api/product'
+ labelStatusApi
+} from '@/api/product'
export default {
name: 'LabelList',
data() {