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