Commit cae07da9 by zhouzy

Merge branch 'master' of http://192.168.3.233:8090/glsx-web/glsx-dj-oss-equity into master

2 parents a809a3a6 947550aa
<template>
<div class="back">
<el-button @click="jump">返回</el-button>
</div>
</template>
<script>
export default {
name: 'back',
methods: {
jump () {
window.history.go(-1)
}
}
}
</script>
\ No newline at end of file
import Vue from 'vue'
// 注意 有些组件使用异步加载会有影响
Vue.component('back', () =>
import ('./back/index.vue'))
Vue.component('table-tooltip', () =>
import ('./table-tooltip/index.vue'))
Vue.component('d2-table', () =>
......
......@@ -75,10 +75,6 @@ export default {
this.getGoodsList(id)
this.goodsCategoryId = id
},
/** */
tagHover(index, type) {
this.$refs[`tag-${index}`][0].$el.classList[type]('tag-hover')
},
showInput(index, val) {
this.inputValue = val
this.$refs[`tag-input-${index}`][0].$el.classList.add('input-tag-show')
......@@ -92,11 +88,11 @@ export default {
}
goodsEquityManageApi.categoryUpdate({ id, goodsCategory }).then(({ code, message }) => {
if (code == 0) {
this.$refs[`tag-input-${index}`][0].$el.classList.remove('input-tag-show')
this.getCategoryList()
} else {
this.$message.error(message)
}
this.$refs[`tag-input-${index}`][0].$el.classList.remove('input-tag-show')
})
},
/**删除分类 */
......
......@@ -46,20 +46,13 @@
effect="dark"
:type="item.active ? '':'info'"
@click.native="changeGoodsCategory({id:item.id,index})"
@mouseover.native="tagHover(index,'add')"
@mouseleave.native="tagHover(index,'remove')"
:ref="`tag-${index}`"
@dblclick.native="showInput(index, item.goodsCategory)"
>
<div class="mask">
<span
class="edit"
@click.stop="showInput(index, item.goodsCategory)"
>编辑</span>
<span
class="del"
@click.stop="categoryDelete(item.id)"
>删除</span>
</div>
<i
class="del el-icon-error"
@click.stop="categoryDelete(item.id)"
></i>
{{item.goodsCategory}}
<el-input
class="input-tag"
......@@ -149,7 +142,7 @@ export default {
}
},
mounted () {
// this.init()
},
methods: {
init () {
......@@ -224,21 +217,15 @@ export default {
.el-tag {
position: relative;
cursor: pointer;
user-select: none;
}
.el-tag .mask {
display: none !important;
.el-tag .del {
position: absolute;
width: 100%;
height: 100%;
box-sizing: border-box;
background-color: rgba(0, 0, 0, 0.4);
left: 0;
top: 0;
color: #fff;
align-items: center;
justify-content: space-between;
padding: 0 5px;
user-select: none;
right: -6px;
top: -6px;
}
.el-tag--info .del {
display: none;
}
.input-tag {
display: none !important;
......
......@@ -9,6 +9,7 @@
:key="resetTime"
>
<div class="box">
<back />
<div class="title">商品类型</div>
<el-radio-group :value="1">
<el-radio-button :label="1">品牌商品</el-radio-button>
......@@ -47,7 +48,6 @@
</el-form-item>
<el-form-item
label="品牌名称"
required
prop="brandName"
>
<el-select
......@@ -68,7 +68,6 @@
<el-form-item
label="商品名称"
prop="productName"
required
>
<el-input
v-model="ruleForm.productName"
......@@ -78,7 +77,6 @@
<el-form-item
label="商品编码"
prop="productId"
required
>
<el-input
v-model="ruleForm.productId"
......@@ -116,7 +114,6 @@
v-if="ruleForm.appearance != 1"
label="直充面额"
prop="denomination"
required
>
<el-input
v-model.number="ruleForm.denomination"
......@@ -130,7 +127,6 @@
<el-form-item
label="销售价"
prop="salesPrice"
required
>
<el-input
v-model.number="ruleForm.salesPrice"
......@@ -144,7 +140,6 @@
<el-form-item
label="成本含税价"
prop="costPrice"
required
>
<el-input
......@@ -159,7 +154,6 @@
<el-form-item
label="官方价/划线价"
prop="lineationPrice"
required
>
<el-input
......@@ -246,7 +240,7 @@
type="primary"
@click="onSubmit"
>提交</el-button>
<el-button @click="onSubmit">保存</el-button>
<el-button @click="onSubmit('save')">保存</el-button>
</el-form-item>
</div>
</el-form>
......@@ -448,7 +442,8 @@ export default {
}
}
},
onSubmit () {
onSubmit (flag) {
this.$refs.ruleForm.validate((valid) => {
if (!valid) {
console.log('error submit!!')
......@@ -462,6 +457,10 @@ export default {
if (e.brandId == this.ruleForm.brandId) this.ruleForm.brandName = e.brandName
})
console.log(this.ruleForm)
if (flag) {
this.createGoods()
return
}
let { supplier, brandId, productId } = this.ruleForm
orderApi.sameGoodsCheck({
supplier,
......
......@@ -66,7 +66,7 @@
v-for="item in brandNameList"
:key="item.id"
:label="item.brandName"
:value="item.id"
:value="item.brandName"
>
</el-option>
</el-select>
......@@ -110,7 +110,7 @@
>编辑</el-button>
<el-button
type="text"
@click="jump(scope.scope)"
@click="copy(scope.scope)"
>复制</el-button>
</span>
<template slot='custom'>
......@@ -243,6 +243,26 @@ export default {
if (edit) url = `${url}&edit=true`
window.location.href = url
},
copy ({ id }) {
orderApi.getEquityGoodsById({ id }).then(({ code, data, message }) => {
if (code == 0) {
orderApi.createGoods(data).then(res => {
if (res.code == 0) {
this.$message({
message: '复制成功!',
type: 'success'
})
this.search()
} else {
this.$message.error(res.message)
}
})
} else {
this.$message.error(message)
}
})
},
toggleAll () {
let { goodsIndexMutiTable } = this.$refs.table.$refs
let { data } = goodsIndexMutiTable
......
<template>
<div class="layout">
<div class="box">
<back />
<div class="grid">
<div class="grid-item">订单编号: {{detailInfo.orderCode}}</div>
<div class="grid-item">下单时间: {{detailInfo.time}}</div>
......
<template>
<div class="layout">
<div class="box">
<back />
<div class="grid">
<template v-for="(item,index) in detailInfoObj">
<div
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!