Browse Source

完善定/调价管理

master
yunuo970428 3 months ago
parent
commit
21fe8d64c9
  1. 208
      yxt-as-ui/src/views/storage/adjustment/adjustmentAdd.vue
  2. 104
      yxt-as-ui/src/views/storage/adjustment/adjustmentInfo.vue
  3. 84
      yxt-as-ui/src/views/storage/adjustment/index.vue
  4. 52
      yxt-as-ui/src/views/workFlow/adjustmentFlow/adjustmentDaiBan.vue
  5. 111
      yxt-as-ui/src/views/workFlow/adjustmentFlow/adjustmentEdit.vue
  6. 38
      yxt-as-ui/src/views/workFlow/adjustmentFlow/adjustmentYiBan.vue

208
yxt-as-ui/src/views/storage/adjustment/adjustmentAdd.vue

@ -3,7 +3,7 @@
<div v-show="viewState == 1"> <div v-show="viewState == 1">
<div class="tab-header webtop"> <div class="tab-header webtop">
<!-- 标题 --> <!-- 标题 -->
<div>{{title}}定调价策略申请</div> <div>{{ title }}定调价策略申请</div>
<!-- start 添加修改按钮 --> <!-- start 添加修改按钮 -->
<div> <div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button> <el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button>
@ -13,15 +13,9 @@
<!-- end 添加修改按钮 --> <!-- end 添加修改按钮 -->
<!-- end 详情按钮 --> <!-- end 详情按钮 -->
</div> </div>
<div class="listconadd"> <div class="listconadd">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02"> <el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<!-- <div class="title">
<div>基础信息</div>
</div> -->
<el-row class="first_row"> <el-row class="first_row">
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">申请人</div> <div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
@ -35,141 +29,120 @@
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<div class="span-sty">备注</div> <div class="span-sty">备注</div>
<el-form-item> <el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" <el-form-item>
type="textarea" :rows="4" clearable /></el-form-item> <el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" type="textarea" :rows="4" clearable/>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div class="title titleOne"> <div class="title titleOne">
<div>商品类别列表</div> <div>商品类别列表</div>
<el-button type="primary" size="mini" class="btntopblueline" @click="categoryAdd()">添加</el-button> <el-button type="primary" size="mini" class="btntopblueline" @click="categoryAdd()">添加</el-button>
</div> </div>
<el-table v-loading="listLoading" :data="formobj.smsPricestrategyBillDetailList" border style="width: 100%;"> <el-table v-loading="listLoading" :data="formobj.smsPricestrategyBillDetailList" border style="width: 100%;">
<!-- <el-table-column fixed width="50" type="selection" align="center" /> --> <el-table-column fixed width="80" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column fixed width="80" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column fixed label="操作" wid align="center" width="200"> <el-table-column fixed label="操作" wid align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" @click="deleteGoodsType(scope.row)">删除</el-button> <el-button type="primary" size="mini" @click="deleteGoodsType(scope.$index)">删除</el-button>
<el-button type="primary" size="mini" @click="editPriceStrategy(scope.row)">编辑</el-button> <el-button type="primary" size="mini" @click="editPriceStrategy(scope.row)">编辑</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="类别编码" prop="goodsTypeCode" align="center" /> <el-table-column label="类别编码" prop="goodsTypeCode" align="center"/>
<el-table-column label="类别名称" prop="goodsTypeName" align="center" /> <el-table-column label="类别名称" prop="goodsTypeName" align="center"/>
<el-table-column label="价格策略" align="center"> <el-table-column label="价格策略" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{calculation(scope.row)}} {{ calculation(scope.row) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="策略明细" align="center" width="600"> <el-table-column label="策略明细" align="center" width="600">
<template slot-scope="scope"> <template slot-scope="scope">
{{calculation2(scope.row)}} {{ calculation2(scope.row) }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-form> </el-form>
</div> </div>
</div> </div>
<!-- 选择商品类别 --> <!-- 选择商品类别 -->
<choosecategory v-show="viewState == 2" ref="choosecategory" @backData="backData" @doback="resetState" /> <choosecategory v-show="viewState == 2" ref="choosecategory" @backData="backData" @doback="resetState"/>
<!-- 编辑价格策略 --> <!-- 编辑价格策略 -->
<editPriceStrategy v-show="viewState == 3" ref="editPriceStrategy" @backData2="backData2" @doback="resetState" /> <editPriceStrategy v-show="viewState == 3" ref="editPriceStrategy" @backData2="backData2" @doback="resetState"/>
</div> </div>
</template> </template>
<script> <script>
import req from '@/api/storage/adjustment.js' import req from '@/api/storage/adjustment.js'
import { import {
getCurrentDate getCurrentDate
} from '@/utils/index.js' } from '@/utils/index.js'
import choosecategory from './relation/choosecategory' import choosecategory from './relation/choosecategory'
import editPriceStrategy from './relation/editPriceStrategy' import editPriceStrategy from './relation/editPriceStrategy'
import { import {
getOrgSidByPath getOrgSidByPath
} from '@/api/Common/dictcommons' } from '@/api/Common/dictcommons'
export default {
export default {
components: { components: {
choosecategory, choosecategory,
editPriceStrategy editPriceStrategy
}, },
data() { data() {
return { return {
title: "【新增】", title: '【新增】',
viewState: 1, viewState: 1,
listLoading: false, listLoading: false,
submitdisabled: false, submitdisabled: false,
formobj: { formobj: {
"sid": "", sid: '',
"createByName": window.sessionStorage.getItem('name'), createByName: window.sessionStorage.getItem('name'),
"billNo": "", billNo: '',
"deptName": window.sessionStorage.getItem('defaultOrgPathName').substring(window deptName: window.sessionStorage.getItem('defaultOrgPathName').substring(window
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1), .sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1),
"deptSid": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage deptSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
.getItem('defaultOrgPath').lastIndexOf('/') + 1), .getItem('defaultOrgPath').lastIndexOf('/') + 1),
"remarks": "", remarks: '',
"createBySid": window.sessionStorage.getItem('userSid'), createBySid: window.sessionStorage.getItem('userSid'),
"createTime": getCurrentDate(), createTime: getCurrentDate(),
"procDefId": "", procDefId: '',
"nodeId": "", nodeId: '',
"procInstId": "", procInstId: '',
"nodeState": "", nodeState: '',
"taskId": "", taskId: '',
"finishTime": "", finishTime: '',
"useOrgSid": "", useOrgSid: '',
"useOrgName": "", useOrgName: '',
"smsPricestrategyBillDetailList": [] smsPricestrategyBillDetailList: []
}, }
} }
},
created() {
}, },
methods: { methods: {
calculation(row) { calculation(row) {
console.log("calculation》》》》", row)
var info = '' var info = ''
if (row.strategyType == 1) { if (row.strategyType == 1) {
info = '固定比例' info = '固定比例'
} }
if (row.strategyType == 2) { if (row.strategyType == 2) {
info = '价格区间' info = '价格区间'
} }
return info return info
}, },
calculation2(row) { calculation2(row) {
var info = '' var info = ''
if (row.strategyType == 2) { if (row.strategyType == 2) {
for (var i = 0; i < row.smsPricestrategyBillGoodstypedetailList.length; i++) { for (var i = 0; i < row.smsPricestrategyBillGoodstypedetailList.length; i++) {
info += row.smsPricestrategyBillGoodstypedetailList[i].rangeStart + '-' + row
info += row.smsPricestrategyBillGoodstypedetailList[i].rangeStart + "——" + row .smsPricestrategyBillGoodstypedetailList[i].rangeEnd + ' ' + row
.smsPricestrategyBillGoodstypedetailList[i].rangeEnd + " " + row
.smsPricestrategyBillGoodstypedetailList[i] .smsPricestrategyBillGoodstypedetailList[i]
.markupRate + ";" .markupRate + '%;'
} }
} else { } else {
info = row.gdMarkupRate info = row.gdMarkupRate + '%'
} }
return info return info
}, },
deleteGoodsType(index) {
deleteGoodsType(row) {
const index = this.formobj.smsPricestrategyBillDetailList.findIndex((item) => item === row)
console.log("index》》》》", index)
this.formobj.smsPricestrategyBillDetailList.splice(index, 1) this.formobj.smsPricestrategyBillDetailList.splice(index, 1)
}, },
editPriceStrategy(row) { editPriceStrategy(row) {
@ -179,58 +152,35 @@
}, },
backData(value) { backData(value) {
this.viewState = 1 this.viewState = 1
console.log('>>>>>>>>>backData', value)
for (var i = 0; i < value.length; i++) { for (var i = 0; i < value.length; i++) {
this.formobj.smsPricestrategyBillDetailList.push( this.formobj.smsPricestrategyBillDetailList.push(
{ {
goodsTypeSid: value[i].sid, goodsTypeSid: value[i].sid,
goodsTypeCode: value[i].goodsTypeCode, goodsTypeCode: value[i].goodsTypeCode,
goodsTypeName: value[i].goodsTypeName, goodsTypeName: value[i].goodsTypeName,
strategyType: '', strategyType: '',
strategyTypeValue: '', strategyTypeValue: '',
gdMarkupRate: "", gdMarkupRate: '',
strategyDetail: '', strategyDetail: '',
smsPricestrategyBillGoodstypedetailList: [] smsPricestrategyBillGoodstypedetailList: []
} }
) )
} }
}, },
backData2(value) { backData2(value) {
this.viewState = 1 this.viewState = 1
console.log('>>>>>>>>>backData2', value)
var info = '' var info = ''
if (value.strategyType == 2) { if (value.strategyType == 2) {
for (var i = 0; i < value.smsPricestrategyBillGoodstypedetailList.length; i++) { for (var i = 0; i < value.smsPricestrategyBillGoodstypedetailList.length; i++) {
info += value.smsPricestrategyBillGoodstypedetailList[i].rangeStart + '-' + value
info += value.smsPricestrategyBillGoodstypedetailList[i].rangeStart + "——" + value .smsPricestrategyBillGoodstypedetailList[i].rangeEnd + ' ' + value
.smsPricestrategyBillGoodstypedetailList[i].rangeEnd + " " + value
.smsPricestrategyBillGoodstypedetailList[i] .smsPricestrategyBillGoodstypedetailList[i]
.markupRate + ";" .markupRate + '%;'
} }
} }
const choose = this.formobj.smsPricestrategyBillDetailList.filter((item) => item.goodsTypeSid == value.goodsTypeSid)
console.log('>>>>>>>>>backData2', info)
const choose = this.formobj.smsPricestrategyBillDetailList.filter((item) => item.goodsTypeSid == value
.goodsTypeSid)
console.log('>>>>>>>>>busTypeSelect', choose)
// choose[0].strategyDetail = value.strategyType == 0 ? value.gdMarkupRate : info
choose[0].smsPricestrategyBillGoodstypedetailList = value.smsPricestrategyBillGoodstypedetailList choose[0].smsPricestrategyBillGoodstypedetailList = value.smsPricestrategyBillGoodstypedetailList
choose[0].strategyType = value.strategyType choose[0].strategyType = value.strategyType
// choose[0].strategyTypeValue = value.strategyType == 0 ? '' : ''
if (value.strategyType == 1) { if (value.strategyType == 1) {
choose[0].strategyTypeValue = '固定比例' choose[0].strategyTypeValue = '固定比例'
choose[0].strategyDetail = value.gdMarkupRate choose[0].strategyDetail = value.gdMarkupRate
@ -239,14 +189,10 @@
choose[0].strategyTypeValue = '价格区间' choose[0].strategyTypeValue = '价格区间'
choose[0].strategyDetail = info choose[0].strategyDetail = info
} }
console.log('>>>>>>>>>backData2', choose)
}, },
resetState() { resetState() {
this.viewState = 1 this.viewState = 1
}, },
categoryAdd() { categoryAdd() {
this.viewState = 2 this.viewState = 2
const aa = [] const aa = []
@ -256,9 +202,6 @@
return index + 1 return index + 1
}, },
saveOrUpdate() { saveOrUpdate() {
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
this.$refs['form_obj'].validate((valid) => { this.$refs['form_obj'].validate((valid) => {
if (valid) { if (valid) {
this.submitdisabled = true this.submitdisabled = true
@ -280,8 +223,6 @@
}) })
}, },
submintdate() { submintdate() {
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
if (this.formobj.smsPricestrategyBillDetailList.length == 0) { if (this.formobj.smsPricestrategyBillDetailList.length == 0) {
this.$message({ this.$message({
showClose: true, showClose: true,
@ -290,8 +231,6 @@
}) })
return return
} }
this.$refs['form_obj'].validate((valid) => { this.$refs['form_obj'].validate((valid) => {
if (valid) { if (valid) {
this.submitdisabled = true this.submitdisabled = true
@ -315,17 +254,12 @@
handleReturn(isreload) { handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist') if (isreload === 'true') this.$emit('reloadlist')
this.submitdisabled = false this.submitdisabled = false
this.formobj = { this.formobj = {}
}
this.$emit('doback') this.$emit('doback')
}, },
showAdd() { showAdd() {
this.title = '【新增】' this.title = '【新增】'
getOrgSidByPath({ getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => {
orgPath: window.sessionStorage.getItem('defaultOrgPath')
}).then((res) => {
if (res.success) { if (res.success) {
this.formobj.createOrgSid = res.data this.formobj.createOrgSid = res.data
this.formobj.useOrgSid = res.data this.formobj.useOrgSid = res.data
@ -333,53 +267,49 @@
}) })
}, },
showEdit(row) { showEdit(row) {
this.title = '【编辑】' this.title = '【编辑】'
req.init(row.sid).then(resp => {
req.init(row.sid)
.then(resp => {
if (resp.success) { if (resp.success) {
this.formobj = resp.data this.formobj = resp.data
} }
}) }).catch(e => {
.catch(e => {
this.formobj = {} this.formobj = {}
}) })
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
/deep/ .el-form-item__error { /deep/ .el-form-item__error {
margin-left: 120px !important; margin-left: 120px !important;
} }
.must { .must {
color: #f00; color: #f00;
} }
.span-sty { .span-sty {
width: 130px !important; width: 130px !important;
} }
.addinputInfo { .addinputInfo {
margin-left: 120px !important; margin-left: 120px !important;
} }
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { .formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important; margin-left: 120px !important;
width: calc(100% - 115px); width: calc(100% - 115px);
} }
.first_row { .first_row {
border-top: 1px solid #E0E3EB; border-top: 1px solid #E0E3EB;
} }
.titleOne { .titleOne {
padding: 7px; padding: 7px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
</style> </style>

104
yxt-as-ui/src/views/storage/adjustment/adjustmentInfo.vue

@ -1,6 +1,5 @@
<template> <template>
<div> <div>
<div class="tab-header webtop"> <div class="tab-header webtop">
<!-- 标题 --> <!-- 标题 -->
<div>定调价策略申请</div> <div>定调价策略申请</div>
@ -11,15 +10,9 @@
<!-- end 添加修改按钮 --> <!-- end 添加修改按钮 -->
<!-- end 详情按钮 --> <!-- end 详情按钮 -->
</div> </div>
<div class="listconadd"> <div class="listconadd">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02"> <el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<!-- <div class="title">
<div>基础信息</div>
</div> -->
<el-row class="first_row"> <el-row class="first_row">
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">申请人</div> <div class="span-sty">申请人</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item> <el-form-item><span class="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item>
@ -33,59 +26,48 @@
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item> <el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<div class="span-sty">备注</div> <div class="span-sty">备注</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.remarks }}</span></el-form-item> <el-form-item><span class="addinputw addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div class="title">
<div class="title titleOne">
<div>商品类别列表</div> <div>商品类别列表</div>
<!-- <el-button type="primary" size="mini" class="btntopblueline" @click="batchAddAll()">添加</el-button> -->
</div> </div>
<el-table v-loading="listLoading" :data="formobj.smsPricestrategyBillDetailList" border style="width: 100%;"> <el-table v-loading="listLoading" :data="formobj.smsPricestrategyBillDetailList" border style="width: 100%;">
<!-- <el-table-column fixed width="50" type="selection" align="center" /> --> <el-table-column fixed width="80" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column fixed width="80" label="序号" type="index" :index="indexMethod" align="center" /> <el-table-column label="类别编码" prop="goodsTypeCode" align="center"/>
<el-table-column label="类别编码" prop="goodsTypeCode" align="center" /> <el-table-column label="类别名称" prop="goodsTypeName" align="center"/>
<el-table-column label="类别名称" prop="goodsTypeName" align="center" />
<el-table-column label="价格策略" align="center"> <el-table-column label="价格策略" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{calculation(scope.row)}} {{ calculation(scope.row) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="策略明细" align="center" width="600"> <el-table-column label="策略明细" align="center" width="600">
<template slot-scope="scope"> <template slot-scope="scope">
{{calculation2(scope.row)}} {{ calculation2(scope.row) }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-form> </el-form>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import req from '@/api/storage/adjustment.js' import req from '@/api/storage/adjustment.js'
export default {
export default {
components: {}, components: {},
data() { data() {
return { return {
listLoading: false, listLoading: false,
submitdisabled: false, submitdisabled: false,
formobj: { formobj: {}
},
} }
}, },
created() {},
methods: { methods: {
calculation(row) { calculation(row) {
var info = '' var info = ''
if (row.strategyType == 1) { if (row.strategyType == 1) {
@ -98,86 +80,60 @@
}, },
calculation2(row) { calculation2(row) {
var info = '' var info = ''
if (row.smsPricestrategyBillGoodstypedetailList != null && row.smsPricestrategyBillGoodstypedetailList.length > if (row.smsPricestrategyBillGoodstypedetailList != null && row.smsPricestrategyBillGoodstypedetailList.length >
0) { 0) {
for (var i = 0; i < row.smsPricestrategyBillGoodstypedetailList.length; i++) { for (var i = 0; i < row.smsPricestrategyBillGoodstypedetailList.length; i++) {
info += row.smsPricestrategyBillGoodstypedetailList[i].rangeStart + "——" + row info += row.smsPricestrategyBillGoodstypedetailList[i].rangeStart + '-' + row
.smsPricestrategyBillGoodstypedetailList[i].rangeEnd + " " + row .smsPricestrategyBillGoodstypedetailList[i].rangeEnd + ' ' + row
.smsPricestrategyBillGoodstypedetailList[i] .smsPricestrategyBillGoodstypedetailList[i]
.markupRate + ";" .markupRate + '%;'
} }
}else{ } else {
info = row.gdMarkupRate info = row.gdMarkupRate + '%'
} }
return info return info
}, },
indexMethod(index) { indexMethod(index) {
return index + 1 return index + 1
}, },
handleReturn(isreload) { handleReturn() {
if (isreload === 'true') this.$emit('reloadlist')
this.submitdisabled = false this.submitdisabled = false
this.formobj = { this.formobj = {}
}
this.$emit('doback') this.$emit('doback')
}, },
showAdd() {
},
showInfo(row) { showInfo(row) {
req.init(row.sid).then(resp => {
req.init(row.sid)
.then(resp => {
if (resp.success) { if (resp.success) {
this.formobj = resp.data this.formobj = resp.data
} }
}) }).catch(e => {
.catch(e => {
this.formobj = {} this.formobj = {}
}) })
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
/deep/ .el-form-item__error { /deep/ .el-form-item__error {
margin-left: 120px !important; margin-left: 120px !important;
} }
.must {
color: #f00;
}
.span-sty { .span-sty {
width: 130px !important; width: 130px !important;
} }
.addinputInfo { .addinputInfo {
margin-left: 120px !important; margin-left: 120px !important;
} }
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { .formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important; margin-left: 120px !important;
width: calc(100% - 115px); width: calc(100% - 115px);
} }
.first_row { .first_row {
border-top: 1px solid #E0E3EB; border-top: 1px solid #E0E3EB;
} }
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
</style> </style>

84
yxt-as-ui/src/views/storage/adjustment/index.vue

@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<!--列表页面--> <!--列表页面-->
<div v-show="viewState == 1"> <div v-show="viewState == 1">
<button-bar view-title="定调价策略申请管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle" /> <button-bar view-title="定调价策略申请管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<!--Start查询列表部分--> <!--Start查询列表部分-->
<div class="main-content"> <div class="main-content">
<div class="searchcon"> <div class="searchcon">
@ -10,30 +10,26 @@
<div v-show="isSearchShow" class="search"> <div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="110px" class="tab-header"> <el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="110px" class="tab-header">
<el-form-item label="分公司"> <el-form-item label="分公司">
<el-input v-model="listQuery.params.createOrgName" placeholder="" clearable /> <el-input v-model="listQuery.params.useOrgName" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="申请部门"> <el-form-item label="申请部门">
<el-input v-model="listQuery.params.deptName" placeholder="" clearable /> <el-input v-model="listQuery.params.deptName" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="申请人"> <el-form-item label="申请人">
<el-input v-model="listQuery.params.createByName" placeholder="" clearable /> <el-input v-model="listQuery.params.createByName" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="单据编号"> <el-form-item label="单据编号">
<el-input v-model="listQuery.params.billNo" placeholder="" clearable /> <el-input v-model="listQuery.params.billNo" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="申请日期"> <el-form-item label="申请日期">
<el-date-picker v-model="listQuery.params.createStartTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" <el-date-picker v-model="listQuery.params.createStartTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
type="date" placeholder="选择日期"></el-date-picker>
<span style="padding: 0 8px"></span> <span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.createEndTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" <el-date-picker v-model="listQuery.params.createEndTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
type="date" placeholder="选择日期"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="办结日期"> <el-form-item label="办结日期">
<el-date-picker v-model="listQuery.params.finishStartTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" <el-date-picker v-model="listQuery.params.finishStartTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
type="date" placeholder="选择日期"></el-date-picker>
<span style="padding: 0 8px"></span> <span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.finishEndTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" <el-date-picker v-model="listQuery.params.finishEndTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
type="date" placeholder="选择日期"></el-date-picker>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="btn" style="text-align: center;"> <div class="btn" style="text-align: center;">
@ -49,14 +45,12 @@
</div> </div>
<!--Start 主页面主要部分 --> <!--Start 主页面主要部分 -->
<div class=""> <div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;" <el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;" @selection-change="handleSelectionChange">
@selection-change="handleSelectionChange"> <el-table-column type="selection" align="center" width="50"/>
<el-table-column type="selection" align="center" width="50" /> <el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center"/>
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" />
<el-table-column label="操作" width="180" align="center"> <el-table-column label="操作" width="180" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" @click="toEdit(scope.row)" <el-button type="primary" size="mini" @click="toEdit(scope.row)" :disabled="scope.row.nodeState =='发起申请' ? false : scope.row.nodeState == '待提交' ? false : true">办理</el-button>
:disabled="scope.row.nodeState =='发起申请' ? false : scope.row.nodeState == '待提交' ? false : true">办理</el-button>
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button> <el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -66,7 +60,6 @@
<span v-else @click="flowRecord(scope.row)" class="bluezi">{{ scope.row.nodeState }}</span> <span v-else @click="flowRecord(scope.row)" class="bluezi">{{ scope.row.nodeState }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column prop="nodeState" label="流程状态" align="center" /> -->
<el-table-column prop="billNo" label="单据编号" align="center" /> <el-table-column prop="billNo" label="单据编号" align="center" />
<el-table-column prop="useOrgName" label="分公司" align="center" /> <el-table-column prop="useOrgName" label="分公司" align="center" />
<el-table-column prop="deptName" label="申请部门" align="center" /> <el-table-column prop="deptName" label="申请部门" align="center" />
@ -76,45 +69,37 @@
</div> </div>
<!--End 主页面主要部分--> <!--End 主页面主要部分-->
<div class="pages"> <div class="pages">
<div class="tit" /> <div class="tit"/>
<!-- 翻页 --> <!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" <pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
</div> </div>
<!--End查询列表部分--> <!--End查询列表部分-->
</div> </div>
</div> </div>
<!--新增及修改 --> <!--新增及修改 -->
<adjustmentAdd v-show="viewState == 2 || viewState == 3" ref="divAdd" @doback="resetState" @reloadlist="getList" /> <adjustmentAdd v-show="viewState == 2 || viewState == 3" ref="divAdd" @doback="resetState" @reloadlist="getList"/>
<!-- 详情 --> <!-- 详情 -->
<adjustmentInfo v-show="viewState == 4" ref="divInfo" @doback="resetState" /> <adjustmentInfo v-show="viewState == 4" ref="divInfo" @doback="resetState"/>
<!-- 流程审批记录 --> <!-- 流程审批记录 -->
<el-dialog title="" :visible.sync="centerDialogVisible" width="78%" height="1%" :before-close="closeIt" center> <el-dialog title="" :visible.sync="centerDialogVisible" width="78%" height="1%" :before-close="closeIt" center>
<iframe frameborder="0" id="iframe" style="width:100%;" scrolling="no" <iframe frameborder="0" id="iframe" style="width:100%;" scrolling="no" :src="this.centerDialogVisible === true ? url :''"></iframe>
:src="this.centerDialogVisible === true ? url :''"></iframe>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import ButtonBar from '@/components/ButtonBar'
import ButtonBar from '@/components/ButtonBar' import req from '@/api/storage/adjustment.js'
import req from '@/api/storage/adjustment.js' import { typeValues } from '@/api/Common/dictcommons'
import { import { getStorage } from '@/utils/auth'
typeValues import adjustmentAdd from './adjustmentAdd'
} from '@/api/Common/dictcommons' import adjustmentInfo from './adjustmentInfo'
import {
getStorage
} from '@/utils/auth'
import adjustmentAdd from './adjustmentAdd'
import adjustmentInfo from './adjustmentInfo'
export default { export default {
name: 'Procurement', name: 'Procurement',
components: { components: {
Pagination, Pagination,
pageye,
ButtonBar, ButtonBar,
adjustmentAdd, adjustmentAdd,
adjustmentInfo adjustmentInfo
@ -162,7 +147,7 @@
size: 5, size: 5,
total: 0, total: 0,
params: { params: {
createOrgName: '', useOrgName: '',
deptName: '', deptName: '',
createByName: '', createByName: '',
billNo: '', billNo: '',
@ -170,6 +155,9 @@
createEndTime: '', createEndTime: '',
finishStartTime: '', finishStartTime: '',
finishEndTime: '', finishEndTime: '',
userSid: '',
orgPath: '',
menuUrl: ''
} }
} }
} }
@ -289,7 +277,7 @@
size: 5, size: 5,
total: 0, total: 0,
params: { params: {
createOrgName: '', useOrgName: '',
deptName: '', deptName: '',
createByName: '', createByName: '',
billNo: '', billNo: '',
@ -297,12 +285,15 @@
createEndTime: '', createEndTime: '',
finishStartTime: '', finishStartTime: '',
finishEndTime: '', finishEndTime: '',
userSid: '',
orgPath: '',
menuUrl: ''
} }
} }
this.getList() this.getList()
}, },
toAdd() { toAdd() {
this.viewState = 3 this.viewState = 2
this.$refs['divAdd'].showAdd() this.$refs['divAdd'].showAdd()
}, },
toEdit(row) { toEdit(row) {
@ -347,7 +338,8 @@
}).catch(e => { }).catch(e => {
loading.close() loading.close()
}) })
}).catch(() => {}) }).catch(() => {
})
}, },
// //
resetState() { resetState() {
@ -358,7 +350,7 @@
this.$router.go(-1) this.$router.go(-1)
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
</style> </style>

52
yxt-as-ui/src/views/workFlow/adjustmentFlow/adjustmentDaiBan.vue

@ -34,17 +34,17 @@
</el-row> </el-row>
<div class="title">商品类别列表</div> <div class="title">商品类别列表</div>
<el-table v-loading="listLoading" :data="formobj.smsPricestrategyBillDetailList" border style="width: 100%;"> <el-table v-loading="listLoading" :data="formobj.smsPricestrategyBillDetailList" border style="width: 100%;">
<el-table-column fixed width="80" label="序号" type="index" :index="indexMethod" align="center" /> <el-table-column fixed width="80" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column label="类别编码" prop="goodsTypeCode" align="center" /> <el-table-column label="类别编码" prop="goodsTypeCode" align="center"/>
<el-table-column label="类别名称" prop="goodsTypeName" align="center" /> <el-table-column label="类别名称" prop="goodsTypeName" align="center"/>
<el-table-column label="价格策略" align="center"> <el-table-column label="价格策略" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{calculation(scope.row)}} {{ calculation(scope.row) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="策略明细" align="center" width="600"> <el-table-column label="策略明细" align="center" width="600">
<template slot-scope="scope"> <template slot-scope="scope">
{{calculation2(scope.row)}} {{ calculation2(scope.row) }}
</template> </template>
</el-table-column> </el-table-column>
@ -82,8 +82,10 @@
<span>意见:</span> <span>意见:</span>
</el-col> </el-col>
<el-col :span="20"> <el-col :span="20">
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" <el-form-item>
type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable></el-input></el-form-item> <el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw"
type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable></el-input>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div style="text-align:center;margin-top: 20px;"> <div style="text-align:center;margin-top: 20px;">
@ -96,12 +98,12 @@
</template> </template>
<script> <script>
import req from '@/api/storage/adjustment.js' import req from '@/api/storage/adjustment.js'
import { import {
selectStaffListss selectStaffListss
} from '@/api/Common/dictcommons' } from '@/api/Common/dictcommons'
export default { export default {
name: '', name: '',
data() { data() {
return { return {
@ -199,32 +201,26 @@
calculation(row) { calculation(row) {
console.log("calculation》》》》", row) console.log("calculation》》》》", row)
var info = '' var info = ''
if (row.strategyType == 1) { if (row.strategyType == 1) {
info = '固定比例' info = '固定比例'
} }
if (row.strategyType == 2) { if (row.strategyType == 2) {
info = '价格区间' info = '价格区间'
} }
return info return info
}, },
calculation2(row) { calculation2(row) {
var info = '' var info = ''
if (row.strategyType == 2) { if (row.strategyType == 2) {
for (var i = 0; i < row.smsPricestrategyBillGoodstypedetailList.length; i++) { for (var i = 0; i < row.smsPricestrategyBillGoodstypedetailList.length; i++) {
info += row.smsPricestrategyBillGoodstypedetailList[i].rangeStart + '-' + row
info += row.smsPricestrategyBillGoodstypedetailList[i].rangeStart + "——" + row .smsPricestrategyBillGoodstypedetailList[i].rangeEnd + ' ' + row
.smsPricestrategyBillGoodstypedetailList[i].rangeEnd + " " + row
.smsPricestrategyBillGoodstypedetailList[i] .smsPricestrategyBillGoodstypedetailList[i]
.markupRate + ";" .markupRate + '%;'
} }
} else { } else {
info = row.gdMarkupRate info = row.gdMarkupRate + '%'
} }
return info return info
}, },
showInfo(sid) { showInfo(sid) {
@ -449,19 +445,19 @@
}) })
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
.span-sty { .span-sty {
width: 130px !important; width: 130px !important;
} }
.addinputInfo { .addinputInfo {
margin-left: 120px !important; margin-left: 120px !important;
} }
.rowClass { .rowClass {
border-top: 1px solid #E0E3EB; border-top: 1px solid #E0E3EB;
} }
</style> </style>

111
yxt-as-ui/src/views/workFlow/adjustmentFlow/adjustmentEdit.vue

@ -23,60 +23,56 @@
<div class="span-sty">申请日期</div> <div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<div class="span-sty">备注</div> <div class="span-sty">备注</div>
<el-form-item><el-input class="addinputInfo" style="width: 80%" v-model="formobj.remarks" clearable <el-form-item>
placeholder="" /></el-form-item> <el-input class="addinputInfo" style="width: 80%" v-model="formobj.remarks" clearable placeholder=""/>
<el-form-item> <el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" </el-form-item>
type="textarea" :rows="4" clearable /></el-form-item> <el-form-item>
<el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" type="textarea" :rows="4" clearable/>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div class="title">商品类别列表</div> <div class="title">商品类别列表</div>
<el-table v-loading="listLoading" :data="formobj.smsPricestrategyBillDetailList" border style="width: 100%;"> <el-table v-loading="listLoading" :data="formobj.smsPricestrategyBillDetailList" border style="width: 100%;">
<el-table-column fixed width="80" label="序号" type="index" :index="indexMethod" align="center" /> <el-table-column fixed width="80" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column fixed label="操作" wid align="center" width="200"> <el-table-column fixed label="操作" wid align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" @click="deleteGoodsType(scope.row)">删除</el-button> <el-button type="primary" size="mini" @click="deleteGoodsType(scope.$index)">删除</el-button>
<el-button type="primary" size="mini" @click="editPriceStrategy(scope.row)">编辑</el-button> <el-button type="primary" size="mini" @click="editPriceStrategy(scope.row)">编辑</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="类别编码" prop="goodsTypeCode" align="center" /> <el-table-column label="类别编码" prop="goodsTypeCode" align="center"/>
<el-table-column label="类别名称" prop="goodsTypeName" align="center" /> <el-table-column label="类别名称" prop="goodsTypeName" align="center"/>
<el-table-column label="价格策略" align="center"> <el-table-column label="价格策略" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{calculation(scope.row)}} {{ calculation(scope.row) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="策略明细" align="center" width="600"> <el-table-column label="策略明细" align="center" width="600">
<template slot-scope="scope"> <template slot-scope="scope">
{{calculation2(scope.row)}} {{ calculation2(scope.row) }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-form> </el-form>
</div> </div>
</div> </div>
<!-- 选择商品类别 --> <!-- 选择商品类别 -->
<choosecategory v-show="viewState == 2" ref="choosecategory" @backData="backData" @doback="resetState" /> <choosecategory v-show="viewState == 2" ref="choosecategory" @backData="backData" @doback="resetState"/>
<!-- 编辑价格策略 --> <!-- 编辑价格策略 -->
<editPriceStrategy v-show="viewState == 3" ref="editPriceStrategy" @backData2="backData2" @doback="resetState" /> <editPriceStrategy v-show="viewState == 3" ref="editPriceStrategy" @backData2="backData2" @doback="resetState"/>
</div> </div>
</template> </template>
<script> <script>
import req from '@/api/storage/adjustment.js' import req from '@/api/storage/adjustment.js'
import { import choosecategory from './relation/choosecategory'
getCurrentDate import editPriceStrategy from './relation/editPriceStrategy'
} from '@/utils/index.js'
import choosecategory from './relation/choosecategory' export default {
import editPriceStrategy from './relation/editPriceStrategy'
export default {
components: { components: {
choosecategory, choosecategory,
editPriceStrategy editPriceStrategy
@ -105,7 +101,7 @@
"useOrgSid": "", "useOrgSid": "",
"useOrgName": "", "useOrgName": "",
"smsPricestrategyBillDetailList": [] "smsPricestrategyBillDetailList": []
}, }
} }
}, },
created() { created() {
@ -128,41 +124,30 @@
methods: { methods: {
calculation(row) { calculation(row) {
console.log("calculation》》》》", row)
var info = '' var info = ''
if (row.strategyType == 1) { if (row.strategyType == 1) {
info = '固定比例' info = '固定比例'
} }
if (row.strategyType == 2) { if (row.strategyType == 2) {
info = '价格区间' info = '价格区间'
} }
return info return info
}, },
calculation2(row) { calculation2(row) {
var info = '' var info = ''
if (row.strategyType == 2) { if (row.strategyType == 2) {
for (var i = 0; i < row.smsPricestrategyBillGoodstypedetailList.length; i++) { for (var i = 0; i < row.smsPricestrategyBillGoodstypedetailList.length; i++) {
info += row.smsPricestrategyBillGoodstypedetailList[i].rangeStart + '-' + row
info += row.smsPricestrategyBillGoodstypedetailList[i].rangeStart + "——" + row .smsPricestrategyBillGoodstypedetailList[i].rangeEnd + ' ' + row
.smsPricestrategyBillGoodstypedetailList[i].rangeEnd + " " + row
.smsPricestrategyBillGoodstypedetailList[i] .smsPricestrategyBillGoodstypedetailList[i]
.markupRate + ";" .markupRate + '%;'
} }
} else { } else {
info = row.gdMarkupRate info = row.gdMarkupRate + '%'
} }
return info return info
}, },
deleteGoodsType(index) {
deleteGoodsType(row) {
const index = this.formobj.smsPricestrategyBillDetailList.findIndex((item) => item === row)
console.log("index》》》》", index)
this.formobj.smsPricestrategyBillDetailList.splice(index, 1) this.formobj.smsPricestrategyBillDetailList.splice(index, 1)
}, },
editPriceStrategy(row) { editPriceStrategy(row) {
@ -172,12 +157,8 @@
}, },
backData(value) { backData(value) {
this.viewState = 1 this.viewState = 1
console.log('>>>>>>>>>backData', value)
for (var i = 0; i < value.length; i++) { for (var i = 0; i < value.length; i++) {
this.formobj.smsPricestrategyBillDetailList.push( this.formobj.smsPricestrategyBillDetailList.push(
{ {
goodsTypeSid: value[i].sid, goodsTypeSid: value[i].sid,
goodsTypeCode: value[i].goodsTypeCode, goodsTypeCode: value[i].goodsTypeCode,
@ -187,43 +168,24 @@
gdMarkupRate: "", gdMarkupRate: "",
strategyDetail: '', strategyDetail: '',
smsPricestrategyBillGoodstypedetailList: [] smsPricestrategyBillGoodstypedetailList: []
} }
) )
} }
}, },
backData2(value) { backData2(value) {
this.viewState = 1 this.viewState = 1
console.log('>>>>>>>>>backData2', value)
var info = '' var info = ''
if (value.strategyType == 2) { if (value.strategyType == 2) {
for (var i = 0; i < value.smsPricestrategyBillGoodstypedetailList.length; i++) { for (var i = 0; i < value.smsPricestrategyBillGoodstypedetailList.length; i++) {
info += value.smsPricestrategyBillGoodstypedetailList[i].rangeStart + '-' + value
info += value.smsPricestrategyBillGoodstypedetailList[i].rangeStart + "——" + value .smsPricestrategyBillGoodstypedetailList[i].rangeEnd + ' ' + value
.smsPricestrategyBillGoodstypedetailList[i].rangeEnd + " " + value
.smsPricestrategyBillGoodstypedetailList[i] .smsPricestrategyBillGoodstypedetailList[i]
.markupRate + ";" .markupRate + '%;'
} }
} }
const choose = this.formobj.smsPricestrategyBillDetailList.filter((item) => item.goodsTypeSid == value.goodsTypeSid)
console.log('>>>>>>>>>backData2', info)
const choose = this.formobj.smsPricestrategyBillDetailList.filter((item) => item.goodsTypeSid == value
.goodsTypeSid)
console.log('>>>>>>>>>busTypeSelect', choose)
// choose[0].strategyDetail = value.strategyType == 0 ? value.gdMarkupRate : info
choose[0].smsPricestrategyBillGoodstypedetailList = value.smsPricestrategyBillGoodstypedetailList choose[0].smsPricestrategyBillGoodstypedetailList = value.smsPricestrategyBillGoodstypedetailList
choose[0].strategyType = value.strategyType choose[0].strategyType = value.strategyType
// choose[0].strategyTypeValue = value.strategyType == 0 ? '' : ''
if (value.strategyType == 1) { if (value.strategyType == 1) {
choose[0].strategyTypeValue = '固定比例' choose[0].strategyTypeValue = '固定比例'
choose[0].strategyDetail = value.gdMarkupRate choose[0].strategyDetail = value.gdMarkupRate
@ -232,14 +194,10 @@
choose[0].strategyTypeValue = '价格区间' choose[0].strategyTypeValue = '价格区间'
choose[0].strategyDetail = info choose[0].strategyDetail = info
} }
console.log('>>>>>>>>>backData2', choose)
}, },
resetState() { resetState() {
this.viewState = 1 this.viewState = 1
}, },
categoryAdd() { categoryAdd() {
this.viewState = 2 this.viewState = 2
const aa = [] const aa = []
@ -248,7 +206,6 @@
indexMethod(index) { indexMethod(index) {
return index + 1 return index + 1
}, },
showInfo(sid) { showInfo(sid) {
this.viewTitle = '【编辑】定调价策略申请' this.viewTitle = '【编辑】定调价策略申请'
this.$nextTick(() => { this.$nextTick(() => {
@ -318,15 +275,15 @@
}) })
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
.span-sty { .span-sty {
width: 130px !important; width: 130px !important;
} }
.addinputInfo { .addinputInfo {
margin-left: 120px !important; margin-left: 120px !important;
} }
</style> </style>

38
yxt-as-ui/src/views/workFlow/adjustmentFlow/adjustmentYiBan.vue

@ -31,17 +31,17 @@
</el-row> </el-row>
<div class="title">商品类别列表</div> <div class="title">商品类别列表</div>
<el-table v-loading="listLoading" :data="formobj.smsPricestrategyBillDetailList" border style="width: 100%;"> <el-table v-loading="listLoading" :data="formobj.smsPricestrategyBillDetailList" border style="width: 100%;">
<el-table-column fixed width="80" label="序号" type="index" :index="indexMethod" align="center" /> <el-table-column fixed width="80" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column label="类别编码" prop="goodsTypeCode" align="center" /> <el-table-column label="类别编码" prop="goodsTypeCode" align="center"/>
<el-table-column label="类别名称" prop="goodsTypeName" align="center" /> <el-table-column label="类别名称" prop="goodsTypeName" align="center"/>
<el-table-column label="价格策略" align="center"> <el-table-column label="价格策略" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{calculation(scope.row)}} {{ calculation(scope.row) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="策略明细" align="center" width="600"> <el-table-column label="策略明细" align="center" width="600">
<template slot-scope="scope"> <template slot-scope="scope">
{{calculation2(scope.row)}} {{ calculation2(scope.row) }}
</template> </template>
</el-table-column> </el-table-column>
@ -53,9 +53,9 @@
</template> </template>
<script> <script>
import req from '@/api/storage/adjustment.js' import req from '@/api/storage/adjustment.js'
export default { export default {
name: '', name: '',
data() { data() {
return { return {
@ -124,32 +124,26 @@
calculation(row) { calculation(row) {
console.log("calculation》》》》", row) console.log("calculation》》》》", row)
var info = '' var info = ''
if (row.strategyType == 1) { if (row.strategyType == 1) {
info = '固定比例' info = '固定比例'
} }
if (row.strategyType == 2) { if (row.strategyType == 2) {
info = '价格区间' info = '价格区间'
} }
return info return info
}, },
calculation2(row) { calculation2(row) {
var info = '' var info = ''
if (row.strategyType == 2) { if (row.strategyType == 2) {
for (var i = 0; i < row.smsPricestrategyBillGoodstypedetailList.length; i++) { for (var i = 0; i < row.smsPricestrategyBillGoodstypedetailList.length; i++) {
info += row.smsPricestrategyBillGoodstypedetailList[i].rangeStart + '-' + row
info += row.smsPricestrategyBillGoodstypedetailList[i].rangeStart + "——" + row .smsPricestrategyBillGoodstypedetailList[i].rangeEnd + ' ' + row
.smsPricestrategyBillGoodstypedetailList[i].rangeEnd + " " + row
.smsPricestrategyBillGoodstypedetailList[i] .smsPricestrategyBillGoodstypedetailList[i]
.markupRate + ";" .markupRate + '%;'
} }
} else { } else {
info = row.gdMarkupRate info = row.gdMarkupRate + '%'
} }
return info return info
}, },
showInfo(sid) { showInfo(sid) {
@ -209,15 +203,15 @@
}) })
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
.span-sty { .span-sty {
width: 130px !important; width: 130px !important;
} }
.addinputInfo { .addinputInfo {
margin-left: 120px !important; margin-left: 120px !important;
} }
</style> </style>

Loading…
Cancel
Save