Browse Source

Merge remote-tracking branch 'origin/master'

master
God 1 year ago
parent
commit
6fd4da7869
  1. 12
      anrui-system-ui/src/views/userManage/userManageList.vue
  2. 46
      yxt-as-ui/src/api/operation/workorderreturnvisit.js
  3. 27
      yxt-as-ui/src/router/index.js
  4. 332
      yxt-as-ui/src/views/operation/workorderreturnvisit/workorderreturnvisit.vue
  5. 317
      yxt-as-ui/src/views/operation/workorderreturnvisit/workorderreturnvisitAdd.vue
  6. 204
      yxt-as-ui/src/views/operation/workorderreturnvisit/workorderreturnvisitInfo.vue
  7. 26
      yxt-as-ui/src/views/storage/adjustment/adjustmentAdd.vue
  8. 7
      yxt-as-ui/src/views/storage/adjustment/adjustmentInfo.vue
  9. 2
      yxt-as-ui/src/views/storage/adjustment/index.vue
  10. 14
      yxt-as-ui/src/views/storage/adjustment/relation/editPriceStrategy.vue
  11. 469
      yxt-as-ui/src/views/workFlow/adjustmentFlow/adjustmentDaiBan.vue
  12. 348
      yxt-as-ui/src/views/workFlow/adjustmentFlow/adjustmentEdit.vue
  13. 225
      yxt-as-ui/src/views/workFlow/adjustmentFlow/adjustmentYiBan.vue
  14. 184
      yxt-as-ui/src/views/workFlow/adjustmentFlow/relation/choosecategory.vue
  15. 298
      yxt-as-ui/src/views/workFlow/adjustmentFlow/relation/editPriceStrategy.vue

12
anrui-system-ui/src/views/userManage/userManageList.vue

@ -43,16 +43,16 @@
</el-button>-->
</template>
</el-table-column>
<el-table-column prop="userName" label="用户名" align="center">
<el-table-column prop="userName" label="用户名" align="center" width="100">
<template slot-scope="scope">
<!-- <span class="tablerow-click" @click="userinfoChange(scope.row)">-->{{ scope.row.userName }}<!--</span>-->
</template>
</el-table-column>
<el-table-column prop="userType" label="用户类型" align="center"></el-table-column>
<el-table-column prop="name" label="姓名" width="120px" align="center"></el-table-column>
<el-table-column prop="departmentName" label="部门" align="center"></el-table-column>
<el-table-column prop="postName" label="岗位" align="center"></el-table-column>
<el-table-column prop="isEnable" label="是否可用" align="center">
<el-table-column prop="userType" label="用户类型" align="center" width="100"></el-table-column>
<el-table-column prop="name" label="姓名" align="center" width="110"></el-table-column>
<el-table-column prop="departmentName" label="部门" align="center" min-width="180"></el-table-column>
<el-table-column prop="postName" label="岗位" align="center" width="180"></el-table-column>
<el-table-column prop="isEnable" label="是否可用" align="center" width="100">
<template slot-scope="scope">
<el-switch
v-model="scope.row.isEnable"

46
yxt-as-ui/src/api/operation/workorderreturnvisit.js

@ -0,0 +1,46 @@
import request from '@/utils/request'
export default {
// 查询分页列表
listPage: function(params) {
return request({
url: '/as/v1/astrackbill/listPage',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 初始化
fetchDetailsBySid: function(data) {
return request({
url: '/as/v1/astrackbill/fetchDetailsBySid/' + data,
method: 'get'
})
},
saveOrUpdate: function(data) {
return request({
url: '/as/v1/astrackbill/save',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 完成
accomplish: function(data) {
return request({
url: '/as/v1/astrackbill/complete',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 保存跟踪记录
saveTrackRecord: function(data) {
return request({
url: '/as/v1/asbusrepairbilltrack/save',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
}
}

27
yxt-as-ui/src/router/index.js

@ -134,6 +134,12 @@ export const constantRoutes = [{
name: 'WorkSLRSettlement',
meta: { title: '工单反结算管理', noCache: true }
},
{
path: '/workorderreturnvisit/workorderreturnvisit',
component: () => import('@/views/operation/workorderreturnvisit/workorderreturnvisit.vue'),
name: 'WorkOrderReturnVisit',
meta: { title: '工单回访管理', noCache: true }
},
]
},
@ -640,6 +646,27 @@ export const constantRoutes = [{
import('@/views/workFlow/suopeitiaozhengFlow/claimadjustmentYiBan.vue'),
name: 'ClaimAdjustmentYiBan'
},
// 定/调价--编辑
{
path: '/adjustmentFlow/adjustmentEdit',
component: () =>
import('@/views/workFlow/adjustmentFlow/adjustmentEdit.vue'),
name: 'AdjustmentEdit'
},
// 定/调价--待办
{
path: '/adjustmentFlow/adjustmentDaiBan',
component: () =>
import('@/views/workFlow/adjustmentFlow/adjustmentDaiBan.vue'),
name: 'AdjustmentDaiBan'
},
// 定/调价--已办
{
path: '/adjustmentFlow/adjustmentYiBan',
component: () =>
import('@/views/workFlow/adjustmentFlow/adjustmentYiBan.vue'),
name: 'AdjustmentYiBan'
},
// 404 page must be placed at the end !!!
// { path: '*', redirect: '/404', hidden: true }
]

332
yxt-as-ui/src/views/operation/workorderreturnvisit/workorderreturnvisit.vue

@ -0,0 +1,332 @@
<template>
<div class="app-container">
<!--列表页面-->
<div v-show="viewState == 1">
<button-bar view-title="回访单管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<!--Start查询列表部分-->
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<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-form-item>
<el-form-item label="申请部门">
<el-input v-model="listQuery.params.deptName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="维修工单编号">
<el-input v-model="listQuery.params.sourceBillNo" placeholder="" clearable/>
</el-form-item>
<el-form-item label="结算日期">
<el-date-picker v-model="listQuery.params.settleDateStart" 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.settleDateEnd" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
</el-form-item>
<el-form-item label="科目">
<el-input v-model="listQuery.params.subject" placeholder="" clearable/>
</el-form-item>
<el-form-item label="客户名称">
<el-input v-model="listQuery.params.customerName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="车牌号">
<el-input v-model="listQuery.params.vehMark" placeholder="" clearable/>
</el-form-item>
<el-form-item label="回访单编号">
<el-input v-model="listQuery.params.billNo" placeholder="" clearable/>
</el-form-item>
<el-form-item label="预定回访日期">
<el-date-picker v-model="listQuery.params.reserveDateStart" 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.reserveDateEnd" 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.finishDateStart" 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.finishDateEnd" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
</el-form-item>
<el-form-item label="回访原因">
<el-select v-model="listQuery.params.reason" clearable placeholder="请选择" filterable>
<el-option v-for="item in reason_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="服务顾问">
<el-input v-model="listQuery.params.waitorName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="是否完成">
<el-select v-model="listQuery.params.state" clearable placeholder="请选择" filterable>
<el-option v-for="item in state_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey">
</el-option>
</el-select>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button>
</div>
</div>
</div>
<!--End查询列表部分-->
<div class="listtop">
<div class="tit">回访单列表</div>
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<!--Start 主页面主要部分 -->
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border 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="100" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button>
</template>
</el-table-column>
<el-table-column prop="sourceBillNo" label="维修工单编号" align="center" width="170" />
<el-table-column prop="subject" label="科目" align="center" width="100" />
<el-table-column prop="customerName" label="客户名称" align="center" width="160" />
<el-table-column prop="customerMobile" label="客户联系电话" align="center" width="160" />
<el-table-column prop="vehMark" label="车牌号" align="center" width="100" />
<el-table-column prop="billNo" label="回访单编号" align="center" width="120" />
<el-table-column prop="reserveDate" label="预定回访日期" align="center" width="120" />
<el-table-column prop="finishDate" label="完成回访日期" align="center" width="120" />
<el-table-column prop="reason" label="回访原因" align="center" width="120" />
<el-table-column prop="waitorName" label="服务顾问" align="center" width="120" />
<el-table-column prop="state" label="是否完成" align="center" width="120" />
<el-table-column prop="createOrgName" label="分公司" align="center" width="120" />
<el-table-column prop="deptName" label="部门" align="center" width="100" />
</el-table>
</div>
<!--End 主页面主要部分-->
<div class="pages">
<div class="tit"/>
<!-- 翻页 -->
<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>
<!--新增及修改 -->
<workorderreturnvisitAdd v-show="viewState == 2 || viewState == 3" ref="divAdd" @doback="resetState" @reloadlist="getList"/>
<!-- 详情 -->
<workorderreturnvisitInfo v-show="viewState == 4" ref="divInfo" @doback="resetState" />
</div>
</template>
<script>
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import req from '@/api/operation/workorderreturnvisit'
import workorderreturnvisitAdd from './workorderreturnvisitAdd'
import workorderreturnvisitInfo from './workorderreturnvisitInfo'
export default {
name: 'WorkSLRSettlement',
components: {
Pagination,
pageye,
ButtonBar,
workorderreturnvisitAdd,
workorderreturnvisitInfo
},
data() {
return {
btndisabled: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: 'edit',
btnKey: 'toEdit',
btnLabel: '编辑'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1, // 1 2 3 4
tableKey: 0,
list: [],
sids: [], // SIDs
state_list: [
{
dictKey: '0',
dictValue: '未完成'
},
{
dictKey: '1',
dictValue: '已完成'
}
],
reason_list: [
{
dictKey: '01',
dictValue: '维修回访'
},
{
dictKey: '2',
dictValue: '销售回访'
}
],
FormLoading: false,
listLoading: false,
//
listQuery: {
current: 1,
size: 5,
total: 0,
params: {
state: '',
createOrgName: '',
deptName: '',
sourceBillNo: '',
settleDateStart: '',
settleDateEnd: '',
subject: '',
customerName: '',
customerMobile: '',
vehMark: '',
billNo: '',
reserveDateStart: '',
reserveDateEnd: '',
finishDateStart: '',
finishDateEnd: '',
reason: '',
waitorName: '',
userSid: '',
orgPath: '',
menuUrl: ''
}
}
}
},
created() {
//
this.getList()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'toEdit':
this.toEdit()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
// sid
handleSelectionChange(row) {
const aa = []
row.forEach(element => {
aa.push(element.sid)
})
this.sids = aa
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
this.listLoading = true
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.listQuery.params.menuUrl = this.$route.path
req.listPage(this.listQuery).then(response => {
this.listLoading = false
if (response.success) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
//
handleReset() {
this.listQuery = {
current: 1,
size: 5,
total: 0,
params: {
state: '',
createOrgName: '',
deptName: '',
sourceBillNo: '',
settleDateStart: '',
settleDateEnd: '',
subject: '',
customerName: '',
customerMobile: '',
vehMark: '',
billNo: '',
reserveDateStart: '',
reserveDateEnd: '',
finishDateStart: '',
finishDateEnd: '',
reason: '',
waitorName: '',
userSid: '',
orgPath: '',
menuUrl: ''
}
}
this.getList()
},
toEdit() {
if (this.sids.length === 1) {
this.viewState = 3
this.$refs['divAdd'].showEdit(this.sids[0])
} else {
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行操作' })
}
},
toInfo(row) {
this.viewState = 4
this.$refs['divInfo'].showInfo(row)
},
//
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>

317
yxt-as-ui/src/views/operation/workorderreturnvisit/workorderreturnvisitAdd.vue

@ -0,0 +1,317 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button>
<el-button type="success" size="small" :disabled="submitdisabled" @click="accomplish()">完成</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-collapse v-model="activeNames">
<el-collapse-item title="工单信息" name="2">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">单号</div>
<el-form-item><span class="addinputInfo">{{ formobj.asBusrepairBillInit.billNo }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">结算时间</div>
<el-form-item><span class="addinputInfo">{{ formobj.asBusrepairBillInit.settleDate }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">客户</div>
<el-form-item><span class="addinputInfo">{{ formobj.asBusrepairBillInit.customerName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">车辆牌照</div>
<el-form-item><span class="addinputInfo">{{ formobj.asBusrepairBillInit.vehMark }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">联系电话</div>
<el-form-item><span class="addinputInfo">{{ formobj.asBusrepairBillInit.mobile }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">科目</div>
<el-form-item><span class="addinputInfo">{{ formobj.asBusrepairBillInit.subject }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty" style="border-right: 0px">合计金额</div>
<el-form-item><span class="addinputInfo">{{ formobj.asBusrepairBillInit.total }} = 工时费{{ formobj.asBusrepairBillInit.hourAmount }} + 材料费{{ formobj.asBusrepairBillInit.goodsAmount }} + 附加费{{ formobj.asBusrepairBillInit.addAmount }} + 税额{{ formobj.asBusrepairBillInit.taxAmount }}</span></el-form-item>
</el-col>
</el-row>
<el-table :key="serviceKey" :data="formobj.asBusrepairBillInit.sitemVos" border style="width: 100%">
<el-table-column prop="serviceItem" label="服务项目" align="center" />
<el-table-column prop="staffNameList" label="维修人" align="center" />
<el-table-column prop="subject" label="科目" align="center" />
<el-table-column prop="amount" label="金额" align="center" />
</el-table>
<el-table :key="tableKey" :data="formobj.asBusrepairBillInit.goodsDetailsVos" border style="width: 100%">
<el-table-column prop="goodsSpuName" label="商品名称" align="center" />
<el-table-column prop="count" label="数量" align="center" />
<el-table-column prop="subject" label="科目" align="center" />
<el-table-column prop="amount" label="金额" align="center" />
</el-table>
</el-collapse-item>
<el-collapse-item title="回访单信息" name="1">
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="24">
<div class="span-sty" style="border-right: 0px">单号:</div>
<el-form-item><span class="addinputInfo">{{ formobj.billNo }}</span></el-form-item>
</el-col>
</el-row>
<el-table :key="hfKey" :data="formobj.asTrackBillQuestionDetailsList" border style="width: 100%">
<el-table-column v-for="(item, index) in problem_list" :key="index" :label="item.title" :prop="item.value" align="center"></el-table-column>
<el-table-column v-for="(item, index) in score_list" :key="index + 1" :label="item.title" :prop="item.value" align="center">
<template slot-scope="scope">
<el-select v-model="scope.row.score" placeholder="请选择" clearable>
<el-option v-for="item in fraction_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue">
</el-option>
</el-select>
</template>
</el-table-column>
</el-table>
<el-row>
<el-col :span="24">
<div class="span-sty" style="border-right: 0px">平均分:</div>
<el-form-item><span class="addinputInfo">{{ pjfTotal }}</span></el-form-item>
</el-col>
</el-row>
<el-divider content-position="left">跟踪记录</el-divider>
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="10">
<div v-for="(item, index) in formobj.asBusrepairBillTrackDetailsList" :key="index" style="line-height: 20px">
<div><span style="color: #4cd964">{{ item.createByName }}</span><span style="margin-left: 5px">{{ item.createTime }}</span></div>
<div><span>{{ item.result }}</span></div>
</div>
</el-col>
<el-col :span="14">
<el-select v-model="trackRecord.followUpType" placeholder="请选择" clearable @change="followUpTypeChange">
<el-option v-for="item in followUpType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue">
</el-option>
</el-select>
<el-button type="primary" size="small" style="margin-left: 10px" @click="handleAdd">添加跟踪记录</el-button>
<el-form-item><el-input v-model="trackRecord.result" type="textarea" :autosize="{ minRows: 4, maxRows: 10}" clearable placeholder="" /></el-form-item>
</el-col>
</el-row>
</el-collapse-item>
</el-collapse>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/operation/workorderreturnvisit'
import { typeValues } from '@/api/Common/dictcommons'
export default {
name: 'WorkSLRSettlementAdd',
data() {
return {
viewTitle: '',
viewState: 1,
submitdisabled: false,
activeNames: '1',
serviceKey: 1,
tableKey: 2,
hfKey: 3,
problem_list: [
{
title: '问题',
value: 'question'
}
],
score_list: [
{
title: '分数',
value: 'score'
}
],
fraction_list: [],
followUpType_list: [],
formobj: {
sid: '',
billNo: '',
asBusrepairBillInit: {
billNo: '',
settleDate: '',
customerSid: '',
customerName: '',
vehMark: '',
mobile: '',
subject: '',
hourAmount: '',
goodsAmount: '',
addAmount: '',
taxAmount: '',
total: '',
sitemVos: [],
goodsDetailsVos: []
},
asTrackBillQuestionDetailsList: [],
asBusrepairBillTrackDetailsList: []
},
trackRecord: {
sid: '',
createBySid: '',
createByName: '',
billSid: '',
customerSid: '',
result: '',
followUpType: '',
useOrgSid: '',
createOrgSid: ''
},
rules: {}
}
},
computed: {
pjfTotal() {
let pjf = '0'
if (this.formobj.asTrackBillQuestionDetailsList.length > 0) {
this.formobj.asTrackBillQuestionDetailsList.forEach((e) => {
if (e.score !== '') {
pjf = parseInt(pjf) + parseInt(e.score)
}
})
pjf = Math.round((parseInt(pjf) / parseInt(this.formobj.asTrackBillQuestionDetailsList.length)) * 100) / 100
}
return pjf
}
},
methods: {
showEdit(sid) {
this.viewTitle = '【编辑】回访单'
typeValues({ type: 'fraction' }).then((res) => {
if (res.success) {
this.fraction_list = res.data
}
})
typeValues({ type: 'followUpType' }).then((res) => {
if (res.success) {
this.followUpType_list = res.data
}
})
req.fetchDetailsBySid(sid).then((res) => {
if (res.success) {
this.formobj = res.data
console.log(res.data, 444)
}
})
},
followUpTypeChange(value) {
const choose = this.followUpType_list.filter((item) => item.dictValue === value)
if (choose.length > 0 && choose !== null) {
this.trackRecord.result = choose[0].dictValue
}
},
handleAdd() {
if (this.trackRecord.result !== '') {
this.trackRecord.billSid = this.formobj.sid
this.trackRecord.createBySid = window.sessionStorage.getItem('userSid')
this.trackRecord.createByName = window.sessionStorage.getItem('name')
this.trackRecord.createOrgSid = this.formobj.createOrgSid
this.trackRecord.customerSid = this.formobj.asBusrepairBillInit.customerSid
this.trackRecord.useOrgSid = this.formobj.useOrgSid
req.saveTrackRecord(this.trackRecord).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '添加成功' })
}
})
} else {
this.$message({ showClose: true, type: 'error', message: '跟踪记录内容不能为空' })
}
},
saveOrUpdate() {
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.saveOrUpdate(this.formobj).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '保存成功' })
this.handleReturn('true')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
accomplish() {
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.accomplish(this.formobj).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '操作成功' })
this.handleReturn('true')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
sid: '',
billNo: '',
asBusrepairBillInit: {
billNo: '',
settleDate: '',
customerSid: '',
customerName: '',
vehMark: '',
mobile: '',
subject: '',
hourAmount: '',
goodsAmount: '',
addAmount: '',
taxAmount: '',
total: '',
sitemVos: [],
goodsDetailsVos: []
},
asTrackBillQuestionDetailsList: [],
asBusrepairBillTrackDetailsList: []
}
this.trackRecord = {
sid: '',
createBySid: '',
createByName: '',
billSid: '',
customerSid: '',
result: '',
followUpType: '',
useOrgSid: '',
createOrgSid: ''
}
this.submitdisabled = false
this.$emit('doback')
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
</style>

204
yxt-as-ui/src/views/operation/workorderreturnvisit/workorderreturnvisitInfo.vue

@ -0,0 +1,204 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-collapse v-model="activeNames">
<el-collapse-item title="工单信息" name="2">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">单号</div>
<el-form-item><span class="addinputInfo">{{ formobj.asBusrepairBillInit.billNo }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">结算时间</div>
<el-form-item><span class="addinputInfo">{{ formobj.asBusrepairBillInit.settleDate }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">客户</div>
<el-form-item><span class="addinputInfo">{{ formobj.asBusrepairBillInit.customerName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">车辆牌照</div>
<el-form-item><span class="addinputInfo">{{ formobj.asBusrepairBillInit.vehMark }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">联系电话</div>
<el-form-item><span class="addinputInfo">{{ formobj.asBusrepairBillInit.mobile }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">科目</div>
<el-form-item><span class="addinputInfo">{{ formobj.asBusrepairBillInit.subject }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty" style="border-right: 0px">合计金额</div>
<el-form-item><span class="addinputInfo">{{ formobj.asBusrepairBillInit.total }} = 工时费{{ formobj.asBusrepairBillInit.hourAmount }} + 材料费{{ formobj.asBusrepairBillInit.goodsAmount }} + 附加费{{ formobj.asBusrepairBillInit.addAmount }} + 税额{{ formobj.asBusrepairBillInit.taxAmount }}</span></el-form-item>
</el-col>
</el-row>
<el-table :key="serviceKey" :data="formobj.asBusrepairBillInit.sitemVos" border style="width: 100%">
<el-table-column prop="serviceItem" label="服务项目" align="center" />
<el-table-column prop="staffNameList" label="维修人" align="center" />
<el-table-column prop="subject" label="科目" align="center" />
<el-table-column prop="amount" label="金额" align="center" />
</el-table>
<el-table :key="tableKey" :data="formobj.asBusrepairBillInit.goodsDetailsVos" border style="width: 100%">
<el-table-column prop="goodsSpuName" label="商品名称" align="center" />
<el-table-column prop="count" label="数量" align="center" />
<el-table-column prop="subject" label="科目" align="center" />
<el-table-column prop="amount" label="金额" align="center" />
</el-table>
</el-collapse-item>
<el-collapse-item title="回访单信息" name="1">
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="24">
<div class="span-sty" style="border-right: 0px">单号:</div>
<el-form-item><span class="addinputInfo">{{ formobj.billNo }}</span></el-form-item>
</el-col>
</el-row>
<el-table :key="hfKey" :data="formobj.asTrackBillQuestionDetailsList" border style="width: 100%">
<el-table-column v-for="(item, index) in problem_list" :key="index" :label="item.title" :prop="item.value" align="center" />
<el-table-column v-for="(item, index) in score_list" :key="index + 1" :label="item.title" :prop="item.value" align="center" />
</el-table>
<el-row>
<el-col :span="24">
<div class="span-sty" style="border-right: 0px">平均分:</div>
<el-form-item><span class="addinputInfo">{{ pjfTotal }}</span></el-form-item>
</el-col>
</el-row>
<el-divider content-position="left">跟踪记录</el-divider>
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="24">
<div v-for="(item, index) in formobj.asBusrepairBillTrackDetailsList" :key="index" style="line-height: 20px">
<div><span style="color: #4cd964">{{ item.createByName }}</span><span style="margin-left: 5px">{{ item.createTime }}</span></div>
<div><span>{{ item.result }}</span></div>
</div>
</el-col>
</el-row>
</el-collapse-item>
</el-collapse>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/operation/workorderreturnvisit'
export default {
name: 'WorkSLRSettlementInfo',
data() {
return {
viewTitle: '',
viewState: 1,
activeNames: '1',
serviceKey: 1,
tableKey: 2,
hfKey: 3,
problem_list: [
{
title: '问题',
value: 'question'
}
],
score_list: [
{
title: '分数',
value: 'score'
}
],
formobj: {
sid: '',
billNo: '',
asBusrepairBillInit: {
billNo: '',
settleDate: '',
customerSid: '',
customerName: '',
vehMark: '',
mobile: '',
subject: '',
hourAmount: '',
goodsAmount: '',
addAmount: '',
taxAmount: '',
total: '',
sitemVos: [],
goodsDetailsVos: []
},
asTrackBillQuestionDetailsList: [],
asBusrepairBillTrackDetailsList: []
},
rules: {}
}
},
computed: {
pjfTotal() {
let pjf = '0'
if (this.formobj.asTrackBillQuestionDetailsList.length > 0) {
this.formobj.asTrackBillQuestionDetailsList.forEach((e) => {
if (e.score !== '') {
pjf = parseInt(pjf) + parseInt(e.score)
}
})
pjf = Math.round((parseInt(pjf) / parseInt(this.formobj.asTrackBillQuestionDetailsList.length)) * 100) / 100
}
return pjf
}
},
methods: {
showInfo(row) {
this.viewTitle = '回访单详情'
req.fetchDetailsBySid(row.sid).then((res) => {
if (res.success) {
this.formobj = res.data
}
})
},
handleReturn() {
this.formobj = {
sid: '',
billNo: '',
asBusrepairBillInit: {
billNo: '',
settleDate: '',
customerSid: '',
customerName: '',
vehMark: '',
mobile: '',
subject: '',
hourAmount: '',
goodsAmount: '',
addAmount: '',
taxAmount: '',
total: '',
sitemVos: [],
goodsDetailsVos: []
},
asTrackBillQuestionDetailsList: [],
asBusrepairBillTrackDetailsList: []
}
this.$emit('doback')
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
</style>

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

@ -138,14 +138,19 @@
console.log("calculation》》》》", row)
var info = ''
info = row.strategyType == 0 ? '固定比例' : '价格区间'
if (row.strategyType == 1) {
info = '固定比例'
}
if (row.strategyType == 2) {
info = '价格区间'
}
return info
},
calculation2(row) {
var info = ''
if (row.strategyType == 1) {
if (row.strategyType == 2) {
for (var i = 0; i < row.smsPricestrategyBillGoodstypedetailList.length; i++) {
info += row.smsPricestrategyBillGoodstypedetailList[i].rangeStart + "——" + row
@ -203,7 +208,7 @@
var info = ''
if (value.strategyType == 1) {
if (value.strategyType == 2) {
for (var i = 0; i < value.smsPricestrategyBillGoodstypedetailList.length; i++) {
info += value.smsPricestrategyBillGoodstypedetailList[i].rangeStart + "——" + value
@ -220,10 +225,21 @@
.goodsTypeSid)
console.log('>>>>>>>>>busTypeSelect', choose)
choose[0].strategyDetail = value.strategyType == 0 ? value.gdMarkupRate : info
// choose[0].strategyDetail = value.strategyType == 0 ? value.gdMarkupRate : info
choose[0].smsPricestrategyBillGoodstypedetailList = value.smsPricestrategyBillGoodstypedetailList
choose[0].strategyType = value.strategyType
choose[0].strategyTypeValue = value.strategyType == 0 ? '固定比例' : '价格区间'
// choose[0].strategyTypeValue = value.strategyType == 0 ? '' : ''
if (value.strategyType == 1) {
choose[0].strategyTypeValue = '固定比例'
choose[0].strategyDetail = value.gdMarkupRate
}
if (value.strategyType == 2) {
choose[0].strategyTypeValue = '价格区间'
choose[0].strategyDetail = info
}
console.log('>>>>>>>>>backData2', choose)
},

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

@ -88,7 +88,12 @@
calculation(row) {
var info = ''
info = row.strategyType == 0 ? '固定比例' : '价格区间'
if (row.strategyType == 1) {
info = '固定比例'
}
if (row.strategyType == 2) {
info = '价格区间'
}
return info
},
calculation2(row) {

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

@ -264,7 +264,9 @@
//
getList() {
this.listLoading = true
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.listQuery.params.menuUrl = this.$route.path
req.listPage(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {

14
yxt-as-ui/src/views/storage/adjustment/relation/editPriceStrategy.vue

@ -30,13 +30,13 @@
<el-form-item prop="strategyType">
<el-radio-group v-model="formobj.strategyType" size="small" style="margin-left: 120px;"
@change="selectIsLockingSalesPrice">
<el-radio :label="0">固定比例</el-radio>
<el-radio :label="1">价格区间</el-radio>
<el-radio :label="1">固定比例</el-radio>
<el-radio :label="2">价格区间</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="formobj.strategyType==0">
<el-row v-show="formobj.strategyType==1">
<el-col :span="24">
<div class="span-sty"><span class="must">*</span> 加价比例(%)</div>
<el-form-item>
@ -46,12 +46,12 @@
</el-col>
</el-row>
<div class="title titleOne" v-show="formobj.strategyType==1">
<div class="title titleOne" v-show="formobj.strategyType==2">
<div>价格区间加价策略</div>
<el-button type="primary" size="mini" class="btntopblueline" @click="addItem()">添加</el-button>
</div>
<el-table :data="formobj.smsPricestrategyBillGoodstypedetailList" border style="width: 100%;"
v-show="formobj.strategyType==1">
v-show="formobj.strategyType==2">
<!-- <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 label="操作" width="100" align="center">
@ -145,7 +145,7 @@
saveData() {
if (this.formobj.strategyType == 0) {
if (this.formobj.strategyType == 1) {
if (this.formobj.gdMarkupRate == '') {
this.$message({
@ -158,7 +158,7 @@
}
}
if (this.formobj.strategyType == 1) {
if (this.formobj.strategyType == 2) {
if (this.formobj.smsPricestrategyBillGoodstypedetailList == 0) {
this.$message({

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

@ -0,0 +1,469 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="primary" size="small" @click="openCountersign('加签')"> </el-button>
<el-button type="primary" size="small" @click="openAgree('同意')"> </el-button>
<el-button type="danger" size="small" @click="openReject('驳回')"> </el-button>
<el-button type="danger" size="small" @click="openStop('终止')"> </el-button>
</div>
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<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="addinputInfo">{{ formobj.remarks }}</span></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 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)}}
</template>
</el-table-column>
<el-table-column label="策略明细" align="center" width="600">
<template slot-scope="scope">
{{calculation2(scope.row)}}
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
<!-- 选择待办人 的弹出框-->
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%">
<el-form class="formadd">
<el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span class="icon">*</span>加签人员:
</el-col>
<el-col :span="20">
<el-form-item>
<el-select v-model="countersign.assignee" placeholder="请选择" filterable>
<el-option v-for="item in options" :key="item.userSid" :label="item.staffName" :value="item.userSid">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span>当前环节:</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item>
</el-col>
</el-row>
<el-row :class="{rowClass:!currentLink}">
<el-col :span="4" class="tleftb">
<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-col>
</el-row>
<div style="text-align:center;margin-top: 20px;">
<el-button type="primary" size="mini" @click="reject"> </el-button>
<el-button type="info " size="mini" @click="nodeDialogVisible = false"> </el-button>
</div>
</el-form>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/storage/adjustment.js'
import {
selectStaffListss
} from '@/api/Common/dictcommons'
export default {
name: '',
data() {
return {
viewTitle: '',
viewState: 1,
tableKey: 1,
index: 0,
formobj: {
"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
.getItem('defaultOrgPath').lastIndexOf('/') + 1),
"remarks": "",
"createBySid": window.sessionStorage.getItem('userSid'),
"createTime": getCurrentDate(),
"procDefId": "",
"nodeId": "",
"procInstId": "",
"nodeState": "",
"taskId": "",
"finishTime": "",
"useOrgSid": "",
"useOrgName": "",
"smsPricestrategyBillDetailList": []
},
rules: {},
options: [],
operation: '', //
dialogList: {
comment: ''
},
startTask: true,
current: {
taskDefKey: '',
taskName: '' //
},
nextNode: {}, //
nodeDialogVisible: false,
currentLink: true,
countersignLink: false,
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
},
//
countersign: {
taskId: '',
assignee: '',
userSid: '',
instanceId: '',
views: ''
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
// this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
this.current.taskDefKey = obj.taskDefKey
this.current.taskName = obj.taskName
//
this.countersign.taskId = obj.taskId
this.countersign.userSid = window.sessionStorage.getItem('userSid')
this.countersign.instanceId = obj.instanceId
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 400 + 'px'
}
}, '*')
},
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
.smsPricestrategyBillGoodstypedetailList[i]
.markupRate + ";"
}
} else {
info = row.gdMarkupRate
}
return info
},
showInfo(sid) {
this.viewTitle = '定调价策略申请详情'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.init(sid).then((res) => {
if (res.success) {
this.formobj = res.data
this.formobj.instanceId = res.data.procInstId
if (this.formobj.fileList.length > 0) {
const aa = []
this.formobj.fileList.forEach((e) => {
aa.push(e.url)
})
this.formobj.fileList = aa
}
}
})
selectStaffListss().then((res) => {
if (res.success) {
this.options = res.data
}
})
},
//
openCountersign(val) {
this.operation = val
this.currentLink = true
this.countersignLink = true
this.dialogList.comment = ''
req.getNextNodesForSubmit({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openAgree(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = '同意'
req.getNextNodesForSubmit({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openReject(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = ''
req.getPreviousNodesForReject({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openStop(val) {
this.operation = val
this.currentLink = false
this.countersignLink = false
this.dialogList.comment = ''
this.nodeDialogVisible = true
},
reject() {
if (this.operation === '同意') {
this.handleAgree()
} else if (this.operation === '驳回') {
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
} else {
this.handleReject()
}
} else if (this.operation === '终止') {
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
} else {
this.handleStop()
}
} else if (this.operation === '加签') {
this.handleCountersign()
}
},
/** 加签 */
handleCountersign() {
if (this.countersign.assignee === '') {
this.$message({
showClose: true,
type: 'error',
message: '请选择加签人员'
})
return
}
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
return
}
this.countersign.views = this.dialogList.comment
req.delegate(this.countersign).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 同意任务 */
handleAgree() {
this.linkByParameter.comment = this.dialogList.comment
req.complete(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 驳回任务 */
handleReject() {
this.linkByParameter.comment = this.dialogList.comment
req.reject(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 终止任务 */
handleStop() {
this.linkByParameter.comment = this.dialogList.comment
req.breakProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.rowClass {
border-top: 1px solid #E0E3EB;
}
</style>

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

@ -0,0 +1,348 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button>
</div>
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<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-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 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="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="价格策略" align="center">
<template slot-scope="scope">
{{calculation(scope.row)}}
</template>
</el-table-column>
<el-table-column label="策略明细" align="center" width="600">
<template slot-scope="scope">
{{calculation2(scope.row)}}
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
<!-- 选择商品类别 -->
<choosecategory v-show="viewState == 2" ref="choosecategory" @backData="backData" @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'
import {
getOrgSidByPath
} from '@/api/Common/dictcommons'
export default {
components: {
choosecategory,
editPriceStrategy
},
data() {
return {
viewTitle: "【新增】",
viewState: 1,
listLoading: false,
submitdisabled: false,
formobj: {
"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
.getItem('defaultOrgPath').lastIndexOf('/') + 1),
"remarks": "",
"createBySid": window.sessionStorage.getItem('userSid'),
"createTime": getCurrentDate(),
"procDefId": "",
"nodeId": "",
"procInstId": "",
"nodeState": "",
"taskId": "",
"finishTime": "",
"useOrgSid": "",
"useOrgName": "",
"smsPricestrategyBillDetailList": []
},
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
methods: {
init() {
getOrgSidByPath({
orgPath: window.sessionStorage.getItem('defaultOrgPath')
}).then((res) => {
if (res.success) {
this.formobj.createOrgSid = res.data
this.formobj.useOrgSid = res.data
}
})
},
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
.smsPricestrategyBillGoodstypedetailList[i]
.markupRate + ";"
}
} else {
info = row.gdMarkupRate
}
return info
},
deleteGoodsType(row) {
const index = this.formobj.smsPricestrategyBillDetailList.findIndex((item) => item === row)
console.log("index》》》》", index)
this.formobj.smsPricestrategyBillDetailList.splice(index, 1)
},
editPriceStrategy(row) {
this.viewState = 3
const aa = []
this.$refs['editPriceStrategy'].showAdd(aa, row)
},
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: "",
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
.smsPricestrategyBillGoodstypedetailList[i]
.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
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
}
if (value.strategyType == 2) {
choose[0].strategyTypeValue = '价格区间'
choose[0].strategyDetail = info
}
console.log('>>>>>>>>>backData2', choose)
},
resetState() {
this.viewState = 1
},
categoryAdd() {
this.viewState = 2
const aa = []
this.$refs['choosecategory'].showData(aa, this.formobj.createOrgSid)
},
indexMethod(index) {
return index + 1
},
showInfo(sid) {
this.viewTitle = '【编辑】定调价策略申请'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.init()
req.init(sid).then((res) => {
if (res.success) {
this.formobj = res.data
this.formobj.instanceId = res.data.procInstId
}
})
},
saveOrUpdate() {
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.save(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '保存成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
submit() {
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.submit(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '提交成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
</style>

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

@ -0,0 +1,225 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button>
</div>
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<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="addinputInfo">{{ formobj.remarks }}</span></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 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)}}
</template>
</el-table-column>
<el-table-column label="策略明细" align="center" width="600">
<template slot-scope="scope">
{{calculation2(scope.row)}}
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/storage/adjustment.js'
export default {
name: '',
data() {
return {
viewTitle: '',
viewState: 1,
tableKey: 1,
index: 0,
formobj: {
"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
.getItem('defaultOrgPath').lastIndexOf('/') + 1),
"remarks": "",
"createBySid": window.sessionStorage.getItem('userSid'),
"createTime": getCurrentDate(),
"procDefId": "",
"nodeId": "",
"procInstId": "",
"nodeState": "",
"taskId": "",
"finishTime": "",
"useOrgSid": "",
"useOrgName": "",
"smsPricestrategyBillDetailList": []
},
rules: {},
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 400 + 'px'
}
}, '*')
},
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
.smsPricestrategyBillGoodstypedetailList[i]
.markupRate + ";"
}
} else {
info = row.gdMarkupRate
}
return info
},
showInfo(sid) {
this.viewTitle = '定调价策略申请详情'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.init(sid).then((res) => {
if (res.success) {
this.formobj = res.data
this.formobj.instanceId = res.data.procInstId
if (this.formobj.fileList.length > 0) {
const aa = []
this.formobj.fileList.forEach((e) => {
aa.push(e.url)
})
this.formobj.fileList = aa
}
}
})
},
/** 确认撤回任务 */
openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleRevoke()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤回'
})
})
},
/** 撤回任务 */
handleRevoke() {
req.revokeProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
</style>

184
yxt-as-ui/src/views/workFlow/adjustmentFlow/relation/choosecategory.vue

@ -0,0 +1,184 @@
<template>
<div class="app-container">
<div>
<div class="tab-header webtop">
<div>选择商品类别</div>
<div>
<el-button type="primary" size="small" @click="AddUpdateReturn">确定</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="120px" class="tab-header">
<el-form-item label="类别编码" class="searchlist">
<el-input v-model="listQuery.params.code" placeholder="" clearable />
</el-form-item>
<el-form-item label="类别名称" class="searchlist">
<el-input v-model="listQuery.params.name" placeholder="" clearable />
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button>
</div>
</div>
</div>
<div class="listtop">
<div class="tit">商品类别列表</div>
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>-->
</div>
<div class="">
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column width="50px" type="selection" align="center"/>
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center" />
<!-- <el-table-column fixed label="操作" width="100" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="toInfo(scope.row)">确认</el-button>
</template>
</el-table-column> -->
<el-table-column prop="goodsTypeCode" label="类别编码" align="center" />
<el-table-column prop="goodsTypeName" label="类别名称" align="center" />
</el-table>
</div>
<div class="pages">
<div class="tit" />
<!-- 翻页 -->
<Pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
</div>
</div>
</div>
</div>
</template>
<script>
import Pagination from '@/components/pagination'
import {
getGoodsCategory
} from '@/api/Common/dictcommons'
export default {
name: 'SelectVehicle',
components: {
Pagination
},
data() {
return {
isSearchShow: false,
searchxianshitit: '隐藏查询条件',
tableKey: 0,
sids: [],
list: [],
number: '',
listLoading: false,
listQuery: {
current: 1,
size: 10,
params: {
code: '',
name: '',
deptSid:window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
.getItem('defaultOrgPath').lastIndexOf('/') + 1)
},
total: 0
}
}
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
this.listLoading = true
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
// this.listQuery.params.menuUrl = this.$route.path
this.listQuery.params.menuUrl = ""
getGoodsCategory(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.listQuery.total = response.data.total
this.list = response.data.records
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
//
handleReset() {
this.listQuery = {
current: 1,
size: 10,
params: {
code: '',
name: '',
deptSid:window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
.getItem('defaultOrgPath').lastIndexOf('/') + 1)
},
total: 0
}
this.getList()
},
handleSelectionChange(row) {
this.sids = row
},
showData(value, createOrgSid) {
// const aa = []
// if (value.length > 0) {
// for (var i = 0; i < value.length; i++) {
// aa.push(value[i].saleVehSid)
// }
// this.listQuery.params.saleVehSids = aa
// } else {
// this.listQuery.params.saleVehSids = []
// }``
this.listQuery.current = 1
this.listQuery.size = 10
this.listQuery.total = 0
this.getList()
},
//
AddUpdateReturn() {
if (this.sids.length > 0) {
this.$emit('backData', this.sids)
} else {
this.$notify({
title: '提示',
message: '请至少选择一条记录进行操作',
type: 'error',
duration: 2000
})
}
},
toInfo(row){
this.$emit('backData', row.sid)
},
//
handleReturn() {
this.$emit('doback')
}
}
}
</script>
<style scoped>
</style>

298
yxt-as-ui/src/views/workFlow/adjustmentFlow/relation/editPriceStrategy.vue

@ -0,0 +1,298 @@
<template>
<div>
<div class="tab-header webtop">
<!-- 标题 -->
<div>价格策略设置</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="primary" size="small" @click="saveData()">保存</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div>
<div class="listconadd">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<!-- <div class="title">
<div>基础信息</div>
</div> -->
<el-row class="first_row">
<el-col :span="12">
<div class="span-sty">商品类别名称</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.goodsTypeName }}</span></el-form-item>
</el-col>
<el-col :span="12">
<div class="span-sty"><span class="must">*</span> 价格策略</div>
<el-form-item prop="strategyType">
<el-radio-group v-model="formobj.strategyType" size="small" style="margin-left: 120px;"
@change="selectIsLockingSalesPrice">
<el-radio :label="1">固定比例</el-radio>
<el-radio :label="2">价格区间</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="formobj.strategyType==1">
<el-col :span="24">
<div class="span-sty"><span class="must">*</span> 加价比例(%)</div>
<el-form-item>
<el-input v-model="formobj.gdMarkupRate" placeholder="" class="addinputw addinputInfo" clearable @input="gdMarkupRateInput"
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" />
</el-form-item>
</el-col>
</el-row>
<div class="title titleOne" v-show="formobj.strategyType==2">
<div>价格区间加价策略</div>
<el-button type="primary" size="mini" class="btntopblueline" @click="addItem()">添加</el-button>
</div>
<el-table :data="formobj.smsPricestrategyBillGoodstypedetailList" border style="width: 100%;"
v-show="formobj.strategyType==2">
<!-- <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 label="操作" width="100" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="deleteItem(scope.row)">删除</el-button>
</template>
</el-table-column>
<!-- <el-table-column label="区间开始" prop="goodsSpuName" align="center" />
<el-table-column label="区间截止" prop="goodsSkuCode" align="center" />
<el-table-column label="加价比例(%)" prop="goodsSkuOwnSpec" align="center" /> -->
<el-table-column label="区间开始" align="center">
<template slot-scope="scope">
<el-input ref="focusAssumptionInput" v-model="scope.row.rangeStart" clearable placeholder=""
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" />
</template>
</el-table-column>
<el-table-column label="区间截止" align="center">
<template slot-scope="scope">
<el-input ref="focusAssumptionInput" v-model="scope.row.rangeEnd" clearable placeholder=""
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" />
</template>
</el-table-column>
<el-table-column label="加价比例(%)" align="center">
<template slot-scope="scope">
<el-input ref="focusAssumptionInput" v-model="scope.row.markupRate" clearable placeholder=""
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" />
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
</template>
<script>
import Pagination from '@/components/pagination'
import {
getAsBusrepairBill
} from '@/api/Common/dictcommons'
export default {
name: 'SelectVehicle',
components: {
Pagination
},
data() {
return {
isSearchShow: false,
searchxianshitit: '隐藏查询条件',
formobj: {
goodsTypeName: "",
strategyType: '',
gdMarkupRate: "",
smsPricestrategyBillGoodstypedetailList: []
},
rules: {
strategyType: [{
required: true,
message: '请选择价格策略',
trigger: 'change'
}],
gdMarkupRate: [{
required: true,
message: '加价比例不能为空',
trigger: 'blur'
}],
}
}
},
methods: {
gdMarkupRateInput(val){
console.log("gdMarkupRateInput》》》》", val)
console.log("gdMarkupRateInput》》》》", this.formobj.gdMarkupRate)
},
indexMethod(index) {
return index + 1
},
//
saveData() {
if (this.formobj.strategyType == 1) {
if (this.formobj.gdMarkupRate == '') {
this.$message({
showClose: true,
type: 'error',
message: '加价比例不能为空222'
})
return
}
}
if (this.formobj.strategyType == 2) {
if (this.formobj.smsPricestrategyBillGoodstypedetailList == 0) {
this.$message({
showClose: true,
type: 'error',
message: '请添加价格区间加价策略'
})
return
}
for (var i = 0; i < this.formobj.smsPricestrategyBillGoodstypedetailList.length; i++) {
var item = this.formobj.smsPricestrategyBillGoodstypedetailList[i]
if (item.rangeStart == '') {
this.$message({
showClose: true,
type: 'error',
message: '区间开始不能为空'
})
return
}
if (item.rangeEnd == '') {
this.$message({
showClose: true,
type: 'error',
message: '区间结束不能为空'
})
return
}
if (item.markupRate == '') {
this.$message({
showClose: true,
type: 'error',
message: '加价比例不能为空'
})
return
}
}
}
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.$emit('backData2', this.formobj)
this.formobj = {
goodsTypeName: "",
strategyType: '',
gdMarkupRate: "",
smsPricestrategyBillGoodstypedetailList: []
}
}
})
},
showAdd(value, row) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
console.log("showAdd》》》》", row)
this.formobj = row
},
//
handleReturn() {
this.$emit('doback')
this.formobj = {
goodsTypeName: "",
strategyType: '',
gdMarkupRate: "",
smsPricestrategyBillGoodstypedetailList: []
}
},
selectIsLockingSalesPrice(val) {
console.log("selectIsLockingSalesPrice》》》》", val)
this.formobj.strategyType = val
console.log("selectIsLockingSalesPrice》》》》", this.formobj.strategyType)
},
addItem() {
this.formobj.smsPricestrategyBillGoodstypedetailList.push({
rangeStart: "",
rangeEnd: "",
markupRate: "",
})
},
deleteItem(row) {
const index = this.formobj.smsPricestrategyBillGoodstypedetailList.findIndex((item) => item === row)
console.log("index》》》》", index)
this.formobj.smsPricestrategyBillGoodstypedetailList.splice(index, 1)
}
}
}
</script>
<style scoped>
/deep/ .el-form-item__error {
margin-left: 120px !important;
}
.must {
color: #f00;
}
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
.first_row {
border-top: 1px solid #E0E3EB;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
</style>
Loading…
Cancel
Save