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

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

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

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

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

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

@ -34,17 +34,17 @@
</el-row>
<div class="title">商品类别列表</div>
<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 label="类别编码" prop="goodsTypeCode" align="center" />
<el-table-column label="类别名称" prop="goodsTypeName" 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="goodsTypeName" align="center"/>
<el-table-column label="价格策略" align="center">
<template slot-scope="scope">
{{calculation(scope.row)}}
{{ calculation(scope.row) }}
</template>
</el-table-column>
<el-table-column label="策略明细" align="center" width="600">
<template slot-scope="scope">
{{calculation2(scope.row)}}
{{ calculation2(scope.row) }}
</template>
</el-table-column>
@ -82,8 +82,10 @@
<span>意见:</span>
</el-col>
<el-col :span="20">
<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-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-row>
<div style="text-align:center;margin-top: 20px;">
@ -96,12 +98,12 @@
</template>
<script>
import req from '@/api/storage/adjustment.js'
import {
import req from '@/api/storage/adjustment.js'
import {
selectStaffListss
} from '@/api/Common/dictcommons'
} from '@/api/Common/dictcommons'
export default {
export default {
name: '',
data() {
return {
@ -199,32 +201,26 @@
calculation(row) {
console.log("calculation》》》》", row)
var info = ''
if (row.strategyType == 1) {
info = '固定比例'
}
if (row.strategyType == 2) {
info = '价格区间'
}
return info
},
calculation2(row) {
var info = ''
if (row.strategyType == 2) {
for (var i = 0; i < row.smsPricestrategyBillGoodstypedetailList.length; i++) {
info += row.smsPricestrategyBillGoodstypedetailList[i].rangeStart + "——" + row
.smsPricestrategyBillGoodstypedetailList[i].rangeEnd + " " + row
info += row.smsPricestrategyBillGoodstypedetailList[i].rangeStart + '-' + row
.smsPricestrategyBillGoodstypedetailList[i].rangeEnd + ' ' + row
.smsPricestrategyBillGoodstypedetailList[i]
.markupRate + ";"
.markupRate + '%;'
}
} else {
info = row.gdMarkupRate
info = row.gdMarkupRate + '%'
}
return info
},
showInfo(sid) {
@ -449,19 +445,19 @@
})
}
}
}
}
</script>
<style scoped>
.span-sty {
.span-sty {
width: 130px !important;
}
}
.addinputInfo {
.addinputInfo {
margin-left: 120px !important;
}
}
.rowClass {
.rowClass {
border-top: 1px solid #E0E3EB;
}
}
</style>

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

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

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

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

Loading…
Cancel
Save