Browse Source

Merge remote-tracking branch 'origin/master'

master
ligaode 1 week ago
parent
commit
0e3d12d642
  1. 7
      anrui-buscenter/anrui-buscenter-ui/src/api/salesManagement/salesorderbycar.js
  2. 8
      anrui-buscenter/anrui-buscenter-ui/src/api/valuablecustomer/valuablecustomer.js
  3. 34
      anrui-buscenter/anrui-buscenter-ui/src/views/valuablecustomer/valuablecustomer.vue
  4. 29
      anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdantuiche/salesorderbycar.vue
  5. 2
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationMapper.xml
  6. 7
      anrui-riskcenter-ui/src/api/loanbalancerecognition/loanbalancerecognition.js
  7. 27
      anrui-riskcenter-ui/src/views/loanbalancerecognition/loanbalancerecognition.vue
  8. 12
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/as/arrearsoutapply/AppArrearsoutApplyService.java
  9. 2
      yxt-as-ui/src/views/operation/workorderinvoicing/relation/chooseRepairbill.vue
  10. 2
      yxt-as-ui/src/views/operation/workorderinvoicing/workorderinvoicingAdd.vue
  11. 13
      yxt-as-ui/src/views/operation/workorderreceivable/workorderreceivableAdd.vue
  12. 989
      yxt-as-ui/src/views/storage/allocation/allocationAdd.vue
  13. 282
      yxt-as-ui/src/views/storage/allocation/allocationInfo.vue
  14. 814
      yxt-as-ui/src/views/storage/allocation/index.vue
  15. 235
      yxt-as-ui/src/views/storage/allocation/relation/chooseproducts.vue
  16. 66
      yxt-as-ui/src/views/storage/allocationByBranches/allocationByBranchesAdd.vue
  17. 222
      yxt-as-ui/src/views/storage/allocationByBranches/allocationByBranchesInfo.vue
  18. 234
      yxt-as-ui/src/views/storage/allocationByBranches/relation/chooseproducts.vue
  19. 66
      yxt-as-ui/src/views/storage/allocationByGroup/allocationByGroupAdd.vue
  20. 223
      yxt-as-ui/src/views/storage/allocationByGroup/allocationByGroupInfo.vue
  21. 234
      yxt-as-ui/src/views/storage/allocationByGroup/relation/chooseproducts.vue
  22. 685
      yxt-as-ui/src/views/workFlow/allocationByBranchesFlow/allocationByBranchesDaiBan.vue
  23. 66
      yxt-as-ui/src/views/workFlow/allocationByBranchesFlow/allocationByBranchesEdit.vue
  24. 305
      yxt-as-ui/src/views/workFlow/allocationByBranchesFlow/allocationByBranchesYiBan.vue
  25. 234
      yxt-as-ui/src/views/workFlow/allocationByBranchesFlow/relation/chooseproducts.vue
  26. 687
      yxt-as-ui/src/views/workFlow/allocationByGroupFlow/allocationByGroupDaiBan.vue
  27. 66
      yxt-as-ui/src/views/workFlow/allocationByGroupFlow/allocationByGroupEdit.vue
  28. 308
      yxt-as-ui/src/views/workFlow/allocationByGroupFlow/allocationByGroupYiBan.vue
  29. 234
      yxt-as-ui/src/views/workFlow/allocationByGroupFlow/relation/chooseproducts.vue
  30. 672
      yxt-as-ui/src/views/workFlow/allocationFlow/allocationDaiBan.vue
  31. 849
      yxt-as-ui/src/views/workFlow/allocationFlow/allocationEdit.vue
  32. 304
      yxt-as-ui/src/views/workFlow/allocationFlow/allocationYiBan.vue
  33. 236
      yxt-as-ui/src/views/workFlow/allocationFlow/relation/chooseproducts.vue
  34. 2
      yxt-as-ui/src/views/workFlow/gongdankaipiaoFlow/relation/chooseRepairbill.vue
  35. 2
      yxt-as-ui/src/views/workFlow/gongdankaipiaoFlow/workorderinvoicingEdit.vue
  36. 15
      yxt-as-ui/src/views/workFlow/gongdanyingshouFlow/workorderreceivableEdit.vue
  37. 2
      yxt-as/src/main/java/com/yxt/anrui/as/biz/asarrearsoutapply/AsArrearsoutApplyMapper.java
  38. 4
      yxt-as/src/main/java/com/yxt/anrui/as/biz/asarrearsoutapply/AsArrearsoutApplyMapper.xml
  39. 18
      yxt-as/src/main/java/com/yxt/anrui/as/biz/asarrearsoutapply/AsArrearsoutApplyService.java
  40. 1
      yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairbill/AsBusrepairBillService.java

7
anrui-buscenter/anrui-buscenter-ui/src/api/salesManagement/salesorderbycar.js

@ -19,6 +19,13 @@ export default {
headers: { 'Content-Type': 'application/json' }
})
},
createPdf: function(data) {
return request({
url: '/buscenter/v1/bussalesorderreturnvehapply/createPdf',
method: 'post',
params: data
})
},
// 保存修改记录
saveOrUpdate: function(params) {
return request({

8
anrui-buscenter/anrui-buscenter-ui/src/api/valuablecustomer/valuablecustomer.js

@ -24,6 +24,14 @@ export function save(data) {
})
}
export function createPdf(data) {
return request({
url: '/buscenter/v1/busvalcustfiling/createPdf',
method: 'post',
params: data
})
}
// 根据Sid获取一条记录
export function fetchDetailsBySid(data) {
return request({

34
anrui-buscenter/anrui-buscenter-ui/src/views/valuablecustomer/valuablecustomer.vue

@ -38,9 +38,9 @@
<el-table-column fixed width="80px" label="编号" type="index" :index="indexMethod" align="center"/>
<el-table-column fixed label="操作" align="center" width="180">
<template slot-scope="scope">
<el-button type="primary" size="small" :disabled="scope.row.nodeState == '发起申请' ? false : scope.row.nodeState == '待提交' ? false : true" @click="toEdit(scope.row)">办理
</el-button>
<el-button type="primary" size="small" @click="toInfo(scope.row)">查看</el-button>
<el-button type="primary" size="mini" :disabled="scope.row.nodeState == '发起申请' ? false : scope.row.nodeState == '待提交' ? false : true" @click="toEdit(scope.row)">办理</el-button>
<el-button type="primary" size="mini" v-if="scope.row.nodeState =='已办结'" @click="toDownload(scope.row)">下载</el-button>
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button>
</template>
</el-table-column>
<el-table-column label="状态" width="150" header-align="center">
@ -85,7 +85,7 @@
</template>
<script>
import { listPage } from '@/api/valuablecustomer/valuablecustomer'
import { listPage, createPdf } from '@/api/valuablecustomer/valuablecustomer'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
@ -254,6 +254,32 @@ export default {
this.viewState = 2
this.$refs['divAdd'].showEdit(row)
},
toDownload(row) {
createPdf({ sid: row.sid, userName: window.sessionStorage.getItem('name') }).then((res) => {
if (res.success) {
var xhr = new XMLHttpRequest()
xhr.open('GET', process.env.VUE_APP_BASE_API + '/base/file/download?filePath=' + res.data + '&outFileName=' + '价值客户备案申请单', true)
xhr.setRequestHeader('token', getStorage())
xhr.responseType = 'blob'
xhr.onload = function(e) {
//
var blob = this.response
var filename = '价值客户备案申请单.pdf'
var a = document.createElement('a')
// blob.type="application/octet-stream";
// url
var url = URL.createObjectURL(blob)
a.href = url
a.download = filename
a.click()
// URL
window.URL.revokeObjectURL(url)
}
//
xhr.send()
}
}).catch(() => {})
},
toInfo(row) {
this.viewState = 4
this.$refs['divInfo'].showInfo(row)

29
anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdantuiche/salesorderbycar.vue

@ -37,6 +37,7 @@
<el-table-column label="操作" width="180" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="toEdit(scope.row)" :disabled="scope.row.nodeState =='发起申请' ? false : scope.row.nodeState == '待提交' ? false : true">办理</el-button>
<el-button type="primary" size="mini" v-if="scope.row.nodeState =='已办结'" @click="toDownload(scope.row)">下载</el-button>
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button>
</template>
</el-table-column>
@ -204,7 +205,7 @@ export default {
procInsId: row.procInsId,
token: getStorage()
}
this.url = '/#/flow/flowRecordForBusiness?data=' + encodeURI((JSON.stringify(params)))
this.url = 'http://192.168.0.107:9530/#/flow/flowRecordForBusiness?data=' + encodeURI((JSON.stringify(params)))
},
init() {
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => {
@ -320,6 +321,32 @@ export default {
}).catch(() => {
})
},
toDownload(row) {
req.createPdf({ sid: row.sid, userName: window.sessionStorage.getItem('name') }).then((res) => {
if (res.success) {
var xhr = new XMLHttpRequest()
xhr.open('GET', process.env.VUE_APP_BASE_API + '/base/file/download?filePath=' + res.data + '&outFileName=' + '销售订单退车申请单', true)
xhr.setRequestHeader('token', getStorage())
xhr.responseType = 'blob'
xhr.onload = function(e) {
//
var blob = this.response
var filename = '销售订单退车申请单.pdf'
var a = document.createElement('a')
// blob.type="application/octet-stream";
// url
var url = URL.createObjectURL(blob)
a.href = url
a.download = filename
a.click()
// URL
window.URL.revokeObjectURL(url)
}
//
xhr.send()
}
}).catch(() => {})
},
toInfo(row) {
this.viewState = 4
this.$refs['divInfo'].showInfo(row)

2
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationMapper.xml

@ -518,7 +518,7 @@
fin_selected_receivables_detailed AS se
WHERE
se.receivablesSid = d.sid
AND se.auditState != '2' and se.auditState != '4'
AND se.auditState =3
)),
0
) AS currentReceivableMoney,

7
anrui-riskcenter-ui/src/api/loanbalancerecognition/loanbalancerecognition.js

@ -17,6 +17,13 @@ export default {
params: data
})
},
createPdf: function(data) {
return request({
url: '/riskcenter/v1/LoanDiff/createPdf',
method: 'post',
params: data
})
},
saveOrUpdate: function(data) {
return request({
url: '/riskcenter/v1/LoanDiff/update',

27
anrui-riskcenter-ui/src/views/loanbalancerecognition/loanbalancerecognition.vue

@ -43,6 +43,7 @@
<el-table-column label="操作" width="180px" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="toEdit(scope.row)" :disabled="scope.row.nodeState =='发起申请' ? false : scope.row.nodeState == '待提交' ? false : true">办理</el-button>
<el-button type="primary" size="mini" :disabled="scope.row.nodeState !='已办结'" @click="toDownload(scope.row)">下载</el-button>
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button>
</template>
</el-table-column>
@ -324,6 +325,32 @@ export default {
this.viewState = 2
this.$refs['divAdd'].showEdit(row)
},
toDownload(row) {
req.createPdf({ sid: row.sid, userName: window.sessionStorage.getItem('name') }).then((res) => {
if (res.success) {
var xhr = new XMLHttpRequest()
xhr.open('GET', process.env.VUE_APP_BASE_API + '/base/file/download?filePath=' + res.data + '&outFileName=' + '放款差额申请单', true)
xhr.setRequestHeader('token', getStorage())
xhr.responseType = 'blob'
xhr.onload = function(e) {
//
var blob = this.response
var filename = '放款差额申请单.pdf'
var a = document.createElement('a')
// blob.type="application/octet-stream";
// url
var url = URL.createObjectURL(blob)
a.href = url
a.download = filename
a.click()
// URL
window.URL.revokeObjectURL(url)
}
//
xhr.send()
}
}).catch(() => {})
},
toInfo(row) {
this.viewState = 4
this.$refs['divInfo'].showInfo(row)

12
anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/as/arrearsoutapply/AppArrearsoutApplyService.java

@ -18,6 +18,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
@ -42,11 +43,22 @@ public class AppArrearsoutApplyService {
ApplyDetailsVo applyDetailsVo = new ApplyDetailsVo();
AsArrearsoutApplyDetailsVo asArrearsoutApplyDetailsVo = resultBean.getData();
BeanUtil.copyProperties(asArrearsoutApplyDetailsVo, applyDetailsVo);
// 使用SimpleDateFormat
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
if (asArrearsoutApplyDetailsVo.getBalanceDate() != null) {
String dateString = sdf.format(asArrearsoutApplyDetailsVo.getBalanceDate());
applyDetailsVo.setBalanceDate(dateString);
}
if (asArrearsoutApplyDetailsVo.getCreateTime() != null) {
String dateString = sdf.format(asArrearsoutApplyDetailsVo.getCreateTime());
applyDetailsVo.setCreateTime(dateString);
}
List<AsArrearsoutApplyFile> filePaths = asArrearsoutApplyDetailsVo.getFilePaths();
if (!filePaths.isEmpty()) {
List<String> stringList = filePaths.stream().map(v -> v.getUrl()).collect(Collectors.toList());
applyDetailsVo.setFiles(stringList);
}
applyDetailsVo.setProcInsId(asArrearsoutApplyDetailsVo.getProcInstId());
return rb.success().setData(applyDetailsVo);
}

2
yxt-as-ui/src/views/operation/workorderinvoicing/relation/chooseRepairbill.vue

@ -59,7 +59,7 @@
<el-table-column prop="outAmount" label="外出费" align="center" width="130" />
<el-table-column prop="otherAmount" label="其它费用" align="center" width="130" />
<el-table-column prop="settleTime" label="结算日期" align="center" width="120" />
<el-table-column prop="totalAmount" label="结算金额合计" align="center" width="150" />
<el-table-column prop="settleAmount" label="结算金额合计" align="center" width="150" />
</el-table>
</div>
<div class="pages">

2
yxt-as-ui/src/views/operation/workorderinvoicing/workorderinvoicingAdd.vue

@ -277,7 +277,7 @@ export default {
outAmount: e.outAmount,
rescueAmount: e.rescueAmount,
otherAmount: e.otherAmount,
totalAmount: e.totalAmount
totalAmount: e.settleAmount
})
})
}

13
yxt-as-ui/src/views/operation/workorderreceivable/workorderreceivableAdd.vue

@ -43,6 +43,11 @@
<div class="title">维修单列表</div>
<el-table :key="tableKey" :data="formobj.asBwdiffapplyDetailList" :index="index" border style="width: 100%">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button type="danger" size="small" @click="handleDelete(scope.$index)">删除</el-button>
</template>
</el-table-column>
<el-table-column prop="sourceBillNo" label="维修单号" align="center" width="170" />
<el-table-column prop="customerName" label="客户名称" align="center" width="150" />
<el-table-column prop="vehMark" label="车牌号" align="center" width="150" />
@ -222,8 +227,7 @@ export default {
},
chooseGd() {
this.viewState = 2
const aa = []
this.$refs['divGD'].showData(aa, this.formobj.deptSid)
this.$refs['divGD'].showData(this.formobj.asBwdiffapplyDetailList, this.formobj.deptSid)
},
backData(value) {
this.viewState = 1
@ -244,7 +248,7 @@ export default {
outAmount: e.outAmount,
rescueAmount: e.rescueAmount,
otherAmount: e.otherAmount,
totalAmount: e.totalAmount,
totalAmount: e.settleAmount,
diffHourAmount: '',
diffGoodsAmount: '',
diffOutAomunt: '',
@ -260,6 +264,9 @@ export default {
resetState() {
this.viewState = 1
},
handleDelete(index) {
this.formobj.asBwdiffapplyDetailList.splice(index, 1)
},
//
jeTotal(row) {
row.diffTotalAmount = Math.round((parseFloat(row.diffHourAmount === '' ? '0' : row.diffHourAmount) + parseFloat(row.diffGoodsAmount === '' ? '0' : row.diffGoodsAmount) + parseFloat(row.diffOutAomunt === '' ? '0' : row.diffOutAomunt) + parseFloat(row.diffRescueAmount === '' ? '0' : row.diffRescueAmount) + parseFloat(row.diffOtherAmount === '' ? '0' : row.diffOtherAmount)) * 100) / 100

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 class="listconadd">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<el-row class="first_row">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
@ -25,9 +22,7 @@
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">调出站</div>
<el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item>
@ -44,35 +39,29 @@
<el-form-item><span class="addinputInfo">{{ formobj.confirmName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<div class="title titleOne">
<div>调拨商品列表</div>
</div>
<el-table :data="formobj.wmsInventoryAllocateBillDetailNewList" :index="index" border style="width: 100%;"
show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" />
<el-table-column prop="goodsID" label="商品ID" align="center" />
<el-table-column prop="goodsSpuName" label="商品名称" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
<el-table-column prop="goodsSkuOwnSpec" 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="warehouseArea" label="仓库" width="150" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<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" />
<div class="title">调拨商品列表</div>
<el-table :data="formobj.wmsInventoryAllocateBillDetailNewList" :index="index" border style="width: 100%;" show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column prop="goodsID" label="商品ID" align="center"/>
<el-table-column prop="goodsSpuName" label="商品名称" align="center"/>
<el-table-column prop="goodsSkuCode" label="商品编码" align="center"/>
<el-table-column prop="goodsSkuOwnSpec" 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="warehouseZoneName" 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="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-form>
</div>
@ -80,119 +69,144 @@
</template>
<script>
import req from '@/api/storage/allocation.js'
export default {
data() {
return {
index: 0,
formobj: {},
import req from '@/api/storage/allocation.js'
export default {
data() {
return {
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
},
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
},
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 = {
showInfo(sid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.init(sid).then((res) => {
if (res.success) {
this.formobj = res.data
}
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>
<style scoped>
/deep/ .el-form-item__error {
margin-left: 120px !important;
}
.must {
color: #f00;
}
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
.first_row {
border-top: 1px solid #E0E3EB;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
/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;
}
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
.first_row {
border-top: 1px solid #E0E3EB;
}
</style>

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

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

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

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

66
yxt-as-ui/src/views/storage/allocationByBranches/allocationByBranchesAdd.vue

@ -139,9 +139,10 @@
<el-table-column prop="goodsSkuCode" label="商品编码" width="100" align="center" />
<el-table-column prop="goodsSkuOwnSpec" 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="warehouseAreaName" label="库区" width="150" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<el-table-column prop="warehouseName" label="仓库" width="150" align="center"/>
<el-table-column prop="warehouseZoneName" 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="stockCount" label="库存数量" width="100" align="center" />
<!-- <el-table-column prop="taxPrice" label="单价" width="100" align="center" /> -->
<el-table-column prop="markUpRatio" label="加价比例(%)" width="120" align="center">
@ -447,36 +448,37 @@
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,
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,
warehouseZoneSid: e.warehouseZoneSid,
warehouseZoneName: e.warehouseZoneName,
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
})
})
}

222
yxt-as-ui/src/views/storage/allocationByBranches/allocationByBranchesInfo.vue

@ -7,11 +7,8 @@
</div>
</div>
<div class="listconadd">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<el-row class="first_row">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
@ -25,9 +22,7 @@
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">调出站</div>
<el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item>
@ -44,35 +39,29 @@
<el-form-item><span class="addinputInfo">{{ formobj.confirmName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<div class="title titleOne">
<div>调拨商品列表</div>
</div>
<el-table :data="formobj.wmsInventoryAllocateBillDetailNewList" :index="index" border style="width: 100%;"
show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" />
<el-table-column prop="goodsID" label="商品ID" align="center" />
<el-table-column prop="goodsSpuName" label="商品名称" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
<el-table-column prop="goodsSkuOwnSpec" 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="warehouseArea" label="仓库" width="150" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<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" />
<div class="title">调拨商品列表</div>
<el-table :data="formobj.wmsInventoryAllocateBillDetailNewList" :index="index" border style="width: 100%;" show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column prop="goodsID" label="商品ID" align="center"/>
<el-table-column prop="goodsSpuName" label="商品名称" align="center"/>
<el-table-column prop="goodsSkuCode" label="商品编码" align="center"/>
<el-table-column prop="goodsSkuOwnSpec" 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="warehouseZoneName" 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="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-form>
</div>
@ -80,119 +69,80 @@
</template>
<script>
import req from '@/api/storage/allocation.js'
export default {
data() {
return {
index: 0,
formobj: {},
}
},
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
},
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 = {
import req from '@/api/storage/allocation.js'
export default {
data() {
return {
index: 0,
formobj: {}
}
},
methods: {
//
getSummaries(param) {
const {
columns,
data
} = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
this.$emit('doback')
}
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() {
this.formobj = {}
this.$emit('doback')
}
}
}
</script>
<style scoped>
/deep/ .el-form-item__error {
margin-left: 120px !important;
}
.must {
color: #f00;
}
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
.first_row {
border-top: 1px solid #E0E3EB;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
/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;
}
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.first_row {
border-top: 1px solid #E0E3EB;
}
</style>

234
yxt-as-ui/src/views/storage/allocationByBranches/relation/chooseproducts.vue

@ -14,13 +14,13 @@
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="120px" class="tab-header">
<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 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 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>
@ -35,26 +35,25 @@
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>-->
</div>
<div class="">
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column width="50px" type="selection" align="center" />
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column prop="goodsID" label="商品ID" align="center" />
<el-table-column prop="goodsSkuTitle" label="商品名称" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" />
<el-table-column prop="unit" label="单位" align="center" />
<el-table-column prop="warehouseName" label="仓库" align="center" />
<el-table-column prop="warehouseArea" label="库区" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<el-table-column prop="count" label="库存数量" align="center" />
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column width="50px" type="selection" align="center"/>
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column prop="goodsID" label="商品ID" align="center"/>
<el-table-column prop="goodsSkuTitle" label="商品名称" align="center"/>
<el-table-column prop="goodsSkuCode" label="商品编码" align="center"/>
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center"/>
<el-table-column prop="unit" 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="warehouseRackCode" label="库位" align="center"/>
<el-table-column prop="count" label="库存数量" align="center"/>
</el-table>
</div>
<div class="pages">
<div class="tit" />
<div class="tit"/>
<!-- 翻页 -->
<Pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
<Pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
</div>
</div>
@ -62,111 +61,112 @@
</template>
<script>
import Pagination from '@/components/pagination'
import req from '@/api/storage/allocation.js'
export default {
name: 'SelectVehicle',
components: {
Pagination
},
data() {
return {
isSearchShow: false,
searchxianshitit: '隐藏查询条件',
tableKey: 0,
sids: [],
list: [],
number: '',
listLoading: false,
listQuery: {
current: 1,
size: 10,
params: {
deptSid: '',
goodsID: '',
goodsSkuTitle: '',
goodsSkuCode: '',
},
total: 0
}
import Pagination from '@/components/pagination'
import req from '@/api/storage/allocation.js'
export default {
name: 'SelectVehicle',
components: {
Pagination
},
data() {
return {
isSearchShow: false,
searchxianshitit: '隐藏查询条件',
tableKey: 0,
sids: [],
list: [],
number: '',
listLoading: false,
listQuery: {
current: 1,
size: 10,
params: {
deptSid: '',
goodsID: '',
goodsSkuTitle: '',
goodsSkuCode: ''
},
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: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
//
getList() {
this.listLoading = true
req.getGoods(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.listQuery.total = response.data.total
this.list = response.data.records
}
},
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
this.listLoading = true
req.getGoods(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.listQuery.total = response.data.total
this.list = response.data.records
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
//
handleReset() {
this.listQuery.current = 1
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
})
},
//
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>
<style scoped>
</style>

66
yxt-as-ui/src/views/storage/allocationByGroup/allocationByGroupAdd.vue

@ -139,9 +139,10 @@
<el-table-column prop="goodsSkuCode" label="商品编码" width="100" align="center" />
<el-table-column prop="goodsSkuOwnSpec" 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="warehouseArea" label="库区" width="150" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<el-table-column prop="warehouseName" label="仓库" width="150" align="center"/>
<el-table-column prop="warehouseZoneName" 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="stockCount" label="库存数量" width="100" align="center" />
<!-- <el-table-column prop="taxPrice" label="单价" width="100" align="center" /> -->
<el-table-column prop="markUpRatio" label="加价比例(%)" width="120" align="center">
@ -449,36 +450,37 @@
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,
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,
warehouseZoneSid: e.warehouseZoneSid,
warehouseZoneName: e.warehouseZoneName,
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
})
})
}

223
yxt-as-ui/src/views/storage/allocationByGroup/allocationByGroupInfo.vue

@ -7,11 +7,8 @@
</div>
</div>
<div class="listconadd">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<el-row class="first_row">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
@ -25,9 +22,7 @@
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">调出站</div>
<el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item>
@ -44,35 +39,29 @@
<el-form-item><span class="addinputInfo">{{ formobj.confirmName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<div class="title titleOne">
<div>调拨商品列表</div>
</div>
<el-table :data="formobj.wmsInventoryAllocateBillDetailNewList" :index="index" border style="width: 100%;"
show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" />
<el-table-column prop="goodsID" label="商品ID" align="center" />
<el-table-column prop="goodsSpuName" label="商品名称" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
<el-table-column prop="goodsSkuOwnSpec" 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="warehouseArea" label="仓库" width="150" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<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" />
<div class="title">调拨商品列表</div>
<el-table :data="formobj.wmsInventoryAllocateBillDetailNewList" :index="index" border style="width: 100%;" show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column prop="goodsID" label="商品ID" align="center"/>
<el-table-column prop="goodsSpuName" label="商品名称" align="center"/>
<el-table-column prop="goodsSkuCode" label="商品编码" align="center"/>
<el-table-column prop="goodsSkuOwnSpec" 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="warehouseZoneName" 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="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-form>
</div>
@ -80,119 +69,81 @@
</template>
<script>
import req from '@/api/storage/allocation.js'
export default {
data() {
return {
index: 0,
formobj: {},
}
},
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
},
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 = {
import req from '@/api/storage/allocation.js'
export default {
data() {
return {
index: 0,
formobj: {}
}
},
methods: {
//
getSummaries(param) {
const {
columns,
data
} = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
this.$emit('doback')
}
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')
}
}
}
</script>
<style scoped>
/deep/ .el-form-item__error {
margin-left: 120px !important;
}
.must {
color: #f00;
}
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
.first_row {
border-top: 1px solid #E0E3EB;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
/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;
}
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.first_row {
border-top: 1px solid #E0E3EB;
}
</style>

234
yxt-as-ui/src/views/storage/allocationByGroup/relation/chooseproducts.vue

@ -14,13 +14,13 @@
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="120px" class="tab-header">
<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 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 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>
@ -35,26 +35,25 @@
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>-->
</div>
<div class="">
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column width="50px" type="selection" align="center" />
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column prop="goodsID" label="商品ID" align="center" />
<el-table-column prop="goodsSkuTitle" label="商品名称" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" />
<el-table-column prop="unit" label="单位" align="center" />
<el-table-column prop="warehouseName" label="仓库" align="center" />
<el-table-column prop="warehouseArea" label="库区" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<el-table-column prop="count" label="库存数量" align="center" />
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column width="50px" type="selection" align="center"/>
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column prop="goodsID" label="商品ID" align="center"/>
<el-table-column prop="goodsSkuTitle" label="商品名称" align="center"/>
<el-table-column prop="goodsSkuCode" label="商品编码" align="center"/>
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center"/>
<el-table-column prop="unit" 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="warehouseRackCode" label="库位" align="center"/>
<el-table-column prop="count" label="库存数量" align="center"/>
</el-table>
</div>
<div class="pages">
<div class="tit" />
<div class="tit"/>
<!-- 翻页 -->
<Pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
<Pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
</div>
</div>
@ -62,111 +61,112 @@
</template>
<script>
import Pagination from '@/components/pagination'
import req from '@/api/storage/allocation.js'
export default {
name: 'SelectVehicle',
components: {
Pagination
},
data() {
return {
isSearchShow: false,
searchxianshitit: '隐藏查询条件',
tableKey: 0,
sids: [],
list: [],
number: '',
listLoading: false,
listQuery: {
current: 1,
size: 10,
params: {
deptSid: '',
goodsID: '',
goodsSkuTitle: '',
goodsSkuCode: '',
},
total: 0
}
import Pagination from '@/components/pagination'
import req from '@/api/storage/allocation.js'
export default {
name: 'SelectVehicle',
components: {
Pagination
},
data() {
return {
isSearchShow: false,
searchxianshitit: '隐藏查询条件',
tableKey: 0,
sids: [],
list: [],
number: '',
listLoading: false,
listQuery: {
current: 1,
size: 10,
params: {
deptSid: '',
goodsID: '',
goodsSkuTitle: '',
goodsSkuCode: ''
},
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: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
//
getList() {
this.listLoading = true
req.getGoods(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.listQuery.total = response.data.total
this.list = response.data.records
}
},
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
this.listLoading = true
req.getGoods(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.listQuery.total = response.data.total
this.list = response.data.records
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
//
handleReset() {
this.listQuery.current = 1
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
})
},
//
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>
<style scoped>
</style>

685
yxt-as-ui/src/views/workFlow/allocationByBranchesFlow/allocationByBranchesDaiBan.vue

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

66
yxt-as-ui/src/views/workFlow/allocationByBranchesFlow/allocationByBranchesEdit.vue

@ -82,9 +82,10 @@
<el-table-column prop="goodsSkuCode" label="商品编码" width="100" align="center" />
<el-table-column prop="goodsSkuOwnSpec" 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="warehouseAreaName" label="库区" width="150" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<el-table-column prop="warehouseName" label="仓库" width="150" align="center"/>
<el-table-column prop="warehouseZoneName" 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="stockCount" label="库存数量" width="100" align="center" />
<el-table-column prop="markUpRatio" label="加价比例(%)" width="120" align="center">
<template slot-scope="scope">
@ -365,36 +366,37 @@
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,
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,
warehouseZoneSid: e.warehouseZoneSid,
warehouseZoneName: e.warehouseZoneName,
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
})
})
}

305
yxt-as-ui/src/views/workFlow/allocationByBranchesFlow/allocationByBranchesYiBan.vue

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

234
yxt-as-ui/src/views/workFlow/allocationByBranchesFlow/relation/chooseproducts.vue

@ -14,13 +14,13 @@
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="120px" class="tab-header">
<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 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 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>
@ -35,26 +35,25 @@
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>-->
</div>
<div class="">
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column width="50px" type="selection" align="center" />
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column prop="goodsID" label="商品ID" align="center" />
<el-table-column prop="goodsSkuTitle" label="商品名称" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" />
<el-table-column prop="unit" label="单位" align="center" />
<el-table-column prop="warehouseName" label="仓库" align="center" />
<el-table-column prop="warehouseArea" label="库区" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<el-table-column prop="count" label="库存数量" align="center" />
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column width="50px" type="selection" align="center"/>
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column prop="goodsID" label="商品ID" align="center"/>
<el-table-column prop="goodsSkuTitle" label="商品名称" align="center"/>
<el-table-column prop="goodsSkuCode" label="商品编码" align="center"/>
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center"/>
<el-table-column prop="unit" 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="warehouseRackCode" label="库位" align="center"/>
<el-table-column prop="count" label="库存数量" align="center"/>
</el-table>
</div>
<div class="pages">
<div class="tit" />
<div class="tit"/>
<!-- 翻页 -->
<Pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
<Pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
</div>
</div>
@ -62,111 +61,112 @@
</template>
<script>
import Pagination from '@/components/pagination'
import req from '@/api/storage/allocation.js'
export default {
name: 'SelectVehicle',
components: {
Pagination
},
data() {
return {
isSearchShow: false,
searchxianshitit: '隐藏查询条件',
tableKey: 0,
sids: [],
list: [],
number: '',
listLoading: false,
listQuery: {
current: 1,
size: 10,
params: {
deptSid: '',
goodsID: '',
goodsSkuTitle: '',
goodsSkuCode: '',
},
total: 0
}
import Pagination from '@/components/pagination'
import req from '@/api/storage/allocation.js'
export default {
name: 'SelectVehicle',
components: {
Pagination
},
data() {
return {
isSearchShow: false,
searchxianshitit: '隐藏查询条件',
tableKey: 0,
sids: [],
list: [],
number: '',
listLoading: false,
listQuery: {
current: 1,
size: 10,
params: {
deptSid: '',
goodsID: '',
goodsSkuTitle: '',
goodsSkuCode: ''
},
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: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
//
getList() {
this.listLoading = true
req.getGoods(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.listQuery.total = response.data.total
this.list = response.data.records
}
},
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
this.listLoading = true
req.getGoods(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.listQuery.total = response.data.total
this.list = response.data.records
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
//
handleReset() {
this.listQuery.current = 1
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
})
},
//
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>
<style scoped>
</style>

687
yxt-as-ui/src/views/workFlow/allocationByGroupFlow/allocationByGroupDaiBan.vue

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

66
yxt-as-ui/src/views/workFlow/allocationByGroupFlow/allocationByGroupEdit.vue

@ -92,9 +92,10 @@
<el-table-column prop="goodsSkuCode" label="商品编码" width="100" align="center" />
<el-table-column prop="goodsSkuOwnSpec" 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="warehouseArea" label="库区" width="150" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<el-table-column prop="warehouseName" label="仓库" width="150" align="center"/>
<el-table-column prop="warehouseZoneName" 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="stockCount" label="库存数量" width="100" align="center" />
<el-table-column prop="markUpRatio" label="加价比例(%)" width="120" align="center">
<template slot-scope="scope">
@ -377,36 +378,37 @@
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,
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,
warehouseZoneSid: e.warehouseZoneSid,
warehouseZoneName: e.warehouseZoneName,
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
})
})
}

308
yxt-as-ui/src/views/workFlow/allocationByGroupFlow/allocationByGroupYiBan.vue

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

234
yxt-as-ui/src/views/workFlow/allocationByGroupFlow/relation/chooseproducts.vue

@ -14,13 +14,13 @@
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="120px" class="tab-header">
<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 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 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>
@ -35,26 +35,25 @@
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>-->
</div>
<div class="">
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column width="50px" type="selection" align="center" />
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column prop="goodsID" label="商品ID" align="center" />
<el-table-column prop="goodsSkuTitle" label="商品名称" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" />
<el-table-column prop="unit" label="单位" align="center" />
<el-table-column prop="warehouseName" label="仓库" align="center" />
<el-table-column prop="warehouseArea" label="库区" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<el-table-column prop="count" label="库存数量" align="center" />
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column width="50px" type="selection" align="center"/>
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column prop="goodsID" label="商品ID" align="center"/>
<el-table-column prop="goodsSkuTitle" label="商品名称" align="center"/>
<el-table-column prop="goodsSkuCode" label="商品编码" align="center"/>
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center"/>
<el-table-column prop="unit" 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="warehouseRackCode" label="库位" align="center"/>
<el-table-column prop="count" label="库存数量" align="center"/>
</el-table>
</div>
<div class="pages">
<div class="tit" />
<div class="tit"/>
<!-- 翻页 -->
<Pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
<Pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
</div>
</div>
@ -62,111 +61,112 @@
</template>
<script>
import Pagination from '@/components/pagination'
import req from '@/api/storage/allocation.js'
export default {
name: 'SelectVehicle',
components: {
Pagination
},
data() {
return {
isSearchShow: false,
searchxianshitit: '隐藏查询条件',
tableKey: 0,
sids: [],
list: [],
number: '',
listLoading: false,
listQuery: {
current: 1,
size: 10,
params: {
deptSid: '',
goodsID: '',
goodsSkuTitle: '',
goodsSkuCode: '',
},
total: 0
}
import Pagination from '@/components/pagination'
import req from '@/api/storage/allocation.js'
export default {
name: 'SelectVehicle',
components: {
Pagination
},
data() {
return {
isSearchShow: false,
searchxianshitit: '隐藏查询条件',
tableKey: 0,
sids: [],
list: [],
number: '',
listLoading: false,
listQuery: {
current: 1,
size: 10,
params: {
deptSid: '',
goodsID: '',
goodsSkuTitle: '',
goodsSkuCode: ''
},
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: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
//
getList() {
this.listLoading = true
req.getGoods(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.listQuery.total = response.data.total
this.list = response.data.records
}
},
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
this.listLoading = true
req.getGoods(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.listQuery.total = response.data.total
this.list = response.data.records
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
//
handleReset() {
this.listQuery.current = 1
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
})
},
//
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>
<style scoped>
</style>

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

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

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

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

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

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

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

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

2
yxt-as-ui/src/views/workFlow/gongdankaipiaoFlow/relation/chooseRepairbill.vue

@ -59,7 +59,7 @@
<el-table-column prop="outAmount" label="外出费" align="center" width="130" />
<el-table-column prop="otherAmount" label="其它费用" align="center" width="130" />
<el-table-column prop="settleTime" label="结算日期" align="center" width="120" />
<el-table-column prop="totalAmount" label="结算金额合计" align="center" width="150" />
<el-table-column prop="settleAmount" label="结算金额合计" align="center" width="150" />
</el-table>
</div>
<div class="pages">

2
yxt-as-ui/src/views/workFlow/gongdankaipiaoFlow/workorderinvoicingEdit.vue

@ -272,7 +272,7 @@ export default {
outAmount: e.outAmount,
rescueAmount: e.rescueAmount,
otherAmount: e.otherAmount,
totalAmount: e.totalAmount
totalAmount: e.settleAmount
})
})
}

15
yxt-as-ui/src/views/workFlow/gongdanyingshouFlow/workorderreceivableEdit.vue

@ -4,7 +4,7 @@
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="chooseGd()">选择</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="chooseGd()">选择维修</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button>
</div>
@ -42,6 +42,11 @@
<div class="title">维修单列表</div>
<el-table :key="tableKey" :data="formobj.asBwdiffapplyDetailList" :index="index" border style="width: 100%">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button type="danger" size="small" @click="handleDelete(scope.$index)">删除</el-button>
</template>
</el-table-column>
<el-table-column prop="sourceBillNo" label="维修单号" align="center" width="170" />
<el-table-column prop="customerName" label="客户名称" align="center" width="150" />
<el-table-column prop="vehMark" label="车牌号" align="center" width="150" />
@ -221,8 +226,7 @@ export default {
},
chooseGd() {
this.viewState = 2
const aa = []
this.$refs['divGD'].showData(aa, this.formobj.deptSid)
this.$refs['divGD'].showData(this.formobj.asBwdiffapplyDetailList, this.formobj.deptSid)
},
backData(value) {
this.viewState = 1
@ -243,7 +247,7 @@ export default {
outAmount: e.outAmount,
rescueAmount: e.rescueAmount,
otherAmount: e.otherAmount,
totalAmount: e.totalAmount,
totalAmount: e.settleAmount,
diffHourAmount: '',
diffGoodsAmount: '',
diffOutAomunt: '',
@ -259,6 +263,9 @@ export default {
resetState() {
this.viewState = 1
},
handleDelete(index) {
this.formobj.asBwdiffapplyDetailList.splice(index, 1)
},
//
jeTotal(row) {
row.diffTotalAmount = Math.round((parseFloat(row.diffHourAmount === '' ? '0' : row.diffHourAmount) + parseFloat(row.diffGoodsAmount === '' ? '0' : row.diffGoodsAmount) + parseFloat(row.diffOutAomunt === '' ? '0' : row.diffOutAomunt) + parseFloat(row.diffRescueAmount === '' ? '0' : row.diffRescueAmount) + parseFloat(row.diffOtherAmount === '' ? '0' : row.diffOtherAmount)) * 100) / 100

2
yxt-as/src/main/java/com/yxt/anrui/as/biz/asarrearsoutapply/AsArrearsoutApplyMapper.java

@ -72,4 +72,6 @@ public interface AsArrearsoutApplyMapper extends BaseMapper<AsArrearsoutApply> {
@Select("select nodeState from as_arrearsout_apply where pairBillSid = #{pairBillSid}")
String selByPairBillSid(String pairBillSid);
AsArrearsoutApply selectBill(String pairBillNo);
}

4
yxt-as/src/main/java/com/yxt/anrui/as/biz/asarrearsoutapply/AsArrearsoutApplyMapper.xml

@ -43,4 +43,8 @@
WHERE nodeState != '待提交'
and find_in_set(sid, #{list})
</select>
<select id="selectBill" resultType="com.yxt.anrui.as.api.asarrearsoutapply.AsArrearsoutApply">
select * from as_arrearsout_apply where pairBillNo = #{pairBillNo} and nodeState != '终止'
</select>
</mapper>

18
yxt-as/src/main/java/com/yxt/anrui/as/biz/asarrearsoutapply/AsArrearsoutApplyService.java

@ -155,7 +155,8 @@ public class AsArrearsoutApplyService extends MybatisBaseService<AsArrearsoutApp
return p;
}
public String saveOrUpdateDto(AsArrearsoutApplyDto dto) {
public ResultBean<String> saveOrUpdateDto(AsArrearsoutApplyDto dto) {
ResultBean<String> rb = ResultBean.fireFail();
String dtoSid = dto.getSid();
String deptSid = dto.getDeptSid();
SysOrganizationVo deptVo = sysOrganizationFeign.fetchBySid(deptSid).getData();
@ -164,6 +165,11 @@ public class AsArrearsoutApplyService extends MybatisBaseService<AsArrearsoutApp
dto.setUseOrgSid(useOrgSid);
dto.setUseOrgName(organizationVo.getName());
if (StringUtils.isBlank(dtoSid)) {
//根据维修单查询
AsArrearsoutApply asArrearsoutApply = baseMapper.selectBill(dto.getPairBillNo());
if(asArrearsoutApply != null){
return rb.setMsg("已存在维修单编码为"+dto.getPairBillNo()+"的欠款出厂申请,不允许重复创建");
}
//生成单据编号
String billNo = "";
String date = DateUtil.format(DateUtil.date(), "yyyyMM");
@ -176,10 +182,10 @@ public class AsArrearsoutApplyService extends MybatisBaseService<AsArrearsoutApp
}
dto.setBillNo(billNo);
String sid = this.insertByDto(dto);
return sid;
return rb.success().setData(sid);
}
this.updateByDto(dto);
return dtoSid;
return rb.success().setData(dtoSid);
}
public String insertByDto(AsArrearsoutApplyDto dto) {
@ -265,7 +271,11 @@ public class AsArrearsoutApplyService extends MybatisBaseService<AsArrearsoutApp
return rb.setMsg("操作失败!提交的数据不一致");
}
//新增修改保存
String businessSid = saveOrUpdateDto(dto);
ResultBean<String> resultBean = saveOrUpdateDto(dto);
if(!resultBean.getSuccess()){
return rb.setMsg(resultBean.getMsg());
}
String businessSid = resultBean.getData();
asArrearsoutApply = fetchBySid(businessSid);
//创建BusinessVariables实体对象
BusinessVariables bv = new BusinessVariables();

1
yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairbill/AsBusrepairBillService.java

@ -1280,6 +1280,7 @@ public class AsBusrepairBillService extends MybatisBaseService<AsBusrepairBillMa
}
qw.eq("b.outDoorState", 2);
qw.eq("b.isOutFactory", 0);
qw.eq("b.nodeCode",5);
qw.orderByDesc("b.createTime");
IPage<AsBusrepairBill> page = PagerUtil.queryToPage(pagerQuery);
IPage<AsBusrepairBillVo> pagging = baseMapper.listPage(page, qw);

Loading…
Cancel
Save