Browse Source

完善调拨申请(一级站内)

master
yunuo970428 1 week ago
parent
commit
53b45a5648
  1. 989
      yxt-as-ui/src/views/storage/allocation/allocationAdd.vue
  2. 282
      yxt-as-ui/src/views/storage/allocation/allocationInfo.vue
  3. 814
      yxt-as-ui/src/views/storage/allocation/index.vue
  4. 235
      yxt-as-ui/src/views/storage/allocation/relation/chooseproducts.vue
  5. 672
      yxt-as-ui/src/views/workFlow/allocationFlow/allocationDaiBan.vue
  6. 849
      yxt-as-ui/src/views/workFlow/allocationFlow/allocationEdit.vue
  7. 304
      yxt-as-ui/src/views/workFlow/allocationFlow/allocationYiBan.vue
  8. 236
      yxt-as-ui/src/views/workFlow/allocationFlow/relation/chooseproducts.vue

989
yxt-as-ui/src/views/storage/allocation/allocationAdd.vue

File diff suppressed because it is too large

282
yxt-as-ui/src/views/storage/allocation/allocationInfo.vue

@ -7,11 +7,8 @@
</div> </div>
</div> </div>
<div class="listconadd"> <div class="listconadd">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02"> <el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<el-row class="first_row"> <el-row class="first_row">
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">申请人</div> <div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
@ -25,9 +22,7 @@
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">调出站</div> <div class="span-sty">调出站</div>
<el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item>
@ -44,35 +39,29 @@
<el-form-item><span class="addinputInfo">{{ formobj.confirmName }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.confirmName }}</span></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<div class="span-sty">备注</div> <div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div class="title">调拨商品列表</div>
<el-table :data="formobj.wmsInventoryAllocateBillDetailNewList" :index="index" border style="width: 100%;" show-summary :summary-method="getSummaries">
<div class="title titleOne"> <el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
<div>调拨商品列表</div> <el-table-column prop="goodsID" label="商品ID" align="center"/>
</div> <el-table-column prop="goodsSpuName" label="商品名称" align="center"/>
<el-table-column prop="goodsSkuCode" label="商品编码" align="center"/>
<el-table :data="formobj.wmsInventoryAllocateBillDetailNewList" :index="index" border style="width: 100%;" <el-table-column prop="goodsSkuOwnSpec" label="型号" align="center"/>
show-summary :summary-method="getSummaries"> <el-table-column prop="unit" label="单位" align="center"/>
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" /> <el-table-column prop="warehouseName" label="仓库" width="150" align="center"/>
<el-table-column prop="goodsID" label="商品ID" align="center" /> <el-table-column prop="warehouseZoneName" label="区域" width="150" align="center"/>
<el-table-column prop="goodsSpuName" label="商品名称" align="center" /> <el-table-column prop="warehouseArea" label="库区" width="150" align="center"/>
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" /> <el-table-column prop="warehouseRackCode" label="库位" align="center"/>
<el-table-column prop="goodsSkuOwnSpec" label="型号" align="center" /> <el-table-column prop="stockCount" label="库存数量" align="center"/>
<el-table-column prop="unit" label="单位" align="center" /> <el-table-column prop="markUpRatio" label="加价比例" align="center"/>
<el-table-column prop="warehouseName" label="仓库" width="150" align="center" /> <el-table-column prop="requAmount" label="调拨单价" align="center"/>
<el-table-column prop="warehouseArea" label="仓库" width="150" align="center" /> <el-table-column prop="count" label="调拨数量" align="center"/>
<el-table-column prop="warehouseRackCode" label="库位" align="center" /> <el-table-column prop="amount" label="调拨金额" align="center" width="100"/>
<el-table-column prop="stockCount" label="库存数量" align="center" />
<el-table-column prop="markUpRatio" label="加价比例" align="center" />
<el-table-column prop="requAmount" label="调拨单价" align="center" />
<el-table-column prop="count" label="调拨数量" align="center" />
<el-table-column prop="amount" label="调拨金额" align="center" width="100" />
</el-table> </el-table>
</el-form> </el-form>
</div> </div>
@ -80,119 +69,144 @@
</template> </template>
<script> <script>
import req from '@/api/storage/allocation.js' import req from '@/api/storage/allocation.js'
export default {
data() { export default {
return { data() {
index: 0, return {
formobj: {}, index: 0,
formobj: {
sid: '',
billNo: '',
useOrgSid: '',
createBySid: '',
createByName: '',
deptName: '',
deptSid: '',
createTime: '',
outOrgName: '',
outOrgSid: '',
outPlatName: '',
outPlatSid: '',
inOrgName: '',
inOrgSid: '',
inPlatName: '',
inPlatSid: '',
inOrgAttributeKey: '',
inOrgAttributeValue: '',
confirmName: '',
confirmSid: '',
remarks: '',
grade: '',
createOrgSid: '',
procDefId: '',
nodeId: '',
procInstId: '',
nodeState: '',
taskId: '',
wmsInventoryAllocateBillDetailNewList: []
} }
}
},
methods: {
//
getSummaries(param) {
const {
columns,
data
} = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'count') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
} else if (column.property === 'amount') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
}
})
return sums
}, },
showInfo(sid) {
methods: { this.$nextTick(() => {
// this.$refs['form_obj'].clearValidate()
getSummaries(param) { })
const { req.init(sid).then((res) => {
columns, if (res.success) {
data this.formobj = res.data
} = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'count') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
} else if (column.property === 'amount') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
}
})
return sums
},
showAdd(sid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.init(sid).then((res) => {
if (res.success) {
this.formobj = res.data
}
})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
} }
this.$emit('doback') })
},
handleReturn() {
this.formobj = {
sid: '',
billNo: '',
useOrgSid: '',
createBySid: '',
createByName: '',
deptName: '',
deptSid: '',
createTime: '',
outOrgName: '',
outOrgSid: '',
outPlatName: '',
outPlatSid: '',
inOrgName: '',
inOrgSid: '',
inPlatName: '',
inPlatSid: '',
inOrgAttributeKey: '',
inOrgAttributeValue: '',
confirmName: '',
confirmSid: '',
remarks: '',
grade: '',
createOrgSid: '',
procDefId: '',
nodeId: '',
procInstId: '',
nodeState: '',
taskId: '',
wmsInventoryAllocateBillDetailNewList: []
} }
this.$emit('doback')
} }
} }
}
</script> </script>
<style scoped> <style scoped>
/deep/ .el-form-item__error { .span-sty {
margin-left: 120px !important; width: 130px !important;
} }
.addinputInfo {
.must { margin-left: 120px !important;
color: #f00; }
} .formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
.span-sty { width: calc(100% - 115px);
width: 130px !important; }
}
.first_row {
.addinputInfo { border-top: 1px solid #E0E3EB;
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;
}
/deep/ .el-form-item__error {
margin-left: 180px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .el-radio-group {
display: inline;
line-height: 1px;
vertical-align: middle;
}
</style> </style>

814
yxt-as-ui/src/views/storage/allocation/index.vue

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div v-show="viewState == 1"> <div v-show="viewState == 1">
<button-bar ref="btnbar" view-title="调拨列表" :btndisabled="btndisabled" @btnhandle="btnHandle" /> <button-bar ref="btnbar" view-title="调拨列表" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div class="main-content"> <div class="main-content">
<div class="searchcon"> <div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow"> <el-button size="small" class="searchbtn" @click="clicksearchShow">
@ -9,48 +9,39 @@
</el-button> </el-button>
<div v-show="isSearchShow" class="search"> <div v-show="isSearchShow" class="search">
<el-form :inline="true" class="tab-header"> <el-form :inline="true" class="tab-header">
<el-form-item label="申请部门"> <el-form-item label="申请部门">
<el-input v-model="queryParams.params.deptName" placeholder="" clearable /> <el-input v-model="queryParams.params.deptName" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="申请人"> <el-form-item label="申请人">
<el-input v-model="queryParams.params.createByName" placeholder="" clearable /> <el-input v-model="queryParams.params.createByName" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="单据编号"> <el-form-item label="单据编号">
<el-input v-model="queryParams.params.billNo" placeholder="" clearable /> <el-input v-model="queryParams.params.billNo" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="单据日期"> <el-form-item label="单据日期">
<el-date-picker v-model="queryParams.params.createStartTime" type="date" placeholder="选择日期" <el-date-picker v-model="queryParams.params.createStartTime" type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;" />
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> <span style="padding: 0 8px"></span>
</el-date-picker> <el-date-picker v-model="queryParams.params.createDateStart" type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;" />
<el-date-picker v-model="queryParams.params.createDateStart" type="date" placeholder="选择日期"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
</el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="办结日期"> <el-form-item label="办结日期">
<el-date-picker v-model="queryParams.params.finishStartTime" type="date" placeholder="选择日期" <el-date-picker v-model="queryParams.params.finishStartTime" type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;" />
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> <span style="padding: 0 8px"></span>
</el-date-picker> <el-date-picker v-model="queryParams.params.finishEndTime" type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;" />
<el-date-picker v-model="queryParams.params.finishEndTime" type="date" placeholder="选择日期"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
</el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="调出分公司"> <el-form-item label="调出分公司">
<el-input v-model="queryParams.params.outOrgName" placeholder="" clearable /> <el-input v-model="queryParams.params.outOrgName" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="调出站"> <el-form-item label="调出站">
<el-input v-model="queryParams.params.outPlatName" placeholder="" clearable /> <el-input v-model="queryParams.params.outPlatName" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="调入分公司"> <el-form-item label="调入分公司">
<el-input v-model="queryParams.params.inOrgName" placeholder="" clearable /> <el-input v-model="queryParams.params.inOrgName" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="调入站"> <el-form-item label="调入站">
<el-input v-model="queryParams.params.inPlatName" placeholder="" clearable /> <el-input v-model="queryParams.params.inPlatName" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="经办人"> <el-form-item label="经办人">
<el-input v-model="queryParams.params.confirmName" placeholder="" clearable /> <el-input v-model="queryParams.params.confirmName" placeholder="" clearable/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="btn" style="text-align: center;"> <div class="btn" style="text-align: center;">
@ -66,510 +57,455 @@
<!-- End 项目列表头部 --> <!-- End 项目列表头部 -->
<!-- Start 项目列表 --> <!-- Start 项目列表 -->
<div class=""> <div class="">
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" <el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" @selection-change="selectionLineChangeHandle">
@selection-change="selectionLineChangeHandle"> <el-table-column fixed width="50" type="selection" align="center"/>
<el-table-column fixed width="50" type="selection" align="center" />
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> <el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column fixed label="操作" align="center" width="150"> <el-table-column fixed label="操作" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" :disabled="scope.row.nodeState!='待提交'" <el-button type="primary" size="mini" :disabled="scope.row.nodeState =='发起申请' ? false : scope.row.nodeState == '待提交' ? false : true" @click="toRelevancy(scope.row)">办理
@click="toRelevancy(scope.row)">办理</el-button> </el-button>
<el-button type="primary" size="mini" @click="toDetails(scope.row)">查看</el-button> <el-button type="primary" size="mini" @click="toDetails(scope.row)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="nodeState" label="流程状态" align="center" /> <el-table-column prop="nodeState" label="流程状态" align="center" width="100" />
<el-table-column prop="billNo" label="单据编号" align="center" /> <el-table-column prop="billNo" label="单据编号" align="center" width="180" />
<el-table-column prop="createByName" label="申请人" align="center" /> <el-table-column prop="createByName" label="申请人" align="center" width="100" />
<el-table-column prop="createTime" label="申请日期" align="center" /> <el-table-column prop="createTime" label="申请日期" align="center" width="120" />
<!-- <el-table-column prop="state" label="完成标志" align="center" /> --> <el-table-column prop="finishTime" label="办结日期" align="center" width="120" />
<!-- <el-table-column label="完成标志" align="center" width="180"> <el-table-column prop="createOrgName" label="调出分公司" align="center" width="150" />
<template slot-scope="scope"> <el-table-column prop="outPlatName" label="调出站" align="center" width="150" />
<span>{{scope.row.state=='1'?'未完成':'已完成'}}</span> <el-table-column prop="inOrgName" label="调入分公司" align="center" width="150" />
</template> <el-table-column prop="inPlatName" label="调入站" align="center" width="150" />
</el-table-column> --> <el-table-column prop="confirmName" label="经办人" align="center" width="100" />
<el-table-column prop="finishTime" label="办结日期" align="center" /> <el-table-column prop="count" label="调拨数量" align="center" width="120" />
<el-table-column prop="createOrgName" label="调出分公司" align="center" /> <el-table-column prop="amount" label="调拨金额" align="center" width="120" />
<el-table-column prop="outPlatName" label="调出站" align="center" />
<el-table-column prop="inOrgName" label="调入分公司" align="center" />
<el-table-column prop="inPlatName" label="调入站" align="center" />
<el-table-column prop="confirmName" label="经办人" align="center" />
<el-table-column prop="count" label="调拨数量" align="center" />
<el-table-column prop="amount" label="调拨金额" align="center" />
</el-table> </el-table>
</div> </div>
<!-- End 项目列表 --> <!-- End 项目列表 -->
<div class="pages"> <div class="pages">
<div class="tit" /> <div class="tit"/>
<!-- 翻页 --> <!-- 翻页 -->
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" <pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="loadList"/>
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
</div> </div>
</div> </div>
</div> </div>
<!-- End 查询和其列表部分 --> <!-- End 查询和其列表部分 -->
<!-- 新增修改部分组件 --> <!-- 新增修改部分组件 -->
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" /> <divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList"/>
<divInfo v-show="viewState == 4" ref="divinfo" @doback="resetState" @reloadlist="loadList" /> <divInfo v-show="viewState == 4" ref="divinfo" @doback="resetState" @reloadlist="loadList"/>
<el-dialog title="补充物流信息" :visible.sync="dialogVisible" :before-close="handleClose" <el-dialog title="补充物流信息" :visible.sync="dialogVisible" :before-close="handleClose" style="width:120%;margin-left: -10%;">
style="width:120%;margin-left: -10%;">
<el-form ref="dataForm" class="formaddcopy02" style="margin-top: -40px;" :model="formobj"> <el-form ref="dataForm" class="formaddcopy02" style="margin-top: -40px;" :model="formobj">
<el-row class="first_row"> <el-row class="first_row">
<el-col :span="24"> <el-col :span="24">
<div class="span-sty">送货方式</div> <div class="span-sty">送货方式</div>
<el-form-item> <el-select v-model="formobj.deliveryKey" placeholder="请选择送货方式" @change="selectDeliveryKey" <el-form-item>
class="addinputInfo"> <el-select v-model="formobj.deliveryKey" placeholder="请选择送货方式" @change="selectDeliveryKey" class="addinputInfo">
<el-option v-for="(item,i) in deliveryKeyList" :key="i" :label="item.name" :value="item.sid"> <el-option v-for="(item,i) in deliveryKeyList" :key="i" :label="item.name" :value="item.sid">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-show="formobj.deliveryKey==1"> <el-row v-show="formobj.deliveryKey==1">
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">快递单号</div> <div class="span-sty">快递单号</div>
<el-form-item><el-input v-model="formobj.expressBillNo" placeholder="" class="addinputw addinputInfo" <el-form-item>
clearable /></el-form-item> <el-input v-model="formobj.expressBillNo" placeholder="" class="addinputw addinputInfo" clearable/>
</el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">快递公司</div> <div class="span-sty">快递公司</div>
<el-form-item><el-input v-model="formobj.expressCompany" placeholder="" class="addinputw addinputInfo" <el-form-item>
clearable /></el-form-item> <el-input v-model="formobj.expressCompany" placeholder="" class="addinputw addinputInfo" clearable/>
</el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">备注</div> <div class="span-sty">备注</div>
<el-form-item><el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" <el-form-item>
clearable /></el-form-item> <el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" clearable/>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-show="formobj.deliveryKey==2"> <el-row v-show="formobj.deliveryKey==2">
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">取货人</div> <div class="span-sty">取货人</div>
<el-form-item><el-input v-model="formobj.pickUpName" placeholder="" class="addinputw addinputInfo" <el-form-item>
clearable /></el-form-item> <el-input v-model="formobj.pickUpName" placeholder="" class="addinputw addinputInfo" clearable/>
</el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">取货日期</div> <div class="span-sty">取货日期</div>
<el-form-item> <el-date-picker v-model="formobj.pickUpDate" type="date" class="addinputw addinputInfo" <el-form-item>
value-format="yyyy-MM-dd" placeholder="选择日期"> <el-date-picker v-model="formobj.pickUpDate" type="date" class="addinputw addinputInfo" value-format="yyyy-MM-dd" placeholder="选择日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">备注</div> <div class="span-sty">备注</div>
<el-form-item><el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" <el-form-item>
clearable /></el-form-item> <el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" clearable/>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-show="formobj.deliveryKey==3"> <el-row v-show="formobj.deliveryKey==3">
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">送货人</div> <div class="span-sty">送货人</div>
<el-form-item><el-input v-model="formobj.deliveryPerson" placeholder="" class="addinputw addinputInfo" <el-form-item>
clearable /></el-form-item> <el-input v-model="formobj.deliveryPerson" placeholder="" class="addinputw addinputInfo" clearable/>
</el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">送达日期</div> <div class="span-sty">送达日期</div>
<el-form-item> <el-date-picker v-model="formobj.deliveryDate" type="date" class="addinputw addinputInfo" <el-form-item>
value-format="yyyy-MM-dd" placeholder="选择日期"> <el-date-picker v-model="formobj.deliveryDate" type="date" class="addinputw addinputInfo" value-format="yyyy-MM-dd" placeholder="选择日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">备注</div> <div class="span-sty">备注</div>
<el-form-item><el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" <el-form-item>
clearable /></el-form-item> <el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" clearable/>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div style="display: flex;flex-direction: row;width: 100%;justify-content: center;align-items: center;"> <div style="display: flex;flex-direction: row;width: 100%;justify-content: center;align-items: center;">
<el-button type="primary" style="margin-top: 20px;" @click="saveData"> </el-button> <el-button type="primary" style="margin-top: 20px;" @click="saveData"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import req from '@/api/storage/allocation.js' import req from '@/api/storage/allocation.js'
import ButtonBar from '@/components/ButtonBar' import ButtonBar from '@/components/ButtonBar'
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import divAdd from './allocationAdd.vue'
import divAdd from './allocationAdd.vue' import divInfo from './allocationInfo.vue'
import divInfo from './allocationInfo.vue'
export default { export default {
components: { components: {
ButtonBar, ButtonBar,
Pagination, Pagination,
pageye, divAdd,
divAdd, divInfo
divInfo },
}, data() {
data() { return {
return { dialogVisible: false,
dialogVisible: false, btndisabled: false,
btndisabled: false, viewState: 1, // 1 2 3 4
viewState: 1, // 1 2 3 4 isSearchShow: false,
isSearchShow: false, searchxianshitit: '显示查询条件',
searchxianshitit: '显示查询条件', tableLoading: false,
tableLoading: false, dataList: [],
dataList: [], btnList: [
btnList: [{ {
type: 'primary', type: 'primary',
size: 'small', size: 'small',
icon: 'plus', icon: 'plus',
btnKey: 'toAdd', btnKey: 'toAdd',
btnLabel: '新增' btnLabel: '新增'
},
{
type: 'danger',
size: 'small',
icon: 'el-icon-delete',
btnKey: 'doDel',
btnLabel: '删除'
},
{
type: 'primary',
size: 'small',
icon: 'edit',
btnKey: 'toSupplement',
btnLabel: '补充物流信息'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
queryParams: {
current: 1,
size: 10,
total: 0,
params: {
"outOrgName": "",
"deptName": "",
"createByName": "",
"billNo": "",
"createStartTime": "",
"createEndTime": "",
"finishStartTime": "",
"finishEndTime": "",
"outPlatName": "",
"inOrgName": "",
"inPlatName": "",
"confirmName": "",
"grade": "1",
}
}, },
sids: [], {
selectionList: [], type: 'danger',
deliveryKeyList: [{ size: 'small',
name: '快递', icon: 'el-icon-delete',
sid: 1 btnKey: 'doDel',
}, btnLabel: '删除'
{ },
name: '对方自取', {
sid: 2 type: 'primary',
}, size: 'small',
{ icon: 'edit',
name: '我方送货', btnKey: 'toSupplement',
sid: 3 btnLabel: '补充物流信息'
} },
], {
formobj: { type: 'info',
"sids": [], size: 'small',
"remarks": "", icon: 'cross',
"deliveryKey": "", btnKey: 'doClose',
"deliveryName": "", btnLabel: '关闭'
"expressBillNo": "", }
"expressCompany": "", ],
"pickUpName": "", queryParams: {
"pickUpDate": "", current: 1,
"deliveryPerson": "", size: 10,
"deliveryDate": "" total: 0,
params: {
outOrgName: '',
deptName: '',
createByName: '',
billNo: '',
createStartTime: '',
createEndTime: '',
finishStartTime: '',
finishEndTime: '',
outPlatName: '',
inOrgName: '',
inPlatName: '',
confirmName: '',
grade: '1',
orgpath: '',
menuUrl: '',
userSid: ''
}
},
sids: [],
selectionList: [],
deliveryKeyList: [
{
name: '快递',
sid: 1
},
{
name: '对方自取',
sid: 2
},
{
name: '我方送货',
sid: 3
} }
],
formobj: {
sids: [],
remarks: '',
deliveryKey: '',
deliveryName: '',
expressBillNo: '',
expressCompany: '',
pickUpName: '',
pickUpDate: '',
deliveryPerson: '',
deliveryDate: ''
}
}
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
this.loadList()
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
} }
}, },
mounted() { btnHandle(btnKey) {
this.$refs['btnbar'].setButtonList(this.btnList) switch (btnKey) {
}, case 'toAdd':
created() { this.toAdd()
this.loadList() break
case 'doDel':
this.doDel()
break
case 'toSupplement':
this.toSupplement()
break
case 'doClose':
this.doClose()
break
default:
break
}
}, },
methods: { loadList() {
// this.tableLoading = true
clicksearchShow() { this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
this.isSearchShow = !this.isSearchShow this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
if (this.isSearchShow) { this.queryParams.params.menuUrl = this.$route.path
this.searchxianshitit = '隐藏查询条件' req.listPage(this.queryParams).then((resp) => {
this.tableLoading = false
if (resp.success) {
const data = resp.data
this.queryParams.total = data.total
this.dataList = data.records
} else { } else {
this.searchxianshitit = '显示查询条件' // resp.code
} this.dataList = []
}, this.queryParams.total = 0
btnHandle(btnKey) {
switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'doDel':
this.doDel()
break
case 'toSupplement':
this.toSupplement()
break
case 'doClose':
this.doClose()
break
default:
break
} }
}, }).catch(() => {
loadList() { this.tableLoading = false
this.tableLoading = true })
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid') },
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') //
this.queryParams.params.menuUrl = this.$route.path indexMethod(index) {
req.listPage(this.queryParams).then((resp) => { var pagestart = (this.queryParams.current - 1) * this.queryParams.size
this.tableLoading = false var pageindex = index + 1 + pagestart
if (resp.success) { return pageindex
const data = resp.data },
this.queryParams.total = data.total dosearch() {
this.dataList = data.records this.queryParams.current = 1
} else { this.loadList()
// resp.code },
this.dataList = [] resetQuery() {
this.queryParams.total = 0 this.queryParams = {
} current: 1,
}).catch(() => { size: 10,
this.tableLoading = false total: 0,
}) params: {
}, outOrgName: '',
deptName: '',
// createByName: '',
indexMethod(index) { billNo: '',
var pagestart = (this.queryParams.current - 1) * this.queryParams.size createStartTime: '',
var pageindex = index + 1 + pagestart createEndTime: '',
return pageindex finishStartTime: '',
}, finishEndTime: '',
selectTime1() { outPlatName: '',
inOrgName: '',
}, inPlatName: '',
selectTime2() { confirmName: '',
grade: '1',
}, orgpath: '',
menuUrl: '',
dosearch() { userSid: ''
this.queryParams.current = 1
this.loadList()
},
resetQuery() {
this.queryParams = {
current: 1,
size: 10,
total: 0,
params: {
"outOrgName": "",
"deptName": "",
"createByName": "",
"billNo": "",
"createStartTime": "",
"createEndTime": "",
"finishStartTime": "",
"finishEndTime": "",
"outPlatName": "",
"inOrgName": "",
"inPlatName": "",
"confirmName": "",
"grade": "1",
}
} }
this.loadList() }
}, this.loadList()
toAdd() { },
this.viewState = 2 toAdd() {
this.$refs['divadd'].showAdd() this.viewState = 2
}, this.$refs['divadd'].showAdd()
doDel() { },
doDel() {
if (this.sids.length > 0) { if (this.sids.length > 0) {
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
this.$confirm(tip, '提示', { this.$confirm(tip, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
const loading = this.$loading({ const loading = this.$loading({
lock: true, lock: true,
text: 'Loading', text: 'Loading',
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)'
}) })
req.deleteBySids(this.sids).then((resp) => { req.deleteBySids(this.sids).then((resp) => {
loading.close() loading.close()
if (resp.success) { if (resp.success) {
this.$message({ this.$message({
type: 'success', type: 'success',
message: resp.msg, message: resp.msg,
showClose: true showClose: true
}) })
this.loadList() this.loadList()
} else { } else {
loading.close()
// resp.code
}
}).catch(e => {
loading.close() loading.close()
}) // resp.code
}).catch(() => {}) }
} else { }).catch(e => {
this.$message({ loading.close()
type: "warning",
showClose: true,
message: '请至少选择一条记录进行删除操作'
}) })
} }).catch(() => {
},
selectionLineChangeHandle(val) {
console.log("val", val);
this.selectionList = val
const aa = []
val.forEach(element => {
aa.push(element.sid)
}) })
this.sids = aa } else {
}, this.$message({
toRelevancy(row) { type: 'warning',
this.viewState = 3 showClose: true,
this.$refs['divadd'].showEdit(row.sid) message: '请至少选择一条记录进行删除操作'
}, })
toDetails(row) { }
this.viewState = 4 },
this.$refs['divinfo'].showAdd(row.sid) selectionLineChangeHandle(val) {
}, this.selectionList = val
const aa = []
toSupplement() { val.forEach(element => {
if (this.sids.length > 0) { aa.push(element.sid)
this.dialogVisible = true })
this.sids = aa
console.log("toSupplement", this.sids); },
toRelevancy(row) {
} else { this.viewState = 3
this.$refs['divadd'].showEdit(row.sid)
},
toDetails(row) {
this.viewState = 4
this.$refs['divinfo'].showInfo(row.sid)
},
toSupplement() {
if (this.sids.length > 0) {
this.dialogVisible = true
} else {
this.$message({
type: 'warning',
showClose: true,
message: '请至少选择一条记录进行操作'
})
}
},
saveData() {
this.formobj.sids = this.sids
req.saveLogisticsInfo(this.formobj).then((resp) => {
if (resp.success) {
this.dialogVisible = false
this.$message({ this.$message({
type: "warning", type: 'success',
showClose: true, message: resp.msg,
message: '请至少选择一条记录进行操作' showClose: true
}) })
} this.loadList()
}, this.formobj = {
saveData() { sids: [],
remarks: '',
this.formobj.sids = this.sids deliveryKey: '',
deliveryName: '',
req.saveLogisticsInfo(this.formobj).then((resp) => { expressBillNo: '',
if (resp.success) { expressCompany: '',
this.dialogVisible = false pickUpName: '',
this.$message({ pickUpDate: '',
type: 'success', deliveryPerson: '',
message: resp.msg, deliveryDate: ''
showClose: true
})
this.loadList()
this.formobj = {
"sids": [],
"remarks": "",
"deliveryKey": "",
"deliveryName": "",
"expressBillNo": "",
"expressCompany": "",
"pickUpName": "",
"pickUpDate": "",
"deliveryPerson": "",
"deliveryDate": ""
}
} else {
// resp.code
} }
}).catch(e => {}) } else {
// resp.code
}
}, }).catch(e => {
handleClose() { })
this.dialogVisible = false },
}, handleClose() {
selectDeliveryKey(val) { this.dialogVisible = false
console.log("selectDeliveryKey", val); },
const choose = this.deliveryKeyList.filter((item) => item.sid == val) selectDeliveryKey(val) {
console.log('>>>>>>>>>selectDeliveryKey', choose) const choose = this.deliveryKeyList.filter((item) => item.sid === val)
this.formobj.deliveryName = choose[0].name this.formobj.deliveryName = choose[0].name
this.formobj.deliveryKey = choose[0].sid this.formobj.deliveryKey = choose[0].sid
},
}, doClose() {
doClose() { this.$store.dispatch('tagsView/delView', this.$route)
this.$store.dispatch('tagsView/delView', this.$route) this.$router.go(-1)
this.$router.go(-1) },
}, resetState() {
this.viewState = 1
resetState() {
this.viewState = 1
},
} }
} }
}
</script> </script>
<style scoped> <style scoped>
/deep/ .el-form-item__error { .first_row {
margin-left: 120px !important; border-top: 1px solid #E0E3EB;
} }
.span-sty {
.must { width: 90px !important;
color: #f00; }
} .addinputInfo {
margin-left: 80px !important;
.span-sty { }
width: 90px !important; .formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
} margin-left: 80px !important;
width: calc(100% - 70px);
.addinputInfo { }
margin-left: 80px !important; /deep/ .el-form-item__error {
} margin-left: 180px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 80px !important;
width: calc(100% - 70px);
}
.first_row {
border-top: 1px solid #E0E3EB;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
/deep/ .el-form-item__error {
margin-left: 180px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .el-radio-group {
display: inline;
line-height: 1px;
vertical-align: middle;
}
</style> </style>

235
yxt-as-ui/src/views/storage/allocation/relation/chooseproducts.vue

@ -14,13 +14,13 @@
<div v-show="isSearchShow" class="search"> <div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="120px" class="tab-header"> <el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="120px" class="tab-header">
<el-form-item label="商品ID" class="searchlist"> <el-form-item label="商品ID" class="searchlist">
<el-input v-model="listQuery.params.goodsID" placeholder="" clearable /> <el-input v-model="listQuery.params.goodsID" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="商品编码" class="searchlist"> <el-form-item label="商品编码" class="searchlist">
<el-input v-model="listQuery.params.goodsSkuCode" placeholder="" clearable /> <el-input v-model="listQuery.params.goodsSkuCode" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="商品名称" class="searchlist"> <el-form-item label="商品名称" class="searchlist">
<el-input v-model="listQuery.params.goodsSkuTitle" placeholder="" clearable /> <el-input v-model="listQuery.params.goodsSkuTitle" placeholder="" clearable/>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -32,29 +32,27 @@
</div> </div>
<div class="listtop"> <div class="listtop">
<div class="tit">商品列表</div> <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>
<div class=""> <div class="">
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%" <el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%" @selection-change="handleSelectionChange">
@selection-change="handleSelectionChange"> <el-table-column width="50px" type="selection" align="center"/>
<el-table-column width="50px" type="selection" align="center" /> <el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center" /> <el-table-column prop="goodsID" label="商品ID" align="center"/>
<el-table-column prop="goodsID" label="商品ID" align="center" /> <el-table-column prop="goodsSkuTitle" label="商品名称" align="center"/>
<el-table-column prop="goodsSkuTitle" label="商品名称" align="center" /> <el-table-column prop="goodsSkuCode" label="商品编码" align="center"/>
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" /> <el-table-column prop="goodsSkuOwnSpec" label="规格" align="center"/>
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" /> <el-table-column prop="unit" label="单位" align="center"/>
<el-table-column prop="unit" label="单位" align="center" /> <el-table-column prop="warehouseName" label="仓库" align="center"/>
<el-table-column prop="warehouseName" label="仓库" align="center" /> <el-table-column prop="warehouseZoneName" label="区域" align="center"/>
<el-table-column prop="warehouseArea" label="库区" align="center" /> <el-table-column prop="warehouseArea" label="库区" align="center"/>
<el-table-column prop="warehouseRackCode" label="库位" align="center" /> <el-table-column prop="warehouseRackCode" label="库位" align="center"/>
<el-table-column prop="count" label="库存数量" align="center" /> <el-table-column prop="count" label="库存数量" align="center"/>
</el-table> </el-table>
</div> </div>
<div class="pages"> <div class="pages">
<div class="tit" /> <div class="tit"/>
<!-- 翻页 --> <!-- 翻页 -->
<Pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" <Pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
</div> </div>
</div> </div>
</div> </div>
@ -62,111 +60,112 @@
</template> </template>
<script> <script>
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import req from '@/api/storage/allocation.js' import req from '@/api/storage/allocation.js'
export default {
name: 'SelectVehicle', export default {
components: { name: 'SelectVehicle',
Pagination components: {
}, Pagination
data() { },
return { data() {
isSearchShow: false, return {
searchxianshitit: '隐藏查询条件', isSearchShow: false,
tableKey: 0, searchxianshitit: '隐藏查询条件',
sids: [], tableKey: 0,
list: [], sids: [],
number: '', list: [],
listLoading: false, number: '',
listQuery: { listLoading: false,
current: 1, listQuery: {
size: 10, current: 1,
params: { size: 10,
deptSid: '', params: {
goodsID: '', deptSid: '',
goodsSkuTitle: '', goodsID: '',
goodsSkuCode: '', goodsSkuTitle: '',
}, goodsSkuCode: ''
total: 0 },
} 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
}, },
methods: { //
// getList() {
clicksearchShow() { this.listLoading = true
this.isSearchShow = !this.isSearchShow req.getGoods(this.listQuery).then((response) => {
if (this.isSearchShow) { this.listLoading = false
this.searchxianshitit = '隐藏查询条件' if (response.success) {
} else { this.listQuery.total = response.data.total
this.searchxianshitit = '显示查询条件' this.list = response.data.records
} }
}, })
indexMethod(index) { },
var pagestart = (this.listQuery.current - 1) * this.listQuery.size //
var pageindex = index + 1 + pagestart handleFilter() {
return pageindex this.listQuery.current = 1
}, this.getList()
// },
getList() { //
this.listLoading = true handleReset() {
req.getGoods(this.listQuery).then((response) => { this.listQuery.current = 1
this.listLoading = false this.listQuery.size = 10
if (response.success) { this.listQuery.total = 0
this.listQuery.total = response.data.total this.listQuery.params.goodsID = ''
this.list = response.data.records this.listQuery.params.goodsSkuTitle = ''
} this.listQuery.params.goodsSkuCode = ''
this.getList()
},
handleSelectionChange(row) {
this.sids = row
},
showData(value, deptSid) {
// 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.params.deptSid = deptSid
this.getList()
},
//
AddUpdateReturn() {
if (this.sids.length > 0) {
this.$emit('backData', this.sids)
} else {
this.$notify({
title: '提示',
message: '请至少选择一条记录进行操作',
type: 'error',
duration: 2000
}) })
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
//
handleReset() {
this.listQuery.current = 1
this.listQuery.size = 10
this.listQuery.total = 0
this.listQuery.params.goodsID = ''
this.listQuery.params.goodsSkuTitle = ''
this.listQuery.params.goodsSkuCode = ''
this.getList()
},
handleSelectionChange(row) {
this.sids = row
},
showData(value, deptSid) {
// 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.params.deptSid = deptSid
this.getList()
},
//
AddUpdateReturn() {
if (this.sids.length > 0) {
this.$emit('backData', this.sids)
} else {
this.$notify({
title: '提示',
message: '请至少选择一条记录进行操作',
type: 'error',
duration: 2000
})
}
},
//
handleReturn() {
this.$emit('doback')
} }
},
//
handleReturn() {
this.$emit('doback')
} }
} }
}
</script> </script>
<style scoped> <style scoped>
</style> </style>

672
yxt-as-ui/src/views/workFlow/allocationFlow/allocationDaiBan.vue

@ -10,11 +10,8 @@
</div> </div>
</div> </div>
<div class=""> <div class="">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02"> <el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb"> <el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">申请人</div> <div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
@ -28,9 +25,7 @@
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">调出站</div> <div class="span-sty">调出站</div>
<el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item>
@ -47,39 +42,32 @@
<el-form-item><span class="addinputInfo">{{ formobj.confirmName }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.confirmName }}</span></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<div class="span-sty">备注</div> <div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div class="title ">调拨商品列表</div>
<el-table :data="formobj.wmsInventoryAllocateBillDetailNewList" :index="index" border style="width: 100%;" show-summary :summary-method="getSummaries">
<div class="title titleOne"> <el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
<div>调拨商品列表</div> <el-table-column prop="goodsID" label="商品ID" align="center"/>
</div> <el-table-column prop="goodsSpuName" label="商品名称" align="center"/>
<el-table-column prop="goodsSkuCode" label="商品编码" align="center"/>
<el-table :data="formobj.wmsInventoryAllocateBillDetailNewList" :index="index" border style="width: 100%;" <el-table-column prop="goodsSkuOwnSpec" label="型号" align="center"/>
show-summary :summary-method="getSummaries"> <el-table-column prop="unit" label="单位" align="center"/>
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" /> <el-table-column prop="warehouseName" label="仓库" width="150" align="center"/>
<el-table-column prop="goodsID" label="商品ID" align="center" /> <el-table-column prop="warehouseZoneName" label="区域" width="150" align="center"/>
<el-table-column prop="goodsSpuName" label="商品名称" align="center" /> <el-table-column prop="warehouseArea" label="库区" width="150" align="center"/>
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" /> <el-table-column prop="warehouseRackCode" label="库位" align="center"/>
<el-table-column prop="goodsSkuOwnSpec" label="型号" align="center" /> <el-table-column prop="stockCount" label="库存数量" align="center"/>
<el-table-column prop="unit" label="单位" align="center" /> <el-table-column prop="markUpRatio" label="加价比例" align="center"/>
<el-table-column prop="warehouseName" label="仓库" width="150" align="center" /> <el-table-column prop="requAmount" label="调拨单价" align="center"/>
<el-table-column prop="warehouseArea" label="仓库" width="150" align="center" /> <el-table-column prop="count" label="调拨数量" align="center"/>
<el-table-column prop="warehouseRackCode" label="库位" align="center" /> <el-table-column prop="amount" label="调拨金额" align="center" width="100"/>
<el-table-column prop="stockCount" label="库存数量" align="center" />
<el-table-column prop="markUpRatio" label="加价比例" align="center" />
<el-table-column prop="requAmount" label="调拨单价" align="center" />
<el-table-column prop="count" label="调拨数量" align="center" />
<el-table-column prop="amount" label="调拨金额" align="center" width="100" />
</el-table> </el-table>
</el-form> </el-form>
</div> </div>
<!-- 选择待办人 的弹出框--> <!-- 选择待办人 的弹出框-->
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%"> <el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%">
<el-form class="formadd"> <el-form class="formadd">
@ -109,8 +97,9 @@
<span>意见:</span> <span>意见:</span>
</el-col> </el-col>
<el-col :span="20"> <el-col :span="20">
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" <el-form-item>
type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable></el-input></el-form-item> <el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable></el-input>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div style="text-align:center;margin-top: 20px;"> <div style="text-align:center;margin-top: 20px;">
@ -119,354 +108,339 @@
</div> </div>
</el-form> </el-form>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import req from '@/api/storage/allocation.js' import req from '@/api/storage/allocation.js'
import { import { selectStaffListss } from '@/api/Common/dictcommons'
selectStaffListss
} from '@/api/Common/dictcommons' export default {
export default { data() {
data() { return {
return { index: 0,
index: 0, formobj: {},
formobj: {}, options: [],
options: [], operation: '', //
operation: '', // dialogList: {
dialogList: { comment: ''
comment: '' },
}, startTask: true,
startTask: true, current: {
current: { taskDefKey: '',
taskDefKey: '', taskName: '' //
taskName: '' // },
}, nextNode: {}, //
nextNode: {}, // nodeDialogVisible: false,
nodeDialogVisible: false, currentLink: true,
currentLink: true, countersignLink: false,
countersignLink: false, //
// linkByParameter: {
linkByParameter: { businessSid: '',
businessSid: '', comment: '',
comment: '', instanceId: '',
instanceId: '', taskId: '',
taskId: '', orgSidPath: '',
orgSidPath: '', taskDefKey: '',
taskDefKey: '', userSid: ''
userSid: '' },
}, //
// countersign: {
countersign: { taskId: '',
taskId: '', assignee: '',
assignee: '', userSid: '',
userSid: '', instanceId: '',
instanceId: '', views: ''
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: {
//
getSummaries(param) {
const {
columns,
data
} = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'count') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
} else if (column.property === 'amount') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
}
})
return sums
}, },
created() { showInfo(sid) {
console.log('url:' + window.location.href) this.$nextTick(() => {
var one = window.location.href.indexOf('&data') + 6 this.$refs['form_obj'].clearValidate()
const data = window.location.href.substr(one) // urlunescape()web,使 })
const obj = JSON.parse(decodeURIComponent(data)) req.init(sid).then((res) => {
console.log('iframe页面获取的obj:', obj) if (res.success) {
// this.formobj = res.data
this.linkByParameter.businessSid = obj.businessSid }
this.linkByParameter.instanceId = obj.instanceId })
this.linkByParameter.taskId = obj.taskId selectStaffListss().then((res) => {
this.linkByParameter.taskDefKey = obj.taskDefKey if (res.success) {
// this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath') this.options = res.data
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({ openCountersign(val) {
cmd: 'returnHeight', this.operation = val
params: { this.currentLink = true
// this.countersignLink = true
code: 2, this.dialogList.comment = ''
data: 400 + 'px' 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
})
}, },
methods: { //
// openAgree(val) {
getSummaries(param) { this.operation = val
const { this.currentLink = true
columns, this.countersignLink = false
data this.dialogList.comment = '同意'
} = param req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => {
const sums = [] if (resp.success) {
columns.forEach((column, index) => { var arr = resp.data
if (index === 0) { this.nextNode = arr[0]
sums[index] = '合计' this.nodeDialogVisible = true
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'count') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
} else if (column.property === 'amount') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
}
})
return sums
},
showInfo(sid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.init(sid).then((res) => {
if (res.success) {
this.formobj = res.data
}
})
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()
} }
}, this.submitdisabled = false
/** 加签 */ })
handleCountersign() { },
if (this.countersign.assignee === '') { //
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({ this.$message({
showClose: true, showClose: true,
type: 'error', type: 'error',
message: '请选择加签人员' message: '请填写审批意见'
}) })
return } else {
this.handleReject()
} }
} else if (this.operation === '终止') {
if (this.dialogList.comment === '') { if (this.dialogList.comment === '') {
this.$message({ this.$message({
showClose: true, showClose: true,
type: 'error', type: 'error',
message: '请填写审批意见' message: '请填写审批意见'
}) })
return } else {
this.handleStop()
} }
this.countersign.views = this.dialogList.comment } else if (this.operation === '加签') {
req.delegate(this.countersign).then((response) => { this.handleCountersign()
if (response.success) { }
this.$notify({ },
title: '提示', /** 加签 */
message: '执行成功', handleCountersign() {
type: 'success', if (this.countersign.assignee === '') {
duration: 2000 this.$message({
}) showClose: true,
this.nodeDialogVisible = false type: 'error',
// message: '请选择加签人员'
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
}
}, '*')
}
}) })
}, return
/** 终止任务 */ }
handleStop() { if (this.dialogList.comment === '') {
this.linkByParameter.comment = this.dialogList.comment this.$message({
req.breakProcess(this.linkByParameter).then((response) => { showClose: true,
if (response.success) { type: 'error',
this.$notify({ message: '请填写审批意见'
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
}) })
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> </script>
<style scoped> <style scoped>
.span-sty { .span-sty {
width: 130px !important; width: 130px !important;
} }
.addinputInfo { .addinputInfo {
margin-left: 120px !important; margin-left: 120px !important;
} }
.rowClass { .rowClass {
border-top: 1px solid #E0E3EB; border-top: 1px solid #E0E3EB;
} }
</style> </style>

849
yxt-as-ui/src/views/workFlow/allocationFlow/allocationEdit.vue

@ -9,11 +9,8 @@
</div> </div>
</div> </div>
<div class=""> <div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> <el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb"> <el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">申请人</div> <div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
@ -24,13 +21,10 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">申请日期</div> <div class="span-sty">申请日期</div>
<span class="addinputInfo">{{ formobj.createTime }}</span> <el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">调出站</div> <div class="span-sty">调出站</div>
<el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item>
@ -38,8 +32,7 @@
<el-col :span="8"> <el-col :span="8">
<div class="span-sty"><span class="must">*</span> 调入站点</div> <div class="span-sty"><span class="must">*</span> 调入站点</div>
<el-form-item prop="inPlatName"> <el-form-item prop="inPlatName">
<el-select v-model="formobj.inPlatName" placeholder="请选择调入站" @change="selectInDeptName" <el-select v-model="formobj.inPlatName" placeholder="请选择调入站" @change="selectInDeptName" class="addinputInfo addinputw">
class="addinputInfo addinputw">
<el-option v-for="(item,i) in deptList" :key="i" :label="item.name" :value="item.sid"> <el-option v-for="(item,i) in deptList" :key="i" :label="item.name" :value="item.sid">
</el-option> </el-option>
</el-select> </el-select>
@ -47,571 +40,395 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty"><span class="must">*</span> 经办人</div> <div class="span-sty"><span class="must">*</span> 经办人</div>
<el-form-item prop="confirmName"> <el-select v-model="formobj.confirmName" placeholder="请选择经办人" clearable <el-form-item prop="confirmName">
@change="selectOperatorName" class="addinputInfo addinputw"> <el-select v-model="formobj.confirmName" placeholder="请选择经办人" clearable @change="selectOperatorName" class="addinputInfo addinputw">
<el-option v-for="(item,i) in operatorNameList" :key="i" :label="item.name" :value="item.sid"> <el-option v-for="(item,i) in operatorNameList" :key="i" :label="item.name" :value="item.sid">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<div class="span-sty">备注</div> <div class="span-sty">备注</div>
<el-form-item> <el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" <el-form-item>
type="textarea" :rows="4" clearable /></el-form-item> <el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" type="textarea" :rows="4" clearable/>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div class="title titleOne"> <div class="title titleOne">
<div>调拨商品列表</div> <div>调拨商品列表</div>
<el-button type="primary" size="mini" class="btntopblueline" @click="seleGoods()">添加</el-button> <el-button type="primary" size="mini" class="btntopblueline" @click="seleGoods()">添加</el-button>
</div> </div>
<el-table :data="formobj.wmsInventoryAllocateBillDetailNewList" :index="index" border style="width: 100%;" show-summary :summary-method="getSummaries">
<el-table :data="formobj.wmsInventoryAllocateBillDetailNewList" :index="index" border style="width: 100%;" <el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" />
<el-table-column fixed label="操作" wid align="center" width="100"> <el-table-column fixed label="操作" wid align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" @click="deleteGoods(scope.$index)">删除</el-button> <el-button type="primary" size="mini" @click="deleteGoods(scope.$index)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="goodsID" label="商品ID" width="100" align="center" /> <el-table-column prop="goodsID" label="商品ID" width="100" align="center"/>
<el-table-column prop="goodsSpuName" label="商品名称" width="100" align="center" /> <el-table-column prop="goodsSpuName" label="商品名称" width="100" align="center"/>
<el-table-column prop="goodsSkuCode" label="商品编码" width="100" align="center" /> <el-table-column prop="goodsSkuCode" label="商品编码" width="100" align="center"/>
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" /> <el-table-column prop="goodsSkuOwnSpec" label="规格" align="center"/>
<el-table-column prop="unit" label="单位" align="center" /> <el-table-column prop="unit" label="单位" align="center"/>
<el-table-column prop="warehouseName" label="仓库" width="150" align="center" /> <el-table-column prop="warehouseName" label="仓库" width="150" align="center"/>
<el-table-column prop="warehouseArea" label="库区" width="150" align="center" /> <el-table-column prop="warehouseArea" label="库区" width="150" align="center"/>
<el-table-column prop="warehouseRackCode" label="库位" align="center" /> <el-table-column prop="warehouseRackCode" label="库位" align="center"/>
<el-table-column prop="stockCount" label="库存数量" width="100" align="center" /> <el-table-column prop="stockCount" label="库存数量" width="100" align="center"/>
<el-table-column prop="markUpRatio" label="加价比例(%)" width="120" align="center"> <el-table-column prop="markUpRatio" label="加价比例(%)" width="120" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.markUpRatio" clearable placeholder="" <el-input v-model="scope.row.markUpRatio" clearable placeholder="" oninput="value=value.replace(/^([0-9-]\d*\.?\d{0,2})?.*$/,'$1')" @input="commodityComputeYHAndXSJE(scope.row)"/>
oninput="value=value.replace(/^([0-9-]\d*\.?\d{0,2})?.*$/,'$1')"
@input="commodityComputeYHAndXSJE(scope.row)" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="requAmount" label="调拨单价" align="center" width="100" /> <el-table-column prop="requAmount" label="调拨单价" align="center" width="100"/>
<el-table-column prop="count" label="调拨数量" width="120" align="center"> <el-table-column prop="count" label="调拨数量" width="120" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input @input="commodityComputeYHAndXSJE2(scope.row)" v-model="scope.row.count" clearable <el-input @input="commodityComputeYHAndXSJE2(scope.row)" v-model="scope.row.count" clearable placeholder="" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')"/>
placeholder="" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="amount" label="调拨金额" align="center" width="100" /> <el-table-column prop="amount" label="调拨金额" align="center" width="100"/>
</el-table> </el-table>
</el-form> </el-form>
</div> </div>
</div> </div>
<!-- 选择商品 --> <!-- 选择商品 -->
<chooseproducts v-show="viewState == 2" ref="divSp" @backData="backData" @doback="resetState" /> <chooseproducts v-show="viewState == 2" ref="divSp" @backData="backData" @doback="resetState"/>
</div> </div>
</template> </template>
<script> <script>
import req from '@/api/storage/allocation.js' import req from '@/api/storage/allocation.js'
import chooseproducts from './relation/chooseproducts' import chooseproducts from './relation/chooseproducts'
import { import {
getCurrentDate fetchByDepSid,
} from '@/utils/index.js' selAllByOrgSidPath,
import { tranOne, // -
getOrgSidByPath, tranfour // -
fetchBySid, } from '@/api/Common/dictcommons'
fetchByDepSid,
selectOrgSidList, export default {
getServiceStationByOrgSid, components: {
selAllByOrgSidPath, chooseproducts
tranOne, // - },
tranfour, // - data() {
} from '@/api/Common/dictcommons' return {
export default { viewTitle: '',
components: { viewState: 1,
chooseproducts, submitdisabled: false,
}, activeNames: '1',
data() { index: 0,
return { formobj: {
viewTitle: '', sid: '',
viewState: 1, billNo: '',
submitdisabled: false, useOrgSid: '',
activeNames: '1', createBySid: '',
index: 0, createByName: '',
formobj: { deptName: '',
"sid": "", deptSid: '',
"billNo": "", createTime: '',
"useOrgSid": "", outOrgName: '',
"createBySid": '', outOrgSid: '',
"createByName": '', outPlatName: '',
"deptName": '', outPlatSid: '',
"deptSid": '', inOrgName: '',
"createTime": getCurrentDate(), inOrgSid: '',
"outOrgName": '', inPlatName: '',
"outOrgSid": '', inPlatSid: '',
"outPlatName": '', inOrgAttributeKey: '',
"outPlatSid": '', inOrgAttributeValue: '',
"inOrgName": '', confirmName: '',
"inOrgSid": '', confirmSid: '',
"inPlatName": "", remarks: '',
"inPlatSid": "", grade: '',
"inOrgAttributeKey": "", createOrgSid: '',
"inOrgAttributeValue": "", procDefId: '',
"confirmName": "", nodeId: '',
"confirmSid": "", procInstId: '',
"remarks": "", nodeState: '',
"grade": "1", taskId: '',
"createOrgSid": "", wmsInventoryAllocateBillDetailNewList: []
"procDefId": "", },
"nodeId": "", rules: {
"procInstId": "", inPlatName: [{ required: true, message: '调入站点不能为空', trigger: 'change' }],
"nodeState": "待提交", confirmName: [{ required: true, message: '经办人不能为空', trigger: 'change' }]
"taskId": "", },
"wmsInventoryAllocateBillDetailNewList": [] deptList: [],
}, operatorNameList: []
rules: { }
inOrgName: [{ },
required: true, created() {
message: '调入分公司不能为空', console.log('url:' + window.location.href)
trigger: 'change' var one = window.location.href.indexOf('&data') + 6
}], const data = window.location.href.substr(one) // urlunescape()web,使
inPlatName: [{ const obj = JSON.parse(decodeURIComponent(data))
required: true, this.showInfo(obj.businessSid)
message: '调入站点不能为空', },
trigger: 'change' mounted() {
}], window.parent.postMessage({
confirmName: [{ cmd: 'returnHeight',
required: true, params: {
message: '经办人不能为空', //
trigger: 'change' code: 2,
}], data: 500 + 'px'
},
orgList: [],
deptList: [],
operatorNameList: [],
warehouseList: [],
warehouseRackList: []
} }
}, '*')
},
methods: {
//
getSummaries(param) {
const {
columns,
data
} = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'count') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
} else if (column.property === 'amount') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
}
})
return sums
}, },
created() { selectInDeptName(val) {
console.log('url:' + window.location.href) const choose = this.deptList.filter((item) => item.sid === val)
var one = window.location.href.indexOf('&data') + 6 this.formobj.inPlatSid = choose[0].sid
const data = window.location.href.substr(one) // urlunescape()web,使 this.formobj.inPlatName = choose[0].name
const obj = JSON.parse(decodeURIComponent(data)) this.formobj.inOrgAttributeKey = choose[0].orgAttributeKey
this.showInfo(obj.businessSid) this.formobj.inOrgAttributeValue = choose[0].orgAttributeValue
}, },
mounted() { selectOperatorName(val) {
window.parent.postMessage({ const choose = this.operatorNameList.filter((item) => item.sid === val)
cmd: 'returnHeight', this.formobj.confirmSid = choose[0].sid
params: { this.formobj.confirmName = choose[0].name
//
code: 2,
data: 500 + 'px'
}
}, '*')
}, },
methods: { showInfo(sid) {
// this.viewTitle = '【编辑】商品调拨申请'
getSummaries(param) { this.$nextTick(() => {
const { this.$refs['form_obj'].clearValidate()
columns, })
data req.init(sid).then((res) => {
} = param if (res.success) {
const sums = [] this.formobj = res.data
columns.forEach((column, index) => { this.formobj.instanceId = res.data.procInstId
if (index === 0) { fetchByDepSid({
sums[index] = '合计' sid: this.formobj.deptSid
return }).then((respsone) => {
} if (respsone.success) {
const values = data.map(item => Number(item[column.property])) //
if (column.property === 'count') { if (respsone.data.orgAttributeKey === 'fwz_001') {
sums[index] = values.reduce((prev, curr) => { // -
const value = Number(curr) tranOne(this.formobj.deptSid).then((resp) => {
if (!isNaN(value)) { if (resp.success) {
return prev + curr this.deptList = resp.data
} else { }
return prev })
} } else { //
}, 0) // -
sums[index] += '' tranfour(this.formobj.deptSid).then((resp) => {
} else if (column.property === 'amount') { if (resp.success) {
sums[index] = values.reduce((prev, curr) => { this.deptList = resp.data
const value = Number(curr) }
if (!isNaN(value)) { })
return prev + curr
} else {
return prev
} }
}, 0) }
sums[index] += '' })
} selAllByOrgSidPath({ orgSidPath: this.formobj.orgPath }).then((res) => {
}) if (res.success) {
return sums this.operatorNameList = res.data
}, }
})
selectInOrg(val) {
console.log("selectInOrg", val);
const choose = this.orgList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectInOrg', choose)
this.formobj.inOrgSid = choose[0].sid
this.formobj.inOrgName = choose[0].name
getServiceStationByOrgSid(choose[0].sid).then((res) => {
if (res.success) {
this.formobj.inDeptSid = ''
this.formobj.inDeptName = ''
this.formobj.inOrgAttributeKey = ''
this.formobj.inOrgAttributeValue = ''
console.log("getListDeptByOrgSid", res);
this.deptList = res.data
}
})
},
selectInDeptName(val) {
console.log("selectInDeptName", val);
const choose = this.deptList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectInDeptName', choose)
this.formobj.inPlatSid = choose[0].sid
this.formobj.inPlatName = choose[0].name
this.formobj.inOrgAttributeKey = choose[0].orgAttributeKey
this.formobj.inOrgAttributeValue = choose[0].orgAttributeValue
},
selectOperatorName(val) {
console.log("selectOperatorName", val);
const choose = this.operatorNameList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectOutOrg', choose)
this.formobj.confirmSid = choose[0].sid
this.formobj.confirmName = choose[0].name
},
getWarehouseAreaList(sid) {
var query = {
ckSid: sid
} }
req.getWarehouseareas(query).then((res) => { })
if (res.success) { },
this.warehouseRackList = res.data backData(value) {
this.viewState = 1
console.log("aaaaaa", this.warehouseRackList); if (value.length > 0) {
value.forEach((e) => {
} this.formobj.wmsInventoryAllocateBillDetailNewList.push({
}) goodsSpuSid: e.goodsSpuSid,
}, goodsSpuName: e.goodsSpuName,
selectWarehouseName(row, val) { goodsSkuCode: e.goodsSkuCode,
console.log("selectWarehouseName", row); goodsSkuOwnSpec: e.goodsSkuOwnSpec,
console.log("selectWarehouseName", val); goodsSkuSid: e.goodsSkuSid,
goodsSkuTitle: e.goodsSkuTitle,
const choose = this.warehouseList.filter((item) => item.sid == val) billSid: this.formobj.sid,
console.log('>>>>>>>>>selectInOrg', choose) inventorySid: e.inventorySid,
row.inWarehouseSid = choose[0].sid warehouseSid: e.warehouseSid,
row.inWarehouseName = choose[0].warehouseName warehouseName: e.warehouseName,
row.inWarehouseRackSid = '' warehouseZoneSid: e.warehouseZoneSid,
row.inWarehouseRackCode = '' warehouseZoneName: e.warehouseZoneName,
warehouseAreaSid: e.warehouseAreaSid,
warehouseArea: e.warehouseArea,
this.getWarehouseAreaList(val) warehouseRackSid: e.warehouseRackSid,
}, warehouseRackCode: e.warehouseRackCode,
selectWarehouseAreaCode(row, val) { taxPrice: e.taxPrice,
console.log("selectWarehouseAreaCode", row); stockCount: e.count,
console.log("selectWarehouseAreaCode", val); inWarehouseSid: '',
inWarehouseName: '',
const choose = this.warehouseRackList.filter((item) => item.sid == val) inWarehouseRackSid: '',
console.log('>>>>>>>>>selectInOrg', choose) inWarehouseRackCode: '',
row.inWarehouseRackSid = choose[0].sid count: 0,
row.inWarehouseRackCode = choose[0].areaCode amount: 0,
requAmount: e.taxPrice,
}, markUpRatio: 0,
showAdd() { unit: e.unit,
goodsID: e.goodsID,
this.viewTitle = '【新增】商品调拨申请' manufacturerSid: e.manufacturerSid,
this.$nextTick(() => { manufacturerName: e.manufacturerName
this.$refs['form_obj'].clearValidate() })
})
},
showInfo(sid) {
this.viewTitle = '【修改】商品调拨申请'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
}) })
req.init(sid).then((res) => { }
if (res.success) { },
this.formobj = res.data deleteGoods(index) {
this.formobj.instanceId = res.data.procInstId this.formobj.wmsInventoryAllocateBillDetailNewList.splice(index, 1)
},
fetchByDepSid({ resetState() {
sid: this.formobj.deptSid this.viewState = 1
}).then((respsone) => { },
if (respsone.success) { seleGoods() {
console.log("fetchByDepSid", respsone.data); this.viewState = 2
const aa = []
// this.$refs['divSp'].showData(aa, this.formobj.deptSid)
if (respsone.data.orgAttributeKey == 'fwz_001') { },
// - //
tranOne(this.formobj.deptSid).then((resp) => { commodityComputeYHAndXSJE(row) {
if (resp.success) { row.requAmount = (Number(row.taxPrice) * Number(1 + Number(row.markUpRatio) / 100)).toFixed(2)
console.log("tranOne", resp); row.amount = (Number(row.count) * Number(row.requAmount)).toFixed(2)
this.deptList = resp.data },
} //
}) commodityComputeYHAndXSJE2(row) {
} else { // if (Number(row.stockCount) < Number(row.count)) {
// - row.count = Number(row.stockCount)
tranfour(this.formobj.deptSid).then((resp) => { } else {
if (resp.success) { row.amount = (Number(row.count) * Number(row.requAmount)).toFixed(2)
console.log("tranfour", resp); }
this.deptList = resp.data },
} 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
}
selectOrgSidList().then((res) => { }).catch(() => {
if (res.success) { this.submitdisabled = false
console.log("selectOrgSidList", res);
this.orgList = res.data
}
})
selAllByOrgSidPath({
orgSidPath: this.formobj.orgPath
}).then((res) => {
if (res.success) {
console.log("selAllByOrgSidPath", res);
this.operatorNameList = res.data
}
})
}
})
},
backData(value) {
this.viewState = 1
if (value.length > 0) {
value.forEach((e) => {
this.formobj.wmsInventoryAllocateBillDetailNewList.push({
"goodsSpuSid": e.goodsSpuSid,
"goodsSpuName": e.goodsSpuName,
"goodsSkuCode": e.goodsSkuCode,
"goodsSkuOwnSpec": e.goodsSkuOwnSpec,
"goodsSkuSid": e.goodsSkuSid,
"goodsSkuTitle": e.goodsSkuTitle,
"billSid": this.formobj.sid,
"inventorySid": e.inventorySid,
"warehouseSid": e.warehouseSid,
"warehouseName": e.warehouseName,
"warehouseAreaSid": e.warehouseAreaSid,
"warehouseArea": e.warehouseArea,
"warehouseRackSid": e.warehouseRackSid,
"warehouseRackCode": e.warehouseRackCode,
"taxPrice": e.taxPrice,
"stockCount": e.count,
"inWarehouseSid": '',
"inWarehouseName": '',
"inWarehouseRackSid": '',
"inWarehouseRackCode": '',
"count": 0,
"amount": 0,
"requAmount": e.taxPrice,
"markUpRatio": 0,
"unit": e.unit,
"goodsID": e.goodsID,
"manufacturerSid": e.manufacturerSid,
"manufacturerName": e.manufacturerName,
})
}) })
} }
}, })
deleteGoods(index) { },
this.formobj.wmsInventoryAllocateBillDetailNewList.splice(index, 1) submit() {
}, this.$refs['form_obj'].validate((valid) => {
resetState() { if (valid) {
this.viewState = 1
}, if (this.formobj.wmsInventoryAllocateBillDetailNewList.length === 0) {
seleGoods() { this.$message({
this.viewState = 2 type: 'warning',
const aa = [] showClose: true,
this.$refs['divSp'].showData(aa, this.formobj.deptSid) message: '调拨商品不能为空'
},
//
commodityComputeYHAndXSJE(row) {
console.log("commodityComputeYHAndXSJE", row);
row.requAmount = (Number(row.taxPrice) * Number(1 + Number(row.markUpRatio) / 100)).toFixed(2)
row.amount = (Number(row.count) * Number(row.requAmount)).toFixed(2)
},
//
commodityComputeYHAndXSJE2(row) {
if (Number(row.stockCount) < Number(row.count)) {
row.count = Number(row.stockCount)
} else {
row.amount = (Number(row.count) * Number(row.requAmount)).toFixed(2)
}
},
saveOrUpdate() {
console.log("saveOrUpdate", this.formobj);
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
}) })
return
} }
}) for (var i = 0; i < this.formobj.wmsInventoryAllocateBillDetailNewList.length; i++) {
}, var item = this.formobj.wmsInventoryAllocateBillDetailNewList[i]
submit() { if (Number(item.count) === 0) {
console.log("saveOrUpdate", this.formobj);
this.$refs['form_obj'].validate((valid) => {
if (valid) {
if (this.formobj.wmsInventoryAllocateBillDetailNewList.length == 0) {
this.$message({ this.$message({
type: "warning", type: 'warning',
showClose: true, showClose: true,
message: '调拨商品不能为空' message: '调拨数量不能为空或0'
}) })
return return
} }
for (var i = 0; i < this.formobj.wmsInventoryAllocateBillDetailNewList.length; i++) {
var item = this.formobj.wmsInventoryAllocateBillDetailNewList[i]
if (Number(item.count) == 0) {
this.$message({
type: "warning",
showClose: true,
message: '调拨数量不能为空或0'
})
return
}
}
this.submitdisabled = true
req.allocation(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
})
} }
}) this.submitdisabled = true
}, req.allocation(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> </script>
<style scoped> <style scoped>
.formaddcopy02 .el-row .el-col /deep/ .el-form-item__error { .must {
margin-left: 120px !important; color: #f00;
} }
.span-sty {
.must { width: 130px !important;
color: #f00; }
} .addinputInfo {
margin-left: 120px !important;
.span-sty { }
width: 130px !important; .formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
} margin-left: 120px !important;
width: calc(100% - 115px);
.span-sty2 { }
position: absolute; .formaddcopy02 .el-row .el-col /deep/ .el-form-item__error {
top: 0; margin-left: 120px !important;
bottom: 0; }
left: 0; .titleOne {
line-height: 42px; padding: 7px;
text-align: right; display: flex;
font-size: 14px; flex-direction: row;
color: #606266; justify-content: space-between;
font-weight: 600; align-items: center;
width: 70px; }
padding-right: 5px;
border-right: 1px solid #e0e3eb;
width: 110px !important;
}
.addinputInfo2 {
margin-left: 110px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw2 {
margin-left: 110px !important;
width: calc(100% - 105px);
}
.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;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .el-radio-group {
display: inline;
line-height: 1px;
vertical-align: middle;
}
</style> </style>

304
yxt-as-ui/src/views/workFlow/allocationFlow/allocationYiBan.vue

@ -7,11 +7,8 @@
</div> </div>
</div> </div>
<div class=""> <div class="">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02"> <el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb"> <el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">申请人</div> <div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
@ -25,9 +22,7 @@
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">调出站</div> <div class="span-sty">调出站</div>
<el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item>
@ -44,35 +39,29 @@
<el-form-item><span class="addinputInfo">{{ formobj.confirmName }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.confirmName }}</span></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<div class="span-sty">备注</div> <div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div class="title">调拨商品列表</div>
<el-table :data="formobj.wmsInventoryAllocateBillDetailNewList" :index="index" border style="width: 100%;" show-summary :summary-method="getSummaries">
<div class="title titleOne"> <el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
<div>调拨商品列表</div> <el-table-column prop="goodsID" label="商品ID" align="center"/>
</div> <el-table-column prop="goodsSpuName" label="商品名称" align="center"/>
<el-table-column prop="goodsSkuCode" label="商品编码" align="center"/>
<el-table :data="formobj.wmsInventoryAllocateBillDetailNewList" :index="index" border style="width: 100%;" <el-table-column prop="goodsSkuOwnSpec" label="型号" align="center"/>
show-summary :summary-method="getSummaries"> <el-table-column prop="unit" label="单位" align="center"/>
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" /> <el-table-column prop="warehouseName" label="仓库" width="150" align="center"/>
<el-table-column prop="goodsID" label="商品ID" align="center" /> <el-table-column prop="warehouseZoneName" label="区域" width="150" align="center"/>
<el-table-column prop="goodsSpuName" label="商品名称" align="center" /> <el-table-column prop="warehouseArea" label="库区" width="150" align="center"/>
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" /> <el-table-column prop="warehouseRackCode" label="库位" align="center"/>
<el-table-column prop="goodsSkuOwnSpec" label="型号" align="center" /> <el-table-column prop="stockCount" label="库存数量" align="center"/>
<el-table-column prop="unit" label="单位" align="center" /> <el-table-column prop="markUpRatio" label="加价比例" align="center"/>
<el-table-column prop="warehouseName" label="仓库" width="150" align="center" /> <el-table-column prop="requAmount" label="调拨单价" align="center"/>
<el-table-column prop="warehouseArea" label="仓库" width="150" align="center" /> <el-table-column prop="count" label="调拨数量" align="center"/>
<el-table-column prop="warehouseRackCode" label="库位" align="center" /> <el-table-column prop="amount" label="调拨金额" align="center" width="100"/>
<el-table-column prop="stockCount" label="库存数量" align="center" />
<el-table-column prop="markUpRatio" label="加价比例" align="center" />
<el-table-column prop="requAmount" label="调拨单价" align="center" />
<el-table-column prop="count" label="调拨数量" align="center" />
<el-table-column prop="amount" label="调拨金额" align="center" width="100" />
</el-table> </el-table>
</el-form> </el-form>
</div> </div>
@ -80,146 +69,145 @@
</template> </template>
<script> <script>
import req from '@/api/storage/allocation.js' import req from '@/api/storage/allocation.js'
export default {
data() {
return {
index: 0,
formobj: {},
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
},
}
},
created() { export default {
console.log('url:' + window.location.href) data() {
var one = window.location.href.indexOf('&data') + 6 return {
const data = window.location.href.substr(one) // urlunescape()web,使 index: 0,
const obj = JSON.parse(decodeURIComponent(data)) formobj: {},
console.log('iframe页面获取的obj:', obj) //
// linkByParameter: {
this.linkByParameter.businessSid = obj.businessSid businessSid: '',
this.linkByParameter.instanceId = obj.instanceId comment: '',
this.linkByParameter.taskId = obj.taskId instanceId: '',
this.linkByParameter.taskDefKey = obj.taskDefKey taskId: '',
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid') orgSidPath: '',
// taskDefKey: '',
this.showInfo(obj.businessSid) 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: 500 + 'px'
}
}, '*')
},
methods: {
//
getSummaries(param) {
const {
columns,
data
} = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'count') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
} else if (column.property === 'amount') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
}
})
return sums
}, },
mounted() { showInfo(sid) {
window.parent.postMessage({ this.$nextTick(() => {
cmd: 'returnHeight', this.$refs['form_obj'].clearValidate()
params: { })
// req.init(sid).then((res) => {
code: 2, if (res.success) {
data: 500 + 'px' this.formobj = res.data
} }
}, '*') })
}, },
methods: { /** 确认撤回任务 */
// openRevoke() {
getSummaries(param) { this.$confirm('是否确认执行撤回操作', '提示', {
const { confirmButtonText: '确定',
columns, cancelButtonText: '取消',
data type: 'warning'
} = param }).then(() => {
const sums = [] this.handleRevoke()
columns.forEach((column, index) => { }).catch(() => {
if (index === 0) { this.$message({
sums[index] = '合计' type: 'info',
return message: '已取消撤回'
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'count') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
} else if (column.property === 'amount') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
}
}) })
return sums })
}, },
/** 撤回任务 */
showInfo(sid) { handleRevoke() {
this.$nextTick(() => { req.revokeProcess(this.linkByParameter).then((response) => {
this.$refs['form_obj'].clearValidate() if (response.success) {
}) this.$notify({
req.init(sid).then((res) => { title: '提示',
if (res.success) { message: '执行成功',
this.formobj = res.data type: 'success',
} duration: 2000
})
},
/** 确认撤回任务 */
openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleRevoke()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤回'
}) })
}) this.nodeDialogVisible = false
}, //
/** 撤回任务 */ window.parent.postMessage({
handleRevoke() { cmd: 'returnHeight',
req.revokeProcess(this.linkByParameter).then((response) => { params: {
if (response.success) { //
this.$notify({ code: 1
title: '提示', }
message: '执行成功', }, '*')
type: 'success', }
duration: 2000 })
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
} }
} }
}
</script> </script>
<style scoped> <style scoped>
.span-sty { .span-sty {
width: 130px !important; width: 130px !important;
} }
.addinputInfo { .addinputInfo {
margin-left: 120px !important; margin-left: 120px !important;
} }
</style> </style>

236
yxt-as-ui/src/views/workFlow/allocationFlow/relation/chooseproducts.vue

@ -14,15 +14,14 @@
<div v-show="isSearchShow" class="search"> <div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="120px" class="tab-header"> <el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="120px" class="tab-header">
<el-form-item label="商品ID" class="searchlist"> <el-form-item label="商品ID" class="searchlist">
<el-input v-model="listQuery.params.goodsID" placeholder="" clearable /> <el-input v-model="listQuery.params.goodsID" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="商品编码" class="searchlist"> <el-form-item label="商品编码" class="searchlist">
<el-input v-model="listQuery.params.goodsSkuCode" placeholder="" clearable /> <el-input v-model="listQuery.params.goodsSkuCode" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="商品名称" class="searchlist"> <el-form-item label="商品名称" class="searchlist">
<el-input v-model="listQuery.params.goodsSkuTitle" placeholder="" clearable /> <el-input v-model="listQuery.params.goodsSkuTitle" placeholder="" clearable/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="btn" style="text-align: center;"> <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-search" @click="handleFilter" size="small">查询</el-button>
@ -32,29 +31,27 @@
</div> </div>
<div class="listtop"> <div class="listtop">
<div class="tit">商品列表</div> <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>
<div class=""> <div class="">
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%" <el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%" @selection-change="handleSelectionChange">
@selection-change="handleSelectionChange"> <el-table-column width="50px" type="selection" align="center"/>
<el-table-column width="50px" type="selection" align="center" /> <el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center" /> <el-table-column prop="goodsID" label="商品ID" align="center"/>
<el-table-column prop="goodsID" label="商品ID" align="center" /> <el-table-column prop="goodsSkuTitle" label="商品名称" align="center"/>
<el-table-column prop="goodsSkuTitle" label="商品名称" align="center" /> <el-table-column prop="goodsSkuCode" label="商品编码" align="center"/>
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" /> <el-table-column prop="goodsSkuOwnSpec" label="规格" align="center"/>
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" /> <el-table-column prop="unit" label="单位" align="center"/>
<el-table-column prop="unit" label="单位" align="center" /> <el-table-column prop="warehouseName" label="仓库" align="center"/>
<el-table-column prop="warehouseName" label="仓库" align="center" /> <el-table-column prop="warehouseZoneName" label="区域" align="center"/>
<el-table-column prop="warehouseArea" label="库区" align="center" /> <el-table-column prop="warehouseArea" label="库区" align="center"/>
<el-table-column prop="warehouseRackCode" label="库位" align="center" /> <el-table-column prop="warehouseRackCode" label="库位" align="center"/>
<el-table-column prop="count" label="库存数量" align="center" /> <el-table-column prop="count" label="库存数量" align="center"/>
</el-table> </el-table>
</div> </div>
<div class="pages"> <div class="pages">
<div class="tit" /> <div class="tit"/>
<!-- 翻页 --> <!-- 翻页 -->
<Pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" <Pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
</div> </div>
</div> </div>
</div> </div>
@ -62,111 +59,112 @@
</template> </template>
<script> <script>
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import req from '@/api/storage/allocation.js' import req from '@/api/storage/allocation.js'
export default {
name: 'SelectVehicle', export default {
components: { name: 'SelectVehicle',
Pagination components: {
}, Pagination
data() { },
return { data() {
isSearchShow: false, return {
searchxianshitit: '隐藏查询条件', isSearchShow: false,
tableKey: 0, searchxianshitit: '隐藏查询条件',
sids: [], tableKey: 0,
list: [], sids: [],
number: '', list: [],
listLoading: false, number: '',
listQuery: { listLoading: false,
current: 1, listQuery: {
size: 10, current: 1,
params: { size: 10,
deptSid: '', params: {
goodsID: '', deptSid: '',
goodsSkuTitle: '', goodsID: '',
goodsSkuCode: '', goodsSkuTitle: '',
}, goodsSkuCode: ''
total: 0 },
} 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
}, },
methods: { //
// getList() {
clicksearchShow() { this.listLoading = true
this.isSearchShow = !this.isSearchShow req.getGoods(this.listQuery).then((response) => {
if (this.isSearchShow) { this.listLoading = false
this.searchxianshitit = '隐藏查询条件' if (response.success) {
} else { this.listQuery.total = response.data.total
this.searchxianshitit = '显示查询条件' this.list = response.data.records
} }
}, })
indexMethod(index) { },
var pagestart = (this.listQuery.current - 1) * this.listQuery.size //
var pageindex = index + 1 + pagestart handleFilter() {
return pageindex this.listQuery.current = 1
}, this.getList()
// },
getList() { //
this.listLoading = true handleReset() {
req.getGoods(this.listQuery).then((response) => { this.listQuery.current = 1
this.listLoading = false this.listQuery.size = 10
if (response.success) { this.listQuery.total = 0
this.listQuery.total = response.data.total this.listQuery.params.goodsID = ''
this.list = response.data.records this.listQuery.params.goodsSkuTitle = ''
} this.listQuery.params.goodsSkuCode = ''
this.getList()
},
handleSelectionChange(row) {
this.sids = row
},
showData(value, deptSid) {
// 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.params.deptSid = deptSid
this.getList()
},
//
AddUpdateReturn() {
if (this.sids.length > 0) {
this.$emit('backData', this.sids)
} else {
this.$notify({
title: '提示',
message: '请至少选择一条记录进行操作',
type: 'error',
duration: 2000
}) })
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
//
handleReset() {
this.listQuery.current = 1
this.listQuery.size = 10
this.listQuery.total = 0
this.listQuery.params.goodsID = ''
this.listQuery.params.goodsSkuTitle = ''
this.listQuery.params.goodsSkuCode = ''
this.getList()
},
handleSelectionChange(row) {
this.sids = row
},
showData(value, deptSid) {
// 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.params.deptSid = deptSid
this.getList()
},
//
AddUpdateReturn() {
if (this.sids.length > 0) {
this.$emit('backData', this.sids)
} else {
this.$notify({
title: '提示',
message: '请至少选择一条记录进行操作',
type: 'error',
duration: 2000
})
}
},
//
handleReturn() {
this.$emit('doback')
} }
},
//
handleReturn() {
this.$emit('doback')
} }
} }
}
</script> </script>
<style scoped> <style scoped>
</style> </style>

Loading…
Cancel
Save