
44 changed files with 12519 additions and 551 deletions
@ -0,0 +1,473 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div class="tab-header webtop"> |
|||
<div>调拨详情</div> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="openCountersign('加签')">加 签</el-button> |
|||
<el-button type="primary" size="small" @click="openAgree('同意')">同 意</el-button> |
|||
<el-button type="danger" size="small" @click="openReject('驳回')">驳 回</el-button> |
|||
<el-button type="danger" size="small" @click="openStop('终止')">终 止</el-button> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
|
|||
<el-form ref="form_obj" :model="formobj" class="formaddcopy02"> |
|||
|
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请部门</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请日期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty">调出站</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<div class="span-sty">调入站</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.inOrgName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-form-item><span style="width: 100%;">{{ formobj.inPlatName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">经办人</div> |
|||
<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" /> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
|
|||
|
|||
<!-- 选择待办人 的弹出框--> |
|||
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%"> |
|||
<el-form class="formadd"> |
|||
<el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span class="icon">*</span>加签人员: |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item> |
|||
<el-select v-model="countersign.assignee" placeholder="请选择" filterable> |
|||
<el-option v-for="item in options" :key="item.userSid" :label="item.staffName" :value="item.userSid"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>当前环节:</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row :class="{rowClass:!currentLink}"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>意见:</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" |
|||
type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable></el-input></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div style="text-align:center;margin-top: 20px;"> |
|||
<el-button type="primary" size="mini" @click="reject">确 定</el-button> |
|||
<el-button type="info " size="mini" @click="nodeDialogVisible = false">取 消</el-button> |
|||
</div> |
|||
</el-form> |
|||
</el-dialog> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/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) // url解码unescape()已从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 |
|||
}, |
|||
|
|||
|
|||
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() |
|||
} |
|||
}, |
|||
/** 加签 */ |
|||
handleCountersign() { |
|||
if (this.countersign.assignee === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请选择加签人员' |
|||
}) |
|||
return |
|||
} |
|||
if (this.dialogList.comment === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请填写审批意见' |
|||
}) |
|||
return |
|||
} |
|||
this.countersign.views = this.dialogList.comment |
|||
req.delegate(this.countersign).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 同意任务 */ |
|||
handleAgree() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.complete(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 驳回任务 */ |
|||
handleReject() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.reject(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 终止任务 */ |
|||
handleStop() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.breakProcess(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.rowClass { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
</style> |
@ -0,0 +1,584 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ viewTitle }}</div> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
|
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请部门</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请日期</div> |
|||
<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> |
|||
</el-col> |
|||
<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-option v-for="(item,i) in deptList" :key="i" :label="item.name" :value="item.sid"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</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-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-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-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="warehouseAreaName" 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)" /> |
|||
</template> |
|||
</el-table-column> |
|||
<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,'')" /> |
|||
</template> |
|||
</el-table-column> |
|||
<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" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/allocation.js' |
|||
import chooseproducts from './relation/chooseproducts' |
|||
import { |
|||
getCurrentDate |
|||
} from '@/utils/index.js' |
|||
import { |
|||
getServiceStationByOrgSid, |
|||
selAllByOrgSidPath, |
|||
getOrgSidByPath, |
|||
fetchBySid, |
|||
tranTwo |
|||
} 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": "2", |
|||
"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: [] |
|||
} |
|||
}, |
|||
created() { |
|||
console.log('url:' + window.location.href) |
|||
var one = window.location.href.indexOf('&data') + 6 |
|||
const data = window.location.href.substr(one) // url解码unescape()已从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 |
|||
}, |
|||
|
|||
selectInOrg(val) { |
|||
console.log("selectInOrg", val); |
|||
|
|||
const choose = this.orgList.filter((item) => item.sid == val) |
|||
console.log('>>>>>>>>>selectInOrg', choose) |
|||
this.formobj.inOrgSid = choose[0].sid |
|||
this.formobj.inOrgName = choose[0].name |
|||
|
|||
getServiceStationByOrgSid(choose[0].sid).then((res) => { |
|||
if (res.success) { |
|||
this.formobj.inDeptSid = '' |
|||
this.formobj.inDeptName = '' |
|||
this.formobj.inOrgAttributeKey = '' |
|||
this.formobj.inOrgAttributeValue = '' |
|||
console.log("getListDeptByOrgSid", res); |
|||
this.deptList = res.data |
|||
} |
|||
}) |
|||
|
|||
}, |
|||
|
|||
selectInDeptName(val) { |
|||
console.log("selectInDeptName", val); |
|||
|
|||
const choose = this.deptList.filter((item) => item.sid == val) |
|||
console.log('>>>>>>>>>selectInDeptName', choose) |
|||
this.formobj.inPlatSid = choose[0].sid |
|||
this.formobj.inPlatName = choose[0].name |
|||
this.formobj.inOrgAttributeKey = choose[0].orgAttributeKey |
|||
this.formobj.inOrgAttributeValue = choose[0].orgAttributeValue |
|||
|
|||
}, |
|||
selectOperatorName(val) { |
|||
console.log("selectOperatorName", val); |
|||
const choose = this.operatorNameList.filter((item) => item.sid == val) |
|||
console.log('>>>>>>>>>selectOutOrg', choose) |
|||
this.formobj.confirmSid = choose[0].sid |
|||
this.formobj.confirmName = choose[0].name |
|||
}, |
|||
|
|||
getWarehouseAreaList(sid) { |
|||
var query = { |
|||
ckSid: sid |
|||
} |
|||
req.getWarehouseareas(query).then((res) => { |
|||
if (res.success) { |
|||
this.warehouseRackList = res.data |
|||
|
|||
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() |
|||
}) |
|||
req.init(sid).then((res) => { |
|||
if (res.success) { |
|||
this.formobj = res.data |
|||
this.formobj.instanceId = res.data.procInstId |
|||
|
|||
tranTwo(this.formobj.deptSid).then((resp) => { |
|||
if (resp.success) { |
|||
console.log("tranTwo", resp); |
|||
this.deptList = resp.data |
|||
} |
|||
}) |
|||
|
|||
selAllByOrgSidPath({ |
|||
orgSidPath: this.formobj.orgPath |
|||
}).then((res) => { |
|||
if (res.success) { |
|||
console.log("selAllByOrgSidPath", res); |
|||
this.operatorNameList = res.data |
|||
} |
|||
}) |
|||
|
|||
} |
|||
}) |
|||
}, |
|||
|
|||
backData(value) { |
|||
this.viewState = 1 |
|||
if (value.length > 0) { |
|||
value.forEach((e) => { |
|||
|
|||
this.formobj.wmsInventoryAllocateBillDetailNewList.push({ |
|||
"goodsSpuSid": e.goodsSpuSid, |
|||
"goodsSpuName": e.goodsSpuName, |
|||
"goodsSkuCode": e.goodsSkuCode, |
|||
"goodsSkuOwnSpec": e.goodsSkuOwnSpec, |
|||
"goodsSkuSid": e.goodsSkuSid, |
|||
"goodsSkuTitle": e.goodsSkuTitle, |
|||
"billSid": this.formobj.sid, |
|||
"inventorySid": e.inventorySid, |
|||
"warehouseSid": e.warehouseSid, |
|||
"warehouseName": e.warehouseName, |
|||
"warehouseAreaSid": e.warehouseAreaSid, |
|||
"warehouseArea": e.warehouseArea, |
|||
"warehouseRackSid": e.warehouseRackSid, |
|||
"warehouseRackCode": e.warehouseRackCode, |
|||
"taxPrice": e.taxPrice, |
|||
"stockCount": e.count, |
|||
"inWarehouseSid": '', |
|||
"inWarehouseName": '', |
|||
"inWarehouseRackSid": '', |
|||
"inWarehouseRackCode": '', |
|||
"count": 0, |
|||
"amount": 0, |
|||
"requAmount": e.taxPrice, |
|||
"markUpRatio": 0, |
|||
"unit": e.unit, |
|||
"goodsID": e.goodsID, |
|||
"manufacturerSid": e.manufacturerSid, |
|||
"manufacturerName": e.manufacturerName, |
|||
}) |
|||
}) |
|||
} |
|||
}, |
|||
deleteGoods(index) { |
|||
this.formobj.wmsInventoryAllocateBillDetailNewList.splice(index, 1) |
|||
}, |
|||
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() { |
|||
console.log("saveOrUpdate", this.formobj); |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
|
|||
if (this.formobj.wmsInventoryAllocateBillDetailNewList.length == 0) { |
|||
this.$message({ |
|||
type: "warning", |
|||
showClose: true, |
|||
message: '调拨商品不能为空' |
|||
}) |
|||
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 |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
} |
|||
} |
|||
</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; |
|||
} |
|||
</style> |
@ -0,0 +1,226 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div class="tab-header webtop"> |
|||
<div>调拨详情</div> |
|||
<div> |
|||
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button> |
|||
</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> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请部门</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请日期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty">调出站</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<div class="span-sty">调入站</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.inOrgName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-form-item><span style="width: 100%;">{{ formobj.inPlatName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">经办人</div> |
|||
<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" /> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
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) // url解码unescape()已从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 |
|||
}, |
|||
|
|||
|
|||
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 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
</style> |
@ -0,0 +1,172 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<div>选择商品</div> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="AddUpdateReturn">确定</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="120px" class="tab-header"> |
|||
<el-form-item label="商品ID" class="searchlist"> |
|||
<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-form-item> |
|||
<el-form-item label="商品名称" class="searchlist"> |
|||
<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> |
|||
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="listtop"> |
|||
<div class="tit">商品列表</div> |
|||
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>--> |
|||
</div> |
|||
<div class=""> |
|||
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%" |
|||
@selection-change="handleSelectionChange"> |
|||
<el-table-column width="50px" type="selection" align="center" /> |
|||
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column 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> |
|||
</div> |
|||
<div class="pages"> |
|||
<div class="tit" /> |
|||
<!-- 翻页 --> |
|||
<Pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" |
|||
:limit.sync="listQuery.size" class="pagination" @pagination="getList" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Pagination from '@/components/pagination' |
|||
import 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 |
|||
}, |
|||
// 查询列表信息 |
|||
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 |
|||
}) |
|||
} |
|||
}, |
|||
// 返回 |
|||
handleReturn() { |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,474 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div class="tab-header webtop"> |
|||
<div>调拨详情</div> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="openCountersign('加签')">加 签</el-button> |
|||
<el-button type="primary" size="small" @click="openAgree('同意')">同 意</el-button> |
|||
<el-button type="danger" size="small" @click="openReject('驳回')">驳 回</el-button> |
|||
<el-button type="danger" size="small" @click="openStop('终止')">终 止</el-button> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
|
|||
<el-form ref="form_obj" :model="formobj" class="formaddcopy02"> |
|||
|
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请部门</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请日期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty">调出站</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<div class="span-sty">调入站</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.inOrgName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-form-item><span style="width: 100%;">{{ formobj.inPlatName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">经办人</div> |
|||
<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" /> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
|
|||
<!-- 选择待办人 的弹出框--> |
|||
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%"> |
|||
<el-form class="formadd"> |
|||
<el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span class="icon">*</span>加签人员: |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item> |
|||
<el-select v-model="countersign.assignee" placeholder="请选择" filterable> |
|||
<el-option v-for="item in options" :key="item.userSid" :label="item.staffName" :value="item.userSid"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>当前环节:</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row :class="{rowClass:!currentLink}"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>意见:</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" |
|||
type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable></el-input></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div style="text-align:center;margin-top: 20px;"> |
|||
<el-button type="primary" size="mini" @click="reject">确 定</el-button> |
|||
<el-button type="info " size="mini" @click="nodeDialogVisible = false">取 消</el-button> |
|||
</div> |
|||
</el-form> |
|||
</el-dialog> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/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) // url解码unescape()已从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 |
|||
}, |
|||
|
|||
|
|||
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() |
|||
} |
|||
}, |
|||
/** 加签 */ |
|||
handleCountersign() { |
|||
if (this.countersign.assignee === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请选择加签人员' |
|||
}) |
|||
return |
|||
} |
|||
if (this.dialogList.comment === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请填写审批意见' |
|||
}) |
|||
return |
|||
} |
|||
this.countersign.views = this.dialogList.comment |
|||
req.delegate(this.countersign).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 同意任务 */ |
|||
handleAgree() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.complete(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 驳回任务 */ |
|||
handleReject() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.reject(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 终止任务 */ |
|||
handleStop() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.breakProcess(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.rowClass { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
</style> |
@ -0,0 +1,596 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ viewTitle }}</div> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
|
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|||
|
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请部门</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请日期</div> |
|||
<span class="addinputInfo">{{ formobj.createTime }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row> |
|||
|
|||
<el-col :span="6"> |
|||
<div class="span-sty">调出站</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<div class="span-sty2"><span class="must">*</span> 调入分公司</div> |
|||
<el-form-item prop="inOrgName"> <el-select v-model="formobj.inOrgName" placeholder="请选择分公司" |
|||
@change="selectInOrg" class="addinputInfo2 addinputw2"> |
|||
<el-option v-for="(item,i) in orgList" :key="i" :label="item.name" :value="item.sid"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<div class="span-sty2"><span class="must">*</span> 调入站点</div> |
|||
<el-form-item prop="inPlatName"> |
|||
<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> |
|||
</el-form-item> |
|||
</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-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-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-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="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)" /> |
|||
</template> |
|||
</el-table-column> |
|||
<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,'')" /> |
|||
</template> |
|||
</el-table-column> |
|||
<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" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/allocation.js' |
|||
import chooseproducts from './relation/chooseproducts' |
|||
import { |
|||
getCurrentDate |
|||
} from '@/utils/index.js' |
|||
import { |
|||
selectOrgSidList, |
|||
getOrgSidByPath, |
|||
selAllByOrgSidPath, |
|||
fetchBySid, |
|||
tranThree |
|||
} 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": "3", |
|||
"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: [] |
|||
} |
|||
}, |
|||
created() { |
|||
console.log('url:' + window.location.href) |
|||
var one = window.location.href.indexOf('&data') + 6 |
|||
const data = window.location.href.substr(one) // url解码unescape()已从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 |
|||
}, |
|||
|
|||
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 |
|||
|
|||
tranThree({ |
|||
sid: choose[0].sid, |
|||
deptSid: this.formobj.deptSid |
|||
}).then((res) => { |
|||
if (res.success) { |
|||
this.formobj.inDeptSid = '' |
|||
this.formobj.inDeptName = '' |
|||
this.formobj.inOrgAttributeKey = '' |
|||
this.formobj.inOrgAttributeValue = '' |
|||
console.log("getListDeptByOrgSid", res); |
|||
this.deptList = res.data |
|||
} |
|||
}) |
|||
|
|||
}, |
|||
|
|||
selectInDeptName(val) { |
|||
console.log("selectInDeptName", val); |
|||
|
|||
const choose = this.deptList.filter((item) => item.sid == val) |
|||
console.log('>>>>>>>>>selectInDeptName', choose) |
|||
this.formobj.inPlatSid = choose[0].sid |
|||
this.formobj.inPlatName = choose[0].name |
|||
this.formobj.inOrgAttributeKey = choose[0].orgAttributeKey |
|||
this.formobj.inOrgAttributeValue = choose[0].orgAttributeValue |
|||
|
|||
}, |
|||
selectOperatorName(val) { |
|||
console.log("selectOperatorName", val); |
|||
const choose = this.operatorNameList.filter((item) => item.sid == val) |
|||
console.log('>>>>>>>>>selectOutOrg', choose) |
|||
this.formobj.confirmSid = choose[0].sid |
|||
this.formobj.confirmName = choose[0].name |
|||
}, |
|||
|
|||
getWarehouseAreaList(sid) { |
|||
var query = { |
|||
ckSid: sid |
|||
} |
|||
req.getWarehouseareas(query).then((res) => { |
|||
if (res.success) { |
|||
this.warehouseRackList = res.data |
|||
|
|||
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() |
|||
}) |
|||
req.init(sid).then((res) => { |
|||
if (res.success) { |
|||
this.formobj = res.data |
|||
this.formobj.instanceId = res.data.procInstId |
|||
|
|||
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, |
|||
}) |
|||
}) |
|||
} |
|||
}, |
|||
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() { |
|||
console.log("saveOrUpdate", this.formobj); |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
|
|||
if (this.formobj.wmsInventoryAllocateBillDetailNewList.length == 0) { |
|||
this.$message({ |
|||
type: "warning", |
|||
showClose: true, |
|||
message: '调拨商品不能为空' |
|||
}) |
|||
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 |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
} |
|||
} |
|||
</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; |
|||
} |
|||
</style> |
@ -0,0 +1,227 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div class="tab-header webtop"> |
|||
<div>调拨详情</div> |
|||
<div> |
|||
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button> |
|||
</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> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请部门</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请日期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty">调出站</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<div class="span-sty">调入站</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.inOrgName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-form-item><span style="width: 100%;">{{ formobj.inPlatName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">经办人</div> |
|||
<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" /> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
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) // url解码unescape()已从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 |
|||
}, |
|||
|
|||
|
|||
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 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
</style> |
@ -0,0 +1,172 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<div>选择商品</div> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="AddUpdateReturn">确定</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="120px" class="tab-header"> |
|||
<el-form-item label="商品ID" class="searchlist"> |
|||
<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-form-item> |
|||
<el-form-item label="商品名称" class="searchlist"> |
|||
<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> |
|||
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="listtop"> |
|||
<div class="tit">商品列表</div> |
|||
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>--> |
|||
</div> |
|||
<div class=""> |
|||
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%" |
|||
@selection-change="handleSelectionChange"> |
|||
<el-table-column width="50px" type="selection" align="center" /> |
|||
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column 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> |
|||
</div> |
|||
<div class="pages"> |
|||
<div class="tit" /> |
|||
<!-- 翻页 --> |
|||
<Pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" |
|||
:limit.sync="listQuery.size" class="pagination" @pagination="getList" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Pagination from '@/components/pagination' |
|||
import 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 |
|||
}, |
|||
// 查询列表信息 |
|||
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 |
|||
}) |
|||
} |
|||
}, |
|||
// 返回 |
|||
handleReturn() { |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,472 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div class="tab-header webtop"> |
|||
<div>调拨详情</div> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="openCountersign('加签')">加 签</el-button> |
|||
<el-button type="primary" size="small" @click="openAgree('同意')">同 意</el-button> |
|||
<el-button type="danger" size="small" @click="openReject('驳回')">驳 回</el-button> |
|||
<el-button type="danger" size="small" @click="openStop('终止')">终 止</el-button> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
|
|||
<el-form ref="form_obj" :model="formobj" class="formaddcopy02"> |
|||
|
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请部门</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请日期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty">调出站</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<div class="span-sty">调入站</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.inOrgName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-form-item><span style="width: 100%;">{{ formobj.inPlatName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">经办人</div> |
|||
<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" /> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
|
|||
<!-- 选择待办人 的弹出框--> |
|||
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%"> |
|||
<el-form class="formadd"> |
|||
<el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span class="icon">*</span>加签人员: |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item> |
|||
<el-select v-model="countersign.assignee" placeholder="请选择" filterable> |
|||
<el-option v-for="item in options" :key="item.userSid" :label="item.staffName" :value="item.userSid"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>当前环节:</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row :class="{rowClass:!currentLink}"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>意见:</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" |
|||
type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable></el-input></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div style="text-align:center;margin-top: 20px;"> |
|||
<el-button type="primary" size="mini" @click="reject">确 定</el-button> |
|||
<el-button type="info " size="mini" @click="nodeDialogVisible = false">取 消</el-button> |
|||
</div> |
|||
</el-form> |
|||
</el-dialog> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/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) // url解码unescape()已从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 |
|||
}, |
|||
|
|||
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() |
|||
} |
|||
}, |
|||
/** 加签 */ |
|||
handleCountersign() { |
|||
if (this.countersign.assignee === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请选择加签人员' |
|||
}) |
|||
return |
|||
} |
|||
if (this.dialogList.comment === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请填写审批意见' |
|||
}) |
|||
return |
|||
} |
|||
this.countersign.views = this.dialogList.comment |
|||
req.delegate(this.countersign).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 同意任务 */ |
|||
handleAgree() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.complete(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 驳回任务 */ |
|||
handleReject() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.reject(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 终止任务 */ |
|||
handleStop() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.breakProcess(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.rowClass { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
</style> |
@ -0,0 +1,617 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ viewTitle }}</div> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
|
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|||
|
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请部门</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请日期</div> |
|||
<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> |
|||
</el-col> |
|||
<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-option v-for="(item,i) in deptList" :key="i" :label="item.name" :value="item.sid"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</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-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-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-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="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)" /> |
|||
</template> |
|||
</el-table-column> |
|||
<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,'')" /> |
|||
</template> |
|||
</el-table-column> |
|||
<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" /> |
|||
</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: [] |
|||
} |
|||
}, |
|||
created() { |
|||
console.log('url:' + window.location.href) |
|||
var one = window.location.href.indexOf('&data') + 6 |
|||
const data = window.location.href.substr(one) // url解码unescape()已从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 |
|||
}, |
|||
|
|||
selectInOrg(val) { |
|||
console.log("selectInOrg", val); |
|||
|
|||
const choose = this.orgList.filter((item) => item.sid == val) |
|||
console.log('>>>>>>>>>selectInOrg', choose) |
|||
this.formobj.inOrgSid = choose[0].sid |
|||
this.formobj.inOrgName = choose[0].name |
|||
|
|||
getServiceStationByOrgSid(choose[0].sid).then((res) => { |
|||
if (res.success) { |
|||
this.formobj.inDeptSid = '' |
|||
this.formobj.inDeptName = '' |
|||
this.formobj.inOrgAttributeKey = '' |
|||
this.formobj.inOrgAttributeValue = '' |
|||
console.log("getListDeptByOrgSid", res); |
|||
this.deptList = res.data |
|||
} |
|||
}) |
|||
|
|||
}, |
|||
|
|||
selectInDeptName(val) { |
|||
console.log("selectInDeptName", val); |
|||
|
|||
const choose = this.deptList.filter((item) => item.sid == val) |
|||
console.log('>>>>>>>>>selectInDeptName', choose) |
|||
this.formobj.inPlatSid = choose[0].sid |
|||
this.formobj.inPlatName = choose[0].name |
|||
this.formobj.inOrgAttributeKey = choose[0].orgAttributeKey |
|||
this.formobj.inOrgAttributeValue = choose[0].orgAttributeValue |
|||
|
|||
}, |
|||
selectOperatorName(val) { |
|||
console.log("selectOperatorName", val); |
|||
const choose = this.operatorNameList.filter((item) => item.sid == val) |
|||
console.log('>>>>>>>>>selectOutOrg', choose) |
|||
this.formobj.confirmSid = choose[0].sid |
|||
this.formobj.confirmName = choose[0].name |
|||
}, |
|||
|
|||
getWarehouseAreaList(sid) { |
|||
var query = { |
|||
ckSid: sid |
|||
} |
|||
req.getWarehouseareas(query).then((res) => { |
|||
if (res.success) { |
|||
this.warehouseRackList = res.data |
|||
|
|||
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() |
|||
}) |
|||
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 |
|||
} |
|||
}) |
|||
} |
|||
|
|||
} |
|||
}) |
|||
|
|||
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, |
|||
}) |
|||
}) |
|||
} |
|||
}, |
|||
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() { |
|||
console.log("saveOrUpdate", this.formobj); |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
|
|||
if (this.formobj.wmsInventoryAllocateBillDetailNewList.length == 0) { |
|||
this.$message({ |
|||
type: "warning", |
|||
showClose: true, |
|||
message: '调拨商品不能为空' |
|||
}) |
|||
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 |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
} |
|||
} |
|||
</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; |
|||
} |
|||
</style> |
@ -0,0 +1,225 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div class="tab-header webtop"> |
|||
<div>调拨详情</div> |
|||
<div> |
|||
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button> |
|||
</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> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请部门</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请日期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty">调出站</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<div class="span-sty">调入站</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.inOrgName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-form-item><span style="width: 100%;">{{ formobj.inPlatName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">经办人</div> |
|||
<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" /> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
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) // url解码unescape()已从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 |
|||
}, |
|||
|
|||
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 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
</style> |
@ -0,0 +1,172 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<div>选择商品</div> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="AddUpdateReturn">确定</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="120px" class="tab-header"> |
|||
<el-form-item label="商品ID" class="searchlist"> |
|||
<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-form-item> |
|||
<el-form-item label="商品名称" class="searchlist"> |
|||
<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> |
|||
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="listtop"> |
|||
<div class="tit">商品列表</div> |
|||
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>--> |
|||
</div> |
|||
<div class=""> |
|||
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%" |
|||
@selection-change="handleSelectionChange"> |
|||
<el-table-column width="50px" type="selection" align="center" /> |
|||
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column 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> |
|||
</div> |
|||
<div class="pages"> |
|||
<div class="tit" /> |
|||
<!-- 翻页 --> |
|||
<Pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" |
|||
:limit.sync="listQuery.size" class="pagination" @pagination="getList" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Pagination from '@/components/pagination' |
|||
import 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 |
|||
}, |
|||
// 查询列表信息 |
|||
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 |
|||
}) |
|||
} |
|||
}, |
|||
// 返回 |
|||
handleReturn() { |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,496 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div class="tab-header webtop"> |
|||
<div>合作二级站备案申请详情</div> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="openCountersign('加签')">加 签</el-button> |
|||
<el-button type="primary" size="small" @click="openAgree('同意')">同 意</el-button> |
|||
<el-button type="danger" size="small" @click="openReject('驳回')">驳 回</el-button> |
|||
<el-button type="danger" size="small" @click="openStop('终止')">终 止</el-button> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
<el-form ref="form_obj" :model="formobj" 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.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请日期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title">合作二级站基本信息</div> |
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">二级站点名称</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.siteName }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="16"> |
|||
<div class="span-sty">法定代表人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.legalPerson }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">手机号码</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.phone }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="16"> |
|||
<div class="span-sty">负责人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.directorName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">手机号码</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.directorPhone }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="16"> |
|||
<div class="span-sty">统一社会信用号码</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.unifiedCreditCode }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">证件有效期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.termValidity }}</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.address }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="16"> |
|||
<div class="span-sty">合作有效期至</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.limitedTerm }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">授信金额</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.creditGranting }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title">附件清单</div> |
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">营业执照</div> |
|||
<el-form-item><el-image class="addinputInfo" style="width: 150px;height: 150px" |
|||
v-for="(item, index) in formobj.businessLicenseFile" :key="index" :src="item.url" |
|||
:preview-src-list="[item.url]" /></el-form-item> |
|||
</el-col> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">合作协议</div> |
|||
<el-form-item><el-image class="addinputInfo" style="width: 150px;height: 150px" |
|||
v-for="(item, index) in formobj.agreementFile" :key="index" :src="item.url" |
|||
:preview-src-list="[item.url]" /></el-form-item> |
|||
</el-col> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">其他资料</div> |
|||
<el-form-item><el-image class="addinputInfo" style="width: 150px;height: 150px" |
|||
v-for="(item, index) in formobj.otherFile" :key="index" :src="item.url" |
|||
:preview-src-list="[item.url]" /></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
</el-form> |
|||
</div> |
|||
|
|||
<!-- 选择待办人 的弹出框--> |
|||
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%"> |
|||
<el-form class="formadd"> |
|||
<el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span class="icon">*</span>加签人员: |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item> |
|||
<el-select v-model="countersign.assignee" placeholder="请选择" filterable> |
|||
<el-option v-for="item in options" :key="item.userSid" :label="item.staffName" :value="item.userSid"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>当前环节:</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row :class="{rowClass:!currentLink}"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>意见:</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" |
|||
type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable></el-input></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div style="text-align:center;margin-top: 20px;"> |
|||
<el-button type="primary" size="mini" @click="reject">确 定</el-button> |
|||
<el-button type="info " size="mini" @click="nodeDialogVisible = false">取 消</el-button> |
|||
</div> |
|||
</el-form> |
|||
</el-dialog> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/basicinformation/secondaryCooperativeStation' |
|||
import { |
|||
getCurrentDate |
|||
} from '@/utils/index' |
|||
import { |
|||
selectStaffListss |
|||
} from '@/api/Common/dictcommons' |
|||
|
|||
export default { |
|||
name: 'SecondaryCooperativeStation', |
|||
data() { |
|||
return { |
|||
viewState: 1, |
|||
formobj: { |
|||
"sid": "", |
|||
"nodeState": "", |
|||
"procInstId": "", |
|||
"procDefId": "", |
|||
"taskId": "", |
|||
"nodeId": "", |
|||
"useOrgName": "", |
|||
"deptName": '', |
|||
"deptSid": '', |
|||
"createByName": '', |
|||
"createBySid": '', |
|||
"createOrgSid": '', |
|||
"createOrgName": '', |
|||
"remarks": "", |
|||
"finishTime": "", |
|||
"createTime": getCurrentDate(), |
|||
"siteName": "", |
|||
"legalPerson": "", |
|||
"phone": "", |
|||
"directorName": "", |
|||
"directorPhone": "", |
|||
"unifiedCreditCode": "", |
|||
"termValidity": "", |
|||
"address": "", |
|||
"limitedTerm": "", |
|||
"creditGranting": "", |
|||
"businessLicenseFile": [], |
|||
"agreementFile": [], |
|||
"otherFile": [], |
|||
|
|||
}, |
|||
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) // url解码unescape()已从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: { |
|||
showInfo(sid) { |
|||
req.fetchDetailsBySid(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() |
|||
} |
|||
}, |
|||
/** 加签 */ |
|||
handleCountersign() { |
|||
if (this.countersign.assignee === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请选择加签人员' |
|||
}) |
|||
return |
|||
} |
|||
if (this.dialogList.comment === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请填写审批意见' |
|||
}) |
|||
return |
|||
} |
|||
this.countersign.views = this.dialogList.comment |
|||
req.delegate(this.countersign).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 同意任务 */ |
|||
handleAgree() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.complete(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 驳回任务 */ |
|||
handleReject() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.reject(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 终止任务 */ |
|||
handleStop() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.breakProcess(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.rowClass { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
</style> |
@ -0,0 +1,373 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ viewTitle }}</div> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请部门</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请日期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.remarks" clearable |
|||
placeholder="" /></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title">合作二级站基本信息</div> |
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="24"> |
|||
<div class="span-sty"><span class="icon">*</span>二级站点名称</div> |
|||
<el-form-item prop="siteName"><el-input class="addinputInfo addinputw" v-model="formobj.siteName" |
|||
clearable placeholder="" /></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="16"> |
|||
<div class="span-sty"><span class="icon">*</span>法定代表人</div> |
|||
<el-form-item prop="legalPerson"><el-input class="addinputInfo addinputw" v-model="formobj.legalPerson" |
|||
clearable placeholder="" /></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">手机号码</div> |
|||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.phone" clearable |
|||
placeholder="" /></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="16"> |
|||
<div class="span-sty"><span class="icon">*</span>负责人</div> |
|||
<el-form-item prop="directorName"><el-input class="addinputInfo addinputw" v-model="formobj.directorName" |
|||
clearable placeholder="" /></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="icon">*</span>手机号码</div> |
|||
<el-form-item prop="directorPhone"><el-input class="addinputInfo addinputw" |
|||
v-model="formobj.directorPhone" clearable placeholder="" /></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="16"> |
|||
<div class="span-sty"><span class="icon">*</span>统一社会信用号码</div> |
|||
<el-form-item prop="unifiedCreditCode"><el-input class="addinputInfo addinputw" |
|||
v-model="formobj.unifiedCreditCode" clearable placeholder="" /></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="icon">*</span>证件有效期</div> |
|||
<el-form-item prop="termValidity"><el-date-picker v-model="formobj.termValidity" value-format="yyyy-MM-dd" |
|||
format="yyyy-MM-dd" type="date" class="addinputInfo addinputw" |
|||
placeholder="选择日期"></el-date-picker></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty"><span class="icon">*</span>地址</div> |
|||
<el-form-item prop="address"><el-input class="addinputInfo addinputw" v-model="formobj.address" clearable |
|||
placeholder="" /></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="16"> |
|||
<div class="span-sty"><span class="icon">*</span>合作有效期至</div> |
|||
<el-form-item prop="limitedTerm"><el-date-picker v-model="formobj.limitedTerm" value-format="yyyy-MM-dd" |
|||
format="yyyy-MM-dd" type="date" class="addinputInfo addinputw" |
|||
placeholder="选择日期"></el-date-picker></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="icon">*</span>授信金额</div> |
|||
<el-form-item prop="creditGranting"><el-input class="addinputInfo addinputw" |
|||
v-model="formobj.creditGranting" clearable placeholder="" |
|||
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" /></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title">附件清单</div> |
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="24"> |
|||
<div class="span-sty"><span class="icon">*</span>营业执照</div> |
|||
<el-form-item prop="businessLicenseFile"> |
|||
<uploadImg ref="uploadImg" class="addinputInfo" v-model="formobj.businessLicenseFile" :limit="50" |
|||
bucket="map" :upload-data="{ type: '0001' }" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="24"> |
|||
<div class="span-sty"><span class="icon">*</span>合作协议</div> |
|||
<el-form-item prop="agreementFile"> |
|||
<uploadImg ref="uploadImg" class="addinputInfo" v-model="formobj.agreementFile" :limit="50" bucket="map" |
|||
:upload-data="{ type: '0001' }" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">其他资料</div> |
|||
<el-form-item> |
|||
<uploadImg ref="uploadImg" class="addinputInfo" v-model="formobj.otherFile" :limit="50" bucket="map" |
|||
:upload-data="{ type: '0001' }" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/basicinformation/secondaryCooperativeStation' |
|||
import uploadImg from '@/components/uploadFile/uploadImg' |
|||
import { |
|||
getCurrentDate |
|||
} from '@/utils/index' |
|||
|
|||
|
|||
|
|||
export default { |
|||
name: 'SecondaryCooperativeStationAdd', |
|||
components: { |
|||
uploadImg |
|||
}, |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
viewState: 1, |
|||
submitdisabled: false, |
|||
tableKey: 1, |
|||
index: 0, |
|||
formobj: { |
|||
"sid": "", |
|||
"nodeState": "", |
|||
"procInstId": "", |
|||
"procDefId": "", |
|||
"taskId": "", |
|||
"nodeId": "", |
|||
"instanceId": "", |
|||
"useOrgName": "", |
|||
"deptName": '', |
|||
"deptSid": '', |
|||
"createByName": '', |
|||
"createBySid": '', |
|||
"createOrgSid": '', |
|||
"createOrgName": '', |
|||
"remarks": "", |
|||
"finishTime": "", |
|||
"createTime": getCurrentDate(), |
|||
"siteName": "", |
|||
"legalPerson": "", |
|||
"phone": "", |
|||
"directorName": "", |
|||
"directorPhone": "", |
|||
"unifiedCreditCode": "", |
|||
"termValidity": "", |
|||
"address": "", |
|||
"limitedTerm": "", |
|||
"creditGranting": "", |
|||
"businessLicenseFile": [], |
|||
"agreementFile": [], |
|||
"otherFile": [], |
|||
|
|||
}, |
|||
rules: { |
|||
siteName: [{ |
|||
required: true, |
|||
message: '二级站名称不能为空', |
|||
trigger: 'blur' |
|||
}], |
|||
legalPerson: [{ |
|||
required: true, |
|||
message: '法定代表人不能为空', |
|||
trigger: 'blur' |
|||
}], |
|||
directorName: [{ |
|||
required: true, |
|||
message: '负责人不能为空', |
|||
trigger: 'blur' |
|||
}], |
|||
directorPhone: [{ |
|||
required: true, |
|||
message: '负责人手机号码不能为空', |
|||
trigger: 'blur' |
|||
}], |
|||
directorPhone: [{ |
|||
required: true, |
|||
message: '负责人手机号码不能为空', |
|||
trigger: 'blur' |
|||
}], |
|||
unifiedCreditCode: [{ |
|||
required: true, |
|||
message: '统一社会信用代码不能为空', |
|||
trigger: 'blur' |
|||
}], |
|||
termValidity: [{ |
|||
required: true, |
|||
message: '证件有效期不能为空', |
|||
trigger: 'change' |
|||
}], |
|||
address: [{ |
|||
required: true, |
|||
message: '地址不能为空', |
|||
trigger: 'blur' |
|||
}], |
|||
limitedTerm: [{ |
|||
required: true, |
|||
message: '合作有效期不能为空', |
|||
trigger: 'change' |
|||
}], |
|||
creditGranting: [{ |
|||
required: true, |
|||
message: '授信金额不能为空', |
|||
trigger: 'change' |
|||
}], |
|||
businessLicenseFile: [{ |
|||
required: true, |
|||
message: '营业执照不能为空', |
|||
trigger: 'change' |
|||
}], |
|||
agreementFile: [{ |
|||
required: true, |
|||
message: '合作协议不能为空', |
|||
trigger: 'change' |
|||
}] |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
console.log('url:' + window.location.href) |
|||
var one = window.location.href.indexOf('&data') + 6 |
|||
const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用 |
|||
const obj = JSON.parse(decodeURIComponent(data)) |
|||
this.showInfo(obj.businessSid) |
|||
}, |
|||
mounted() { |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 告诉父级页面,子页面的弹框高度。 |
|||
code: 2, |
|||
data: 500 + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
methods: { |
|||
showInfo(sid) { |
|||
this.viewTitle = '【编辑】合作二级站备案申请' |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
req.fetchDetailsBySid(sid).then((res) => { |
|||
if (res.success) { |
|||
this.formobj = res.data |
|||
this.formobj.instanceId = res.data.procInstId |
|||
} |
|||
}) |
|||
}, |
|||
saveOrUpdate() { |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.saveOrUpdate(this.formobj).then((res) => { |
|||
if (res.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: '保存成功' |
|||
}) |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
submit() { |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.submit(this.formobj).then((res) => { |
|||
if (res.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: '提交成功' |
|||
}) |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|||
margin-left: 120px !important; |
|||
width: calc(100% - 115px); |
|||
} |
|||
|
|||
/deep/ .el-form-item__error { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.titleOne { |
|||
padding: 7px; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
|
|||
/*表格列设置fixed后固定列出现下边框的设置*/ |
|||
/deep/ .el-table__fixed { |
|||
height: 100% !important; |
|||
} |
|||
|
|||
/*表格列设置fixed后固定列出现下边框的设置*/ |
|||
/deep/ .el-table__fixed-right { |
|||
height: 100% !important; |
|||
} |
|||
</style> |
@ -0,0 +1,244 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div class="tab-header webtop"> |
|||
<div>合作二级站备案申请详情</div> |
|||
<div> |
|||
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button> |
|||
</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.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请日期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title">合作二级站基本信息</div> |
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">二级站点名称</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.siteName }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="16"> |
|||
<div class="span-sty">法定代表人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.legalPerson }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">手机号码</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.phone }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="16"> |
|||
<div class="span-sty">负责人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.directorName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">手机号码</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.directorPhone }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="16"> |
|||
<div class="span-sty">统一社会信用号码</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.unifiedCreditCode }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">证件有效期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.termValidity }}</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.address }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="16"> |
|||
<div class="span-sty">合作有效期至</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.limitedTerm }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">授信金额</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.creditGranting }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title">附件清单</div> |
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">营业执照</div> |
|||
<el-form-item><el-image class="addinputInfo" style="width: 150px;height: 150px" |
|||
v-for="(item, index) in formobj.businessLicenseFile" :key="index" :src="item.url" |
|||
:preview-src-list="[item.url]" /></el-form-item> |
|||
</el-col> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">合作协议</div> |
|||
<el-form-item><el-image class="addinputInfo" style="width: 150px;height: 150px" |
|||
v-for="(item, index) in formobj.agreementFile" :key="index" :src="item.url" |
|||
:preview-src-list="[item.url]" /></el-form-item> |
|||
</el-col> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">其他资料</div> |
|||
<el-form-item><el-image class="addinputInfo" style="width: 150px;height: 150px" |
|||
v-for="(item, index) in formobj.otherFile" :key="index" :src="item.url" |
|||
:preview-src-list="[item.url]" /></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/basicinformation/secondaryCooperativeStation' |
|||
export default { |
|||
name: 'SecondaryCooperativeStation', |
|||
data() { |
|||
return { |
|||
viewState: 1, |
|||
formobj: { |
|||
"sid": "", |
|||
"nodeState": "", |
|||
"procInstId": "", |
|||
"procDefId": "", |
|||
"taskId": "", |
|||
"nodeId": "", |
|||
"useOrgName": "", |
|||
"deptName": '', |
|||
"deptSid": '', |
|||
"createByName": '', |
|||
"createBySid": '', |
|||
"createOrgSid": '', |
|||
"createOrgName": '', |
|||
"remarks": "", |
|||
"finishTime": "", |
|||
"createTime": getCurrentDate(), |
|||
"siteName": "", |
|||
"legalPerson": "", |
|||
"phone": "", |
|||
"directorName": "", |
|||
"directorPhone": "", |
|||
"unifiedCreditCode": "", |
|||
"termValidity": "", |
|||
"address": "", |
|||
"limitedTerm": "", |
|||
"creditGranting": "", |
|||
"businessLicenseFile": [], |
|||
"agreementFile": [], |
|||
"otherFile": [], |
|||
|
|||
}, |
|||
// 环节所需参数 |
|||
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) // url解码unescape()已从web中移除,尽量不使用 |
|||
const obj = JSON.parse(decodeURIComponent(data)) |
|||
console.log('iframe页面获取的obj:', obj) |
|||
// 点击(同意、终止、驳回、驳回)操作时所需的参数 |
|||
this.linkByParameter.businessSid = obj.businessSid |
|||
this.linkByParameter.instanceId = obj.instanceId |
|||
this.linkByParameter.taskId = obj.taskId |
|||
this.linkByParameter.taskDefKey = obj.taskDefKey |
|||
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid') |
|||
// 加载表单数据 |
|||
this.showInfo(obj.businessSid) |
|||
}, |
|||
mounted() { |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 告诉父级页面,子页面的弹框高度。 |
|||
code: 2, |
|||
data: 400 + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
methods: { |
|||
showInfo(sid) { |
|||
req.fetchDetailsBySid(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 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
</style> |
@ -0,0 +1,530 @@ |
|||
<template> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<!-- 标题 --> |
|||
<div>旧件处理申请</div> |
|||
<!-- start 添加修改按钮 --> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="openCountersign('加签')">加 签</el-button> |
|||
<el-button type="primary" size="small" @click="openAgree('同意')">同 意</el-button> |
|||
<el-button type="danger" size="small" @click="openReject('驳回')">驳 回</el-button> |
|||
<el-button type="danger" size="small" @click="openStop('终止')">终 止</el-button> |
|||
</div> |
|||
<!-- end 添加修改按钮 --> |
|||
<!-- end 详情按钮 --> |
|||
</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> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请部门</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请日期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<el-row> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty">处理原因</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.handleReasonValue }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">处理方式</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.handleModeValue }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">收益总额</div> |
|||
<el-form-item><span class="addinputInfo">{{ totalQuantity }}</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> |
|||
|
|||
<el-row> |
|||
|
|||
<el-col :span="24"> |
|||
<div class="span-sty">附件</div> |
|||
<el-form-item class="trightb_item"> |
|||
<el-image style="width: 120px;height: 120px; margin: 10px;" class="addinputInfo" |
|||
v-for="(item,index) in formobj.filePaths" :src="item" :preview-src-list="[item]"> |
|||
</el-image> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<div class="title"> |
|||
<div>待处理旧件列表</div> |
|||
</div> |
|||
<el-table v-loading="listLoading" :data="formobj.asOldparthandleList" border> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" 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="manufacturerName" label="厂家" align="center" /> |
|||
<el-table-column prop="count" label="库存数量" align="center" /> |
|||
<el-table-column prop="profit" label="收益金额" align="center" /> |
|||
</el-table> |
|||
|
|||
</el-form> |
|||
|
|||
</div> |
|||
|
|||
<!-- 选择待办人 的弹出框--> |
|||
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%"> |
|||
<el-form class="formadd"> |
|||
<el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span class="icon">*</span>加签人员: |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item> |
|||
<el-select v-model="countersign.assignee" placeholder="请选择" filterable> |
|||
<el-option v-for="item in options" :key="item.userSid" :label="item.staffName" :value="item.userSid"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>当前环节:</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row :class="{rowClass:!currentLink}"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>意见:</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" |
|||
type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable></el-input></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div style="text-align:center;margin-top: 20px;"> |
|||
<el-button type="primary" size="mini" @click="reject">确 定</el-button> |
|||
<el-button type="info " size="mini" @click="nodeDialogVisible = false">取 消</el-button> |
|||
</div> |
|||
</el-form> |
|||
</el-dialog> |
|||
|
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/oldPartsCope.js' |
|||
import { |
|||
selectStaffListss |
|||
} from '@/api/Common/dictcommons' |
|||
export default { |
|||
data() { |
|||
return { |
|||
listLoading: false, |
|||
submitdisabled: false, |
|||
formobj: { |
|||
"sid": "", |
|||
"remarks": "", |
|||
"createBySid": "", |
|||
"createByName": "", |
|||
"createDeptSid": "", |
|||
"createDeptName": "", |
|||
"createTime": "", |
|||
"billNo": "", |
|||
"filePaths": [], |
|||
"useOrgSid": "", |
|||
"useOrgName": "", |
|||
"orgSidPath": "", |
|||
"procDefId": "", |
|||
"nodeId": "", |
|||
"procInstId": "", |
|||
"nodeState": "", |
|||
"taskId": "", |
|||
"finishTime": "", |
|||
"totalProfit": "", |
|||
"asOldparthandleList": [ |
|||
|
|||
] |
|||
}, |
|||
hideUploadBtn: false, |
|||
|
|||
imgList: [], |
|||
|
|||
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) // url解码unescape()已从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: 500 + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
computed: { |
|||
// 收益总额 |
|||
totalQuantity() { |
|||
let quantity = 0 |
|||
if (this.formobj.asOldparthandleList.length > 0) { |
|||
this.formobj.asOldparthandleList.forEach((e) => { |
|||
quantity += Number(e.profit) |
|||
}) |
|||
} |
|||
|
|||
this.formobj.totalProfit = quantity |
|||
|
|||
return quantity |
|||
}, |
|||
}, |
|||
methods: { |
|||
|
|||
indexMethod(index) { |
|||
return Number(index) + 1 |
|||
}, |
|||
|
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.imgList = [] |
|||
this.formobj = { |
|||
"sid": "", |
|||
"remarks": "", |
|||
"createBySid": "", |
|||
"createByName": "", |
|||
"createDeptSid": "", |
|||
"createDeptName": "", |
|||
"createTime": "", |
|||
"billNo": "", |
|||
"filePaths": [], |
|||
"useOrgSid": "", |
|||
"useOrgName": "", |
|||
"orgSidPath": "", |
|||
"procDefId": "", |
|||
"nodeId": "", |
|||
"procInstId": "", |
|||
"nodeState": "", |
|||
"taskId": "", |
|||
"finishTime": "", |
|||
"totalProfit": "", |
|||
"asOldparthandleList": [] |
|||
} |
|||
this.$emit('doback') |
|||
}, |
|||
|
|||
showInfo(sid) { |
|||
req.init(sid) |
|||
.then(resp => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
|
|||
for (var i = 0; i < resp.data.filePaths.length; i++) { |
|||
this.imgList.push({ |
|||
url: resp.data.filePaths[i].url |
|||
}) |
|||
} |
|||
|
|||
selectStaffListss().then((res) => { |
|||
if (res.success) { |
|||
this.options = res.data |
|||
} |
|||
}) |
|||
|
|||
} |
|||
}) |
|||
.catch(e => { |
|||
this.formobj = {} |
|||
}) |
|||
}, |
|||
|
|||
// 加签 |
|||
openCountersign(val) { |
|||
this.operation = val |
|||
this.currentLink = true |
|||
this.countersignLink = true |
|||
this.dialogList.comment = '' |
|||
req.getNextNodesForSubmit({ |
|||
taskDefKey: this.current.taskDefKey, |
|||
businessSid: this.linkByParameter.businessSid |
|||
}).then((resp) => { |
|||
if (resp.success) { |
|||
var arr = resp.data |
|||
this.nextNode = arr[0] |
|||
this.nodeDialogVisible = true |
|||
} |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
// 同意 |
|||
openAgree(val) { |
|||
this.operation = val |
|||
this.currentLink = true |
|||
this.countersignLink = false |
|||
this.dialogList.comment = '同意' |
|||
req.getNextNodesForSubmit({ |
|||
taskDefKey: this.current.taskDefKey, |
|||
businessSid: this.linkByParameter.businessSid |
|||
}).then((resp) => { |
|||
if (resp.success) { |
|||
var arr = resp.data |
|||
this.nextNode = arr[0] |
|||
this.nodeDialogVisible = true |
|||
} |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
// 驳回 |
|||
openReject(val) { |
|||
this.operation = val |
|||
this.currentLink = true |
|||
this.countersignLink = false |
|||
this.dialogList.comment = '' |
|||
req.getPreviousNodesForReject({ |
|||
taskDefKey: this.current.taskDefKey, |
|||
businessSid: this.linkByParameter.businessSid |
|||
}).then((resp) => { |
|||
if (resp.success) { |
|||
var arr = resp.data |
|||
this.nextNode = arr[0] |
|||
this.nodeDialogVisible = true |
|||
} |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
// 终止 |
|||
openStop(val) { |
|||
this.operation = val |
|||
this.currentLink = false |
|||
this.countersignLink = false |
|||
this.dialogList.comment = '' |
|||
this.nodeDialogVisible = true |
|||
}, |
|||
reject() { |
|||
if (this.operation === '同意') { |
|||
this.handleAgree() |
|||
} else if (this.operation === '驳回') { |
|||
if (this.dialogList.comment === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请填写审批意见' |
|||
}) |
|||
} else { |
|||
this.handleReject() |
|||
} |
|||
} else if (this.operation === '终止') { |
|||
if (this.dialogList.comment === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请填写审批意见' |
|||
}) |
|||
} else { |
|||
this.handleStop() |
|||
} |
|||
} else if (this.operation === '加签') { |
|||
this.handleCountersign() |
|||
} |
|||
}, |
|||
/** 加签 */ |
|||
handleCountersign() { |
|||
if (this.countersign.assignee === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请选择加签人员' |
|||
}) |
|||
return |
|||
} |
|||
if (this.dialogList.comment === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请填写审批意见' |
|||
}) |
|||
return |
|||
} |
|||
this.countersign.views = this.dialogList.comment |
|||
req.delegate(this.countersign).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 同意任务 */ |
|||
handleAgree() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.complete(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 驳回任务 */ |
|||
handleReject() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.reject(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 终止任务 */ |
|||
handleStop() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.breakProcess(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.rowClass { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
</style> |
@ -0,0 +1,649 @@ |
|||
<template> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<!-- 标题 --> |
|||
<div>{{title}}旧件处理申请</div> |
|||
<!-- start 添加修改按钮 --> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button> |
|||
</div> |
|||
<!-- end 添加修改按钮 --> |
|||
<!-- end 详情按钮 --> |
|||
</div> |
|||
<div class=""> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|||
<div class="title"> |
|||
<div>基础信息</div> |
|||
</div> |
|||
<el-row class="first_row"> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请部门</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
<!-- <el-col :span="12"> |
|||
<div class="span-sty">单据编号</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.billNo }}</span></el-form-item> |
|||
</el-col> --> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请日期</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span> |
|||
<!-- <el-date-picker v-model="formobj.createTime" class="addinputw addinputInfo" type="date" |
|||
value-format="yyyy-MM-dd" placeholder="选择日期"> |
|||
</el-date-picker> --> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<el-row> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 处理原因</div> |
|||
<el-form-item prop="handleReasonValue"> |
|||
<el-select v-model="formobj.handleReasonValue" placeholder="请选择" class="addinputw addinputInfo" |
|||
@change="selectHandleReason"> |
|||
<el-option v-for="(item,i) in handleReasonList" :key="i" :label="item.name" :value="item.sid"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 处理方式</div> |
|||
<el-form-item prop="handleModeValue"> |
|||
<el-select v-model="formobj.handleModeValue" placeholder="请选择" class="addinputw addinputInfo" |
|||
@change="selectHandleMode"> |
|||
<el-option v-for="(item,i) in handleModeList" :key="i" :label="item.name" :value="item.sid"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">收益总额</div> |
|||
<el-form-item><span class="addinputInfo">{{ totalQuantity }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<el-row> |
|||
|
|||
<el-col :span="24"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" type="textarea" |
|||
:rows="4" clearable /> |
|||
|
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<el-row> |
|||
|
|||
<el-col :span="24"> |
|||
<div class="span-sty"><span class="must">*</span> 附件</div> |
|||
<el-form-item prop="imgList"> |
|||
<upload-img ref="uploadImg" class="addinputw" v-model="imgList" :limit="50" bucket="map" |
|||
:upload-data="{ type: '0001' }" @change="backData" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<div class="title titleOne"> |
|||
<div>商品列表</div> |
|||
<el-button type="primary" size="mini" @click="importDetail()">选择旧件</el-button> |
|||
</div> |
|||
|
|||
<el-table v-loading="listLoading" :data="formobj.asOldparthandleList" border> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column fixed label="操作" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" @click="deleteAsOldparthandle(scope.row)">删除</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<!-- <el-table-column align="center" width="100" :render-header="commodityHeader"> |
|||
<template slot-scope="scope"> |
|||
<i class="el-icon-delete" @click="commodityDelete(scope.$index)"></i> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="商品名称" align="center" min-width="200"> |
|||
<template slot-scope="scope"> |
|||
<el-popover placement="right" width="900" trigger="click"> |
|||
<div> |
|||
<el-table :data="commodityData" v-loading="commodityLoading" highlight-current-row |
|||
@current-change="commodityCurrentChange($event, scope.row)"> |
|||
<el-table-column fixed 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="goodsSkuOwnSpec" label="规格" align="center" /> |
|||
<el-table-column prop="unit" label="单位" align="center" /> |
|||
</el-table> |
|||
<el-pagination :page.sync="commodityQuery.current" :page-size="commodityQuery.size" |
|||
layout="total, pager" :total="commodityQuery.total" /> |
|||
</div> |
|||
<el-input slot="reference" v-model="scope.row.goodsSkuName" |
|||
@input="commodityInput(scope.row.goodsSkuName)" clearable placeholder="商品名称" /> |
|||
</el-popover> |
|||
</template> |
|||
</el-table-column> --> |
|||
<!-- <el-table-column prop="vinNo" label="车架号" 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="manufacturerName" label="厂家" align="center" /> |
|||
<!-- <el-table-column prop="supplierName" 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="warehouseRackCode" label="库位" align="center" /> |
|||
<el-table-column label="数量" align="center" width="180"> |
|||
<template slot-scope="scope"> |
|||
<el-input ref="focusAssumptionInput" v-model="scope.row.count" clearable placeholder="" |
|||
@input="commodityComputeYHAndXSJE(scope.row)" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="profit" label="收益金额" align="center" /> |
|||
</el-table> |
|||
|
|||
</el-form> |
|||
|
|||
</div> |
|||
|
|||
<el-dialog title="选择旧件商品" :visible.sync="dialogVisible" :before-close="handleClose" |
|||
style="width:150%;margin-left: -20%;"> |
|||
|
|||
<el-form :inline="true" class="tab-header" style="margin-top: -30px;"> |
|||
<el-form-item label="商品ID"> |
|||
<el-input v-model="queryParams.params.goodsId" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="商品名称"> |
|||
<el-input v-model="queryParams.params.goodsName" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="商品编码"> |
|||
<el-input v-model="queryParams.params.goodsSkuCode" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<!-- <el-form-item label="仓库"> |
|||
<el-input v-model="queryParams.params.warehouseName" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="库位"> |
|||
<el-input v-model="queryParams.params.warehouseRackCode" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="供应商"> |
|||
<el-input v-model="queryParams.params.supplierName" placeholder="" clearable /> |
|||
</el-form-item> --> |
|||
<el-form-item label="厂家"> |
|||
<el-input v-model="queryParams.params.manufacturerName" placeholder="" clearable /> |
|||
</el-form-item> |
|||
</el-form> |
|||
|
|||
<div class="btn" style="text-align: center; margin-top: 20px;"> |
|||
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button> |
|||
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button> |
|||
</div> |
|||
|
|||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%;margin-top: 20px;" |
|||
@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 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="manufacturerName" label="厂家" align="center" /> |
|||
<el-table-column prop="vinNo" label="车架号" align="center" /> |
|||
<el-table-column prop="sourceBillNo" label="维修单号" align="center" /> |
|||
<!-- <el-table-column prop="warehouseName" label="仓库" align="center" /> |
|||
<el-table-column prop="warehouseRackCode" label="库位" align="center" /> |
|||
<el-table-column prop="supplierName" label="供应商" align="center" /> --> |
|||
<!-- <el-table-column prop="price" label="单价" align="center" /> --> |
|||
<el-table-column prop="count" label="库存数量" align="center" /> |
|||
</el-table> |
|||
<div class="pages"> |
|||
<div class="tit" /> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" |
|||
:limit.sync="queryParams.size" class="pagination" @pagination="importDetail" /> |
|||
|
|||
</div> |
|||
|
|||
<div class="btn" style="text-align: center; margin-top: 20px;"> |
|||
<el-button type="primary" size="mini" @click="addDialogList()">确认</el-button> |
|||
<el-button type="primary" size="mini" @click="handleClose()">关闭</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
|
|||
|
|||
|
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/oldPartsCope.js' |
|||
import uploadImg from '@/components/uploadFile/uploadImg' |
|||
import { |
|||
getOrgSidByPath |
|||
} from '@/api/Common/dictcommons' |
|||
import { |
|||
getCurrentDate |
|||
} from '@/utils/index.js' |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
export default { |
|||
components: { |
|||
Pagination, |
|||
pageye, |
|||
uploadImg |
|||
}, |
|||
data() { |
|||
return { |
|||
dialogVisible: false, |
|||
title: '【新增】', |
|||
orderInfo: {}, |
|||
tableLoading: false, |
|||
loadList: false, |
|||
listLoading: false, |
|||
submitdisabled: false, |
|||
formobj: { |
|||
"sid": "", |
|||
"remarks": "", |
|||
"createBySid": '', |
|||
"createByName": '', |
|||
"deptSid": '', |
|||
"deptName": '', |
|||
"createTime": getCurrentDate(), |
|||
"billNo": "", |
|||
"filePaths": [], |
|||
"useOrgSid": '', |
|||
"useOrgName": '', |
|||
"procDefId": "", |
|||
"nodeId": "", |
|||
"procInstId": "", |
|||
"nodeState": "", |
|||
"taskId": "", |
|||
"finishTime": "", |
|||
"totalProfit": "", |
|||
"asOldparthandleList": [ |
|||
|
|||
] |
|||
}, |
|||
hideUploadBtn: false, |
|||
imgList: [], |
|||
handleModeList: [{ |
|||
name: '处理方式1', |
|||
sid: "1" |
|||
}, |
|||
{ |
|||
name: '处理方式2', |
|||
sid: "2" |
|||
} |
|||
], |
|||
handleReasonList: [{ |
|||
name: '处理原因1', |
|||
sid: "1" |
|||
}, |
|||
{ |
|||
name: '处理原因2', |
|||
sid: "2" |
|||
} |
|||
], |
|||
selectionList: [], |
|||
queryParams: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
"goodsName": "", |
|||
"goodsSkuCode": "", |
|||
"warehouseName": "", |
|||
"warehouseRackCode": "", |
|||
"supplierName": "", |
|||
} |
|||
}, |
|||
dataList: [], |
|||
rules: { |
|||
// createTime: [{ |
|||
// required: true, |
|||
// message: '申请日期不能为空', |
|||
// trigger: 'change' |
|||
// }], |
|||
handleReasonValue: [{ |
|||
required: true, |
|||
message: '处理原因不能为空', |
|||
trigger: 'change' |
|||
}], |
|||
handleModeValue: [{ |
|||
required: true, |
|||
message: '处理方式不能为空', |
|||
trigger: 'change' |
|||
}], |
|||
filePaths: [{ |
|||
required: true, |
|||
message: '附件不能为空', |
|||
trigger: 'blur' |
|||
}], |
|||
}, |
|||
|
|||
|
|||
} |
|||
}, |
|||
|
|||
created() { |
|||
console.log('url:' + window.location.href) |
|||
var one = window.location.href.indexOf('&data') + 6 |
|||
const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用 |
|||
const obj = JSON.parse(decodeURIComponent(data)) |
|||
this.showInfo(obj.businessSid) |
|||
}, |
|||
mounted() { |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 告诉父级页面,子页面的弹框高度。 |
|||
code: 2, |
|||
data: 500 + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
|
|||
computed: { |
|||
// 收益总额 |
|||
totalQuantity() { |
|||
let quantity = 0 |
|||
if (this.formobj.asOldparthandleList.length > 0) { |
|||
this.formobj.asOldparthandleList.forEach((e) => { |
|||
quantity += Number(e.profit) |
|||
}) |
|||
} |
|||
|
|||
this.formobj.totalProfit = quantity |
|||
|
|||
return quantity |
|||
}, |
|||
}, |
|||
methods: { |
|||
selectHandleReason(val) { |
|||
console.log('>>>>>>>>>selectHandleReason', val) |
|||
const choose = this.handleReasonList.filter((item) => item.sid == val) |
|||
console.log('>>>>>>>>>selectHandleReason', choose) |
|||
this.formobj.handleReasonValue = choose[0].name |
|||
this.formobj.handleReasonKey = choose[0].sid |
|||
}, |
|||
selectHandleMode(val) { |
|||
const choose = this.handleModeList.filter((item) => item.sid == val) |
|||
console.log('>>>>>>>>>selectHandleMode', choose) |
|||
this.formobj.handleModeValue = choose[0].name |
|||
this.formobj.handleModeKey = choose[0].sid |
|||
}, |
|||
|
|||
|
|||
indexMethod(index) { |
|||
return Number(index) + 1 |
|||
}, |
|||
dosearch() { |
|||
this.queryParams.current = 1 |
|||
this.importDetail() |
|||
}, |
|||
resetQuery() { |
|||
this.queryParams = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
"goodsName": "", |
|||
"goodsSkuCode": "", |
|||
"warehouseName": "", |
|||
"warehouseRackCode": "", |
|||
"supplierName": "", |
|||
} |
|||
} |
|||
this.importDetail() |
|||
}, |
|||
|
|||
importDetail() { |
|||
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.handleGoodsListPage(this.queryParams).then((resp) => { |
|||
this.tableLoading = false |
|||
this.dialogVisible = true |
|||
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 |
|||
}) |
|||
|
|||
}, |
|||
selectionLineChangeHandle(val) { |
|||
this.selectionList = val |
|||
|
|||
}, |
|||
addDialogList() { |
|||
|
|||
for (var i = 0; i < this.selectionList.length; i++) { |
|||
|
|||
var item = { |
|||
count: this.selectionList[i].count, |
|||
goodsSkuCode: this.selectionList[i].goodsSkuCode, |
|||
goodsID: this.selectionList[i].goodsID, |
|||
goodsSpuSid: this.selectionList[i].goodsSpuSid, |
|||
goodsSkuSid: this.selectionList[i].goodsSkuSid, |
|||
goodsSpuName: this.selectionList[i].goodsSpuName, |
|||
goodsSkuTitle: this.selectionList[i].goodsSkuTitle, |
|||
goodsSkuOwnSpec: this.selectionList[i].goodsSkuOwnSpec, |
|||
mainSid: '', |
|||
sid: '', |
|||
supplierName: this.selectionList[i].supplierName, |
|||
unit: this.selectionList[i].unit, |
|||
vinNo: this.selectionList[i].vinNo, |
|||
warehouseName: this.selectionList[i].warehouseName, |
|||
warehouseRackCode: this.selectionList[i].warehouseRackCode, |
|||
warehouseRackSid: this.selectionList[i].warehouseRackSid, |
|||
warehouseSid: this.selectionList[i].warehouseSid, |
|||
price: this.selectionList[i].price, |
|||
sourceBillNo: this.selectionList[i].sourceBillNo, |
|||
manufacturerSid: this.selectionList[i].manufacturerSid, |
|||
manufacturerName: this.selectionList[i].manufacturerName, |
|||
supplierSid: this.selectionList[i].supplierSid, |
|||
supplierName: this.selectionList[i].supplierName, |
|||
profit: (Number(this.selectionList[i].count) * Number(this.selectionList[i].price)).toFixed(2) |
|||
} |
|||
|
|||
|
|||
this.formobj.asOldparthandleList.push(item) |
|||
} |
|||
this.dialogVisible = false |
|||
}, |
|||
handleClose() { |
|||
this.dialogVisible = false |
|||
}, |
|||
deleteAsOldparthandle(row) { |
|||
const index = this.formobj.asOldparthandleList.findIndex((item) => item === row) |
|||
console.log("index》》》》", index) |
|||
this.formobj.asOldparthandleList.splice(index, 1) |
|||
|
|||
}, |
|||
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() { |
|||
|
|||
|
|||
if (this.formobj.asOldparthandleList.length == 0) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'warning', |
|||
message: '旧件申请列表不能为空' |
|||
}) |
|||
return |
|||
} |
|||
|
|||
for (var i = 0; i < this.formobj.asOldparthandleList.length; i++) { |
|||
if (Number(this.formobj.asOldparthandleList[i].count) == 0) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'warning', |
|||
message: '旧件数量不能为空' |
|||
}) |
|||
return |
|||
} |
|||
} |
|||
|
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.submit(this.formobj).then((res) => { |
|||
if (res.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: '保存成功' |
|||
}) |
|||
// 子页面向父级页面传递值(关闭弹框) |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} |
|||
}) |
|||
|
|||
}, |
|||
|
|||
showAdd() { |
|||
this.title = "【新增】" |
|||
this.isUpdata = false |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
}, |
|||
showInfo(sid) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.title = "【修改】" |
|||
this.isUpdata = true |
|||
|
|||
req.init(sid) |
|||
.then(resp => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
|
|||
for (var i = 0; i < resp.data.filePaths.length; i++) { |
|||
this.imgList.push({ |
|||
url: resp.data.filePaths[i].url |
|||
}) |
|||
} |
|||
|
|||
} |
|||
}) |
|||
.catch(e => { |
|||
this.formobj = {} |
|||
}) |
|||
}, |
|||
|
|||
backData(value) { |
|||
console.log('backData》》》》', value) |
|||
console.log('imgList', this.imgList) |
|||
|
|||
for (var i = 0; i < this.imgList.length; i++) { |
|||
this.formobj.filePaths.push(this.imgList[i].url) |
|||
} |
|||
|
|||
|
|||
}, |
|||
commodityComputeYHAndXSJE(row) { |
|||
console.log('commodityComputeYHAndXSJE》》》》', row) |
|||
row.profit = (Number(row.count) * Number(row.price)).toFixed(2) |
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
/deep/ .el-form-item__error { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.must { |
|||
color: #f00; |
|||
} |
|||
|
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|||
margin-left: 120px !important; |
|||
width: calc(100% - 115px); |
|||
} |
|||
|
|||
.first_row { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
|
|||
.titleOne { |
|||
padding: 7px; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
</style> |
@ -0,0 +1,302 @@ |
|||
<template> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<!-- 标题 --> |
|||
<div>旧件处理申请</div> |
|||
<!-- start 添加修改按钮 --> |
|||
<div> |
|||
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button> |
|||
</div> |
|||
<!-- end 添加修改按钮 --> |
|||
<!-- end 详情按钮 --> |
|||
</div> |
|||
<div class=""> |
|||
<el-form ref="form_obj" :model="formobj" class="formaddcopy02"> |
|||
<div class="title"> |
|||
<div>基础信息</div> |
|||
</div> |
|||
<el-row class="first_row"> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请部门</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
|
|||
<!-- <el-col :span="12"> |
|||
<div class="span-sty">单据编号</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.billNo }}</span></el-form-item> |
|||
</el-col> --> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请日期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<el-row> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty">处理原因</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.handleReasonValue }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">处理方式</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.handleModeValue }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">收益总额</div> |
|||
<el-form-item><span class="addinputInfo">{{ totalQuantity }}</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> |
|||
|
|||
<el-row> |
|||
|
|||
<el-col :span="24"> |
|||
<div class="span-sty">附件</div> |
|||
<el-form-item class="trightb_item"> |
|||
<el-image style="width: 120px;height: 120px; margin: 10px;" class="addinputInfo" |
|||
v-for="(item,index) in formobj.filePaths" :src="item" :preview-src-list="[item]"> |
|||
</el-image> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<div class="title"> |
|||
<div>待处理旧件列表</div> |
|||
</div> |
|||
<el-table v-loading="listLoading" :data="formobj.asOldparthandleList" border> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<!-- <el-table-column prop="vinNo" label="车架号" 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="supplierName" label="供应商" align="center" /> --> |
|||
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" /> |
|||
<el-table-column prop="unit" label="单位" align="center" /> |
|||
<el-table-column prop="manufacturerName" label="厂家" align="center" /> |
|||
<!-- <el-table-column prop="vinNo" label="车架号" align="center" /> --> |
|||
<!-- <el-table-column prop="sourceBillNo" label="维修单号" align="center" /> --> |
|||
<!-- <el-table-column prop="warehouseName" label="仓库" align="center" /> |
|||
<el-table-column prop="warehouseRackCode" label="库位" align="center" /> |
|||
<el-table-column prop="supplierName" label="供应商" align="center" /> --> |
|||
<!-- <el-table-column prop="price" label="单价" align="center" /> --> |
|||
<el-table-column prop="count" label="库存数量" align="center" /> |
|||
<el-table-column prop="profit" label="收益金额" align="center" /> |
|||
</el-table> |
|||
|
|||
</el-form> |
|||
|
|||
</div> |
|||
|
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/oldPartsCope.js' |
|||
export default { |
|||
data() { |
|||
return { |
|||
listLoading: false, |
|||
submitdisabled: false, |
|||
formobj: { |
|||
"sid": "", |
|||
"remarks": "", |
|||
"createBySid": "", |
|||
"createByName": "", |
|||
"createDeptSid": "", |
|||
"createDeptName": "", |
|||
"createTime": "", |
|||
"billNo": "", |
|||
"filePaths": [], |
|||
"useOrgSid": "", |
|||
"useOrgName": "", |
|||
"orgSidPath": "", |
|||
"procDefId": "", |
|||
"nodeId": "", |
|||
"procInstId": "", |
|||
"nodeState": "", |
|||
"taskId": "", |
|||
"finishTime": "", |
|||
"totalProfit": "", |
|||
"asOldparthandleList": [ |
|||
|
|||
] |
|||
}, |
|||
hideUploadBtn: false, |
|||
imgList: [], |
|||
// 环节所需参数 |
|||
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) // url解码unescape()已从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' |
|||
} |
|||
}, '*') |
|||
}, |
|||
computed: { |
|||
// 收益总额 |
|||
totalQuantity() { |
|||
let quantity = 0 |
|||
if (this.formobj.asOldparthandleList.length > 0) { |
|||
this.formobj.asOldparthandleList.forEach((e) => { |
|||
quantity += Number(e.profit) |
|||
}) |
|||
} |
|||
|
|||
this.formobj.totalProfit = quantity |
|||
|
|||
return quantity |
|||
}, |
|||
}, |
|||
methods: { |
|||
|
|||
indexMethod(index) { |
|||
return Number(index) + 1 |
|||
}, |
|||
|
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.imgList = [] |
|||
this.formobj = { |
|||
"sid": "", |
|||
"remarks": "", |
|||
"createBySid": "", |
|||
"createByName": "", |
|||
"createDeptSid": "", |
|||
"createDeptName": "", |
|||
"createTime": "", |
|||
"billNo": "", |
|||
"filePaths": [], |
|||
"useOrgSid": "", |
|||
"useOrgName": "", |
|||
"orgSidPath": "", |
|||
"procDefId": "", |
|||
"nodeId": "", |
|||
"procInstId": "", |
|||
"nodeState": "", |
|||
"taskId": "", |
|||
"finishTime": "", |
|||
"totalProfit": "", |
|||
"asOldparthandleList": [] |
|||
} |
|||
this.$emit('doback') |
|||
}, |
|||
|
|||
showAdd() {}, |
|||
showInfo(sid) { |
|||
var params = { |
|||
sid: row.sid |
|||
} |
|||
|
|||
req.init(sid) |
|||
.then(resp => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
|
|||
for (var i = 0; i < resp.data.filePaths.length; i++) { |
|||
this.imgList.push({ |
|||
url: resp.data.filePaths[i].url |
|||
}) |
|||
} |
|||
|
|||
} |
|||
}) |
|||
.catch(e => { |
|||
this.formobj = {} |
|||
}) |
|||
}, |
|||
/** 确认撤回任务 */ |
|||
openRevoke() { |
|||
this.$confirm('是否确认执行撤回操作', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.handleRevoke() |
|||
}).catch(() => { |
|||
this.$message({ |
|||
type: 'info', |
|||
message: '已取消撤回' |
|||
}) |
|||
}) |
|||
}, |
|||
/** 撤回任务 */ |
|||
handleRevoke() { |
|||
req.revokeProcess(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
</style> |
@ -0,0 +1,448 @@ |
|||
<template> |
|||
<div> |
|||
|
|||
<div class="tab-header webtop"> |
|||
<!-- 标题 --> |
|||
<div>旧件盘亏出库申请单详情</div> |
|||
<!-- start 添加修改按钮 --> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="openCountersign('加签')">加 签</el-button> |
|||
<el-button type="primary" size="small" @click="openAgree('同意')">同 意</el-button> |
|||
<el-button type="danger" size="small" @click="openReject('驳回')">驳 回</el-button> |
|||
<el-button type="danger" size="small" @click="openStop('终止')">终 止</el-button> |
|||
</div> |
|||
<!-- end 添加修改按钮 --> |
|||
<!-- end 详情按钮 --> |
|||
</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="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请部门</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请日期</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">盘点单号</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">业务类型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.businessValue }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.remarks }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<div class="title"> |
|||
<div>旧件列表</div> |
|||
</div> |
|||
|
|||
<el-table v-loading="listLoading" :data="formobj.goodsList" border> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column label="商品名称" prop="goodsName" align="center" /> |
|||
<el-table-column label="商品编码" prop="goodsCode" align="center" /> |
|||
<el-table-column label="规格" prop="goodsSpec" align="center" /> |
|||
<el-table-column label="单位" prop="unit" align="center" /> |
|||
<el-table-column label="仓库" prop="warehouseName" align="center" /> |
|||
<el-table-column label="库位" prop="warehouseRackName" align="center" /> |
|||
<el-table-column label="入库单价" prop="inStoragePrice" align="center" /> |
|||
<el-table-column label="盘亏数量" prop="pkNum" align="center" /> |
|||
<el-table-column label="出库数量" prop="outStorageNum" align="center" /> |
|||
<el-table-column label="金额" align="center"> |
|||
<template #default="scope"> |
|||
{{ totalQuantity(scope.row) }} |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
</el-form> |
|||
</div> |
|||
|
|||
<!-- 选择待办人 的弹出框--> |
|||
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%"> |
|||
<el-form class="formadd"> |
|||
<el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span class="icon">*</span>加签人员: |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item> |
|||
<el-select v-model="countersign.assignee" placeholder="请选择" filterable> |
|||
<el-option v-for="item in options" :key="item.userSid" :label="item.staffName" :value="item.userSid"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>当前环节:</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row :class="{rowClass:!currentLink}"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>意见:</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" |
|||
type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable></el-input></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div style="text-align:center;margin-top: 20px;"> |
|||
<el-button type="primary" size="mini" @click="reject">确 定</el-button> |
|||
<el-button type="info " size="mini" @click="nodeDialogVisible = false">取 消</el-button> |
|||
</div> |
|||
</el-form> |
|||
</el-dialog> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/oldpPartStocktakingLoss.js' |
|||
import { |
|||
selectStaffListss |
|||
} from '@/api/Common/dictcommons' |
|||
export default { |
|||
components: {}, |
|||
data() { |
|||
return { |
|||
listLoading: false, |
|||
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) // url解码unescape()已从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: 500 + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
|
|||
computed: { |
|||
// 商品金额 |
|||
totalQuantity() { |
|||
return function(row) { |
|||
row.money = (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2) |
|||
return (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2) |
|||
} |
|||
}, |
|||
}, |
|||
|
|||
methods: { |
|||
|
|||
showInfo(sid) { |
|||
req.fetchDetailsBySid(sid) |
|||
.then(resp => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
|
|||
} |
|||
}) |
|||
.catch(e => { |
|||
this.formobj = {} |
|||
}) |
|||
|
|||
selectStaffListss().then((res) => { |
|||
if (res.success) { |
|||
this.options = res.data |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
// 序号 |
|||
indexMethod(index) { |
|||
return index + 1 |
|||
}, |
|||
|
|||
// 加签 |
|||
openCountersign(val) { |
|||
this.operation = val |
|||
this.currentLink = true |
|||
this.countersignLink = true |
|||
this.dialogList.comment = '' |
|||
req.getNextNodesForSubmit({ |
|||
taskDefKey: this.current.taskDefKey, |
|||
businessSid: this.linkByParameter.businessSid |
|||
}).then((resp) => { |
|||
if (resp.success) { |
|||
var arr = resp.data |
|||
this.nextNode = arr[0] |
|||
this.nodeDialogVisible = true |
|||
} |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
// 同意 |
|||
openAgree(val) { |
|||
this.operation = val |
|||
this.currentLink = true |
|||
this.countersignLink = false |
|||
this.dialogList.comment = '同意' |
|||
req.getNextNodesForSubmit({ |
|||
taskDefKey: this.current.taskDefKey, |
|||
businessSid: this.linkByParameter.businessSid |
|||
}).then((resp) => { |
|||
if (resp.success) { |
|||
var arr = resp.data |
|||
this.nextNode = arr[0] |
|||
this.nodeDialogVisible = true |
|||
} |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
// 驳回 |
|||
openReject(val) { |
|||
this.operation = val |
|||
this.currentLink = true |
|||
this.countersignLink = false |
|||
this.dialogList.comment = '' |
|||
req.getPreviousNodesForReject({ |
|||
taskDefKey: this.current.taskDefKey, |
|||
businessSid: this.linkByParameter.businessSid |
|||
}).then((resp) => { |
|||
if (resp.success) { |
|||
var arr = resp.data |
|||
this.nextNode = arr[0] |
|||
this.nodeDialogVisible = true |
|||
} |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
// 终止 |
|||
openStop(val) { |
|||
this.operation = val |
|||
this.currentLink = false |
|||
this.countersignLink = false |
|||
this.dialogList.comment = '' |
|||
this.nodeDialogVisible = true |
|||
}, |
|||
reject() { |
|||
if (this.operation === '同意') { |
|||
this.handleAgree() |
|||
} else if (this.operation === '驳回') { |
|||
if (this.dialogList.comment === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请填写审批意见' |
|||
}) |
|||
} else { |
|||
this.handleReject() |
|||
} |
|||
} else if (this.operation === '终止') { |
|||
if (this.dialogList.comment === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请填写审批意见' |
|||
}) |
|||
} else { |
|||
this.handleStop() |
|||
} |
|||
} else if (this.operation === '加签') { |
|||
this.handleCountersign() |
|||
} |
|||
}, |
|||
/** 加签 */ |
|||
handleCountersign() { |
|||
if (this.countersign.assignee === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请选择加签人员' |
|||
}) |
|||
return |
|||
} |
|||
if (this.dialogList.comment === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请填写审批意见' |
|||
}) |
|||
return |
|||
} |
|||
this.countersign.views = this.dialogList.comment |
|||
req.delegate(this.countersign).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 同意任务 */ |
|||
handleAgree() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.complete(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 驳回任务 */ |
|||
handleReject() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.reject(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 终止任务 */ |
|||
handleStop() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.breakProcess(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.rowClass { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
</style> |
@ -0,0 +1,374 @@ |
|||
<template> |
|||
<div> |
|||
|
|||
<div class="tab-header webtop"> |
|||
<!-- 标题 --> |
|||
<div>{{title}}旧件盘亏出库申请单</div> |
|||
<!-- start 添加修改按钮 --> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button> |
|||
</div> |
|||
<!-- end 添加修改按钮 --> |
|||
<!-- end 详情按钮 --> |
|||
</div> |
|||
|
|||
<div class=""> |
|||
|
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请人</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请部门</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 申请日期</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 盘点单号</div> |
|||
<el-form-item prop="sourceBillNo"> |
|||
<el-select v-model="formobj.sourceBillNo" filterable clearable placeholder="请选择" |
|||
class="addinputw addinputInfo" @change="selectSourceBillNo"> |
|||
<el-option v-for="item in sourceBillNoList" :key="item.billSid" :label="item.billNo" |
|||
:value="item.billSid"> |
|||
</el-option> |
|||
</el-select> |
|||
|
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">业务类型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.businessValue }}</span></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-col> |
|||
|
|||
</el-row> |
|||
|
|||
<div class="title"> |
|||
<div>旧件列表</div> |
|||
</div> |
|||
|
|||
<el-table v-loading="listLoading" :data="formobj.goodsList" border> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column fixed label="操作" wid align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" @click="doDelGoods(scope.row)">删除</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="商品ID" prop="goodsID" align="center" /> |
|||
<el-table-column label="商品名称" prop="goodsName" align="center" /> |
|||
<el-table-column label="商品编码" prop="goodsCode" align="center" /> |
|||
<el-table-column label="规格" prop="goodsSpec" align="center" /> |
|||
<el-table-column label="单位" prop="unit" align="center" /> |
|||
<el-table-column label="仓库" prop="warehouseName" align="center" /> |
|||
<el-table-column label="库位" prop="warehouseRackName" align="center" /> |
|||
<el-table-column label="入库单价" prop="inStoragePrice" align="center" /> |
|||
<el-table-column label="盘亏数量" prop="pkNum" align="center" /> |
|||
<el-table-column label="出库数量" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-input ref="focusAssumptionInput" v-model="scope.row.outStorageNum" |
|||
@input="commodityComputeYHAndXSJE3(scope.row)" clearable placeholder="" |
|||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="金额" align="center"> |
|||
<template #default="scope"> |
|||
{{ totalQuantity(scope.row) }} |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
</el-form> |
|||
|
|||
</div> |
|||
|
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/oldpPartStocktakingLoss.js' |
|||
import { |
|||
getCurrentDate |
|||
} from '@/utils/index.js' |
|||
import { |
|||
getOrgSidByPath, |
|||
} from '@/api/Common/dictcommons' |
|||
|
|||
export default { |
|||
components: {}, |
|||
data() { |
|||
return { |
|||
title: "【新增】", |
|||
listLoading: false, |
|||
submitdisabled: false, |
|||
formobj: { |
|||
"sid": "", |
|||
"createBySid": '', |
|||
"createByName": '', |
|||
"deptName": '', |
|||
"deptSid": '', |
|||
"createTime": getCurrentDate(), |
|||
"sourceBillNo": "", |
|||
"sourceBillSid": "", |
|||
"businessKey": "14", |
|||
"businessValue": "盘亏出库", |
|||
"remarks": "", |
|||
"warehouseTypeKey": "02", |
|||
"warehouseTypeValue": "旧件库", |
|||
"goodsList": [], |
|||
}, |
|||
hideUploadBtn: false, |
|||
sourceBillNoList: [], |
|||
rules: { |
|||
sourceBillNo: [{ |
|||
required: true, |
|||
message: '请选择盘点单号', |
|||
trigger: 'change' |
|||
}], |
|||
|
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
console.log('url:' + window.location.href) |
|||
var one = window.location.href.indexOf('&data') + 6 |
|||
const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用 |
|||
const obj = JSON.parse(decodeURIComponent(data)) |
|||
this.showInfo(obj.businessSid) |
|||
}, |
|||
mounted() { |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 告诉父级页面,子页面的弹框高度。 |
|||
code: 2, |
|||
data: 500 + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
computed: { |
|||
// 商品金额 |
|||
totalQuantity() { |
|||
return function(row) { |
|||
row.money = (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2) |
|||
return (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2) |
|||
} |
|||
}, |
|||
}, |
|||
|
|||
methods: { |
|||
|
|||
indexMethod(index) { |
|||
return index + 1 |
|||
}, |
|||
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.goodsList.length == 0) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请添加商品' |
|||
}) |
|||
|
|||
return |
|||
} |
|||
|
|||
for (var i = 0; i < this.formobj.goodsList.length; i++) { |
|||
var item = this.formobj.goodsList[i] |
|||
if (Number(item.outStorageNum) == 0) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '商品出库数量不能为空' |
|||
}) |
|||
|
|||
return |
|||
} |
|||
|
|||
} |
|||
this.submitdisabled = true |
|||
req.submit(this.formobj).then((res) => { |
|||
if (res.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: '保存成功' |
|||
}) |
|||
// 子页面向父级页面传递值(关闭弹框) |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
showAdd() { |
|||
this.title = "【新增】" |
|||
this.init() |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
|
|||
}, |
|||
showInfo(sid) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.title = "【修改】" |
|||
req.fetchDetailsBySid(sid) |
|||
.then(resp => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
|
|||
this.formobj.warehouseTypeKey = "02" |
|||
this.formobj.warehouswarehouseTypeValueeTypeKey = "旧件库" |
|||
req.getSourceBillNoBySid({ |
|||
deptSid: this.formobj.deptSid, |
|||
warehouseTypeKey: "02" |
|||
}).then((resp) => { |
|||
if (resp.success) { |
|||
this.sourceBillNoList = resp.data |
|||
} |
|||
}) |
|||
|
|||
} |
|||
}) |
|||
.catch(e => { |
|||
this.formobj = {} |
|||
}) |
|||
}, |
|||
|
|||
selectSourceBillNo(val) { |
|||
console.log("selectSourceBillNo", val); |
|||
|
|||
const choose = this.sourceBillNoList.filter((item) => item.billSid == val) |
|||
console.log('>>>>>>>>>selectSourceBillNo', choose) |
|||
this.formobj.sourceBillNo = choose[0].billNo |
|||
this.formobj.sourceBillSid = choose[0].billSid |
|||
|
|||
this.getSourceBillGoods(this.formobj.sourceBillSid) |
|||
|
|||
}, |
|||
getSourceBillGoods(sid) { |
|||
|
|||
req.sourceBillBySid(sid).then((resp) => { |
|||
if (resp.success) { |
|||
this.formobj.goodsList = resp.data |
|||
} |
|||
}) |
|||
|
|||
}, |
|||
|
|||
doDelGoods(row) { |
|||
console.log("doDelGoods", row); |
|||
const index = this.formobj.goodsList.findIndex((item) => item == row) |
|||
this.formobj.goodsList.splice(index, 1) |
|||
}, |
|||
|
|||
commodityComputeYHAndXSJE3(row) { |
|||
console.log("commodityComputeYHAndXSJE3", row); |
|||
|
|||
if (Number(row.outStorageNum) > Number(row.pkNum)) { |
|||
row.outStorageNum = Number(row.pkNum) |
|||
} |
|||
|
|||
row.money = (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2) |
|||
|
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
/deep/ .el-form-item__error { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.must { |
|||
color: #f00; |
|||
} |
|||
|
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|||
margin-left: 120px !important; |
|||
width: calc(100% - 115px); |
|||
} |
|||
|
|||
.first_row { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
|
|||
.titleOne { |
|||
padding: 7px; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
</style> |
@ -0,0 +1,203 @@ |
|||
<template> |
|||
<div> |
|||
|
|||
<div class="tab-header webtop"> |
|||
<!-- 标题 --> |
|||
<div>旧件盘亏出库申请单详情</div> |
|||
<!-- start 添加修改按钮 --> |
|||
<div> |
|||
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button> |
|||
</div> |
|||
<!-- end 添加修改按钮 --> |
|||
<!-- end 详情按钮 --> |
|||
</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="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请部门</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请日期</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">盘点单号</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">业务类型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.businessValue }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.remarks }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<div class="title"> |
|||
<div>旧件列表</div> |
|||
</div> |
|||
|
|||
<el-table v-loading="listLoading" :data="formobj.goodsList" border> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column label="商品名称" prop="goodsName" align="center" /> |
|||
<el-table-column label="商品编码" prop="goodsCode" align="center" /> |
|||
<el-table-column label="规格" prop="goodsSpec" align="center" /> |
|||
<el-table-column label="单位" prop="unit" align="center" /> |
|||
<el-table-column label="仓库" prop="warehouseName" align="center" /> |
|||
<el-table-column label="库位" prop="warehouseRackName" align="center" /> |
|||
<el-table-column label="入库单价" prop="inStoragePrice" align="center" /> |
|||
<el-table-column label="盘亏数量" prop="pkNum" align="center" /> |
|||
<el-table-column label="出库数量" prop="outStorageNum" align="center" /> |
|||
<el-table-column label="金额" align="center"> |
|||
<template #default="scope"> |
|||
{{ totalQuantity(scope.row) }} |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
</el-form> |
|||
</div> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/oldpPartStocktakingLoss.js' |
|||
|
|||
export default { |
|||
components: {}, |
|||
data() { |
|||
return { |
|||
listLoading: false, |
|||
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) // url解码unescape()已从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' |
|||
} |
|||
}, '*') |
|||
}, |
|||
computed: { |
|||
// 商品金额 |
|||
totalQuantity() { |
|||
return function(row) { |
|||
row.money = (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2) |
|||
return (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2) |
|||
} |
|||
}, |
|||
}, |
|||
|
|||
methods: { |
|||
|
|||
showInfo(sid) { |
|||
req.fetchDetailsBySid(sid) |
|||
.then(resp => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
|
|||
} |
|||
}) |
|||
.catch(e => { |
|||
this.formobj = {} |
|||
}) |
|||
}, |
|||
|
|||
// 序号 |
|||
indexMethod(index) { |
|||
return index + 1 |
|||
}, |
|||
|
|||
/** 确认撤回任务 */ |
|||
openRevoke() { |
|||
this.$confirm('是否确认执行撤回操作', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.handleRevoke() |
|||
}).catch(() => { |
|||
this.$message({ |
|||
type: 'info', |
|||
message: '已取消撤回' |
|||
}) |
|||
}) |
|||
}, |
|||
/** 撤回任务 */ |
|||
handleRevoke() { |
|||
req.revokeProcess(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
</style> |
@ -0,0 +1,446 @@ |
|||
<template> |
|||
<div> |
|||
|
|||
<div class="tab-header webtop"> |
|||
<!-- 标题 --> |
|||
<div>旧件盘盈入库申请单详情</div> |
|||
<!-- start 添加修改按钮 --> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="openCountersign('加签')">加 签</el-button> |
|||
<el-button type="primary" size="small" @click="openAgree('同意')">同 意</el-button> |
|||
<el-button type="danger" size="small" @click="openReject('驳回')">驳 回</el-button> |
|||
<el-button type="danger" size="small" @click="openStop('终止')">终 止</el-button> |
|||
</div> |
|||
<!-- end 添加修改按钮 --> |
|||
<!-- end 详情按钮 --> |
|||
</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="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请部门</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请日期</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">盘点单号</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">业务类型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.businessValue }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.remarks }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<div class="title"> |
|||
<div>旧件列表</div> |
|||
</div> |
|||
|
|||
<el-table v-loading="listLoading" :data="formobj.goodsList" border> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column label="商品名称" prop="goodsName" align="center" /> |
|||
<el-table-column label="商品编码" prop="goodsCode" align="center" /> |
|||
<el-table-column label="规格" prop="goodsSpec" align="center" /> |
|||
<el-table-column label="单位" prop="unit" align="center" /> |
|||
<el-table-column label="盘盈数量" prop="pyNum" align="center" /> |
|||
<el-table-column label="供应商" prop="supplierName" align="center" /> |
|||
<el-table-column label="入库单价" prop="inStoragePrice" align="center" /> |
|||
<el-table-column label="入库数量" prop="inStorageNum" align="center" /> |
|||
<el-table-column label="金额" align="center"> |
|||
<template #default="scope"> |
|||
{{ totalQuantity(scope.row) }} |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
</el-table> |
|||
|
|||
</el-form> |
|||
</div> |
|||
|
|||
<!-- 选择待办人 的弹出框--> |
|||
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%"> |
|||
<el-form class="formadd"> |
|||
<el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span class="icon">*</span>加签人员: |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item> |
|||
<el-select v-model="countersign.assignee" placeholder="请选择" filterable> |
|||
<el-option v-for="item in options" :key="item.userSid" :label="item.staffName" :value="item.userSid"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>当前环节:</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row :class="{rowClass:!currentLink}"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>意见:</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" |
|||
type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable></el-input></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div style="text-align:center;margin-top: 20px;"> |
|||
<el-button type="primary" size="mini" @click="reject">确 定</el-button> |
|||
<el-button type="info " size="mini" @click="nodeDialogVisible = false">取 消</el-button> |
|||
</div> |
|||
</el-form> |
|||
</el-dialog> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/oldpPartStocktakingSurplus.js' |
|||
import { |
|||
selectStaffListss |
|||
} from '@/api/Common/dictcommons' |
|||
export default { |
|||
components: {}, |
|||
data() { |
|||
return { |
|||
listLoading: false, |
|||
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) // url解码unescape()已从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: 500 + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
computed: { |
|||
// 商品金额 |
|||
totalQuantity() { |
|||
return function(row) { |
|||
row.money = (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2) |
|||
return (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2) |
|||
} |
|||
}, |
|||
}, |
|||
methods: { |
|||
|
|||
showInfo(sid) { |
|||
req.fetchDetailsBySid(sid) |
|||
.then(resp => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
|
|||
} |
|||
}) |
|||
.catch(e => { |
|||
this.formobj = {} |
|||
}) |
|||
|
|||
selectStaffListss().then((res) => { |
|||
if (res.success) { |
|||
this.options = res.data |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
// 序号 |
|||
indexMethod(index) { |
|||
return index + 1 |
|||
}, |
|||
|
|||
// 加签 |
|||
openCountersign(val) { |
|||
this.operation = val |
|||
this.currentLink = true |
|||
this.countersignLink = true |
|||
this.dialogList.comment = '' |
|||
req.getNextNodesForSubmit({ |
|||
taskDefKey: this.current.taskDefKey, |
|||
businessSid: this.linkByParameter.businessSid |
|||
}).then((resp) => { |
|||
if (resp.success) { |
|||
var arr = resp.data |
|||
this.nextNode = arr[0] |
|||
this.nodeDialogVisible = true |
|||
} |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
// 同意 |
|||
openAgree(val) { |
|||
this.operation = val |
|||
this.currentLink = true |
|||
this.countersignLink = false |
|||
this.dialogList.comment = '同意' |
|||
req.getNextNodesForSubmit({ |
|||
taskDefKey: this.current.taskDefKey, |
|||
businessSid: this.linkByParameter.businessSid |
|||
}).then((resp) => { |
|||
if (resp.success) { |
|||
var arr = resp.data |
|||
this.nextNode = arr[0] |
|||
this.nodeDialogVisible = true |
|||
} |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
// 驳回 |
|||
openReject(val) { |
|||
this.operation = val |
|||
this.currentLink = true |
|||
this.countersignLink = false |
|||
this.dialogList.comment = '' |
|||
req.getPreviousNodesForReject({ |
|||
taskDefKey: this.current.taskDefKey, |
|||
businessSid: this.linkByParameter.businessSid |
|||
}).then((resp) => { |
|||
if (resp.success) { |
|||
var arr = resp.data |
|||
this.nextNode = arr[0] |
|||
this.nodeDialogVisible = true |
|||
} |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
// 终止 |
|||
openStop(val) { |
|||
this.operation = val |
|||
this.currentLink = false |
|||
this.countersignLink = false |
|||
this.dialogList.comment = '' |
|||
this.nodeDialogVisible = true |
|||
}, |
|||
reject() { |
|||
if (this.operation === '同意') { |
|||
this.handleAgree() |
|||
} else if (this.operation === '驳回') { |
|||
if (this.dialogList.comment === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请填写审批意见' |
|||
}) |
|||
} else { |
|||
this.handleReject() |
|||
} |
|||
} else if (this.operation === '终止') { |
|||
if (this.dialogList.comment === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请填写审批意见' |
|||
}) |
|||
} else { |
|||
this.handleStop() |
|||
} |
|||
} else if (this.operation === '加签') { |
|||
this.handleCountersign() |
|||
} |
|||
}, |
|||
/** 加签 */ |
|||
handleCountersign() { |
|||
if (this.countersign.assignee === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请选择加签人员' |
|||
}) |
|||
return |
|||
} |
|||
if (this.dialogList.comment === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请填写审批意见' |
|||
}) |
|||
return |
|||
} |
|||
this.countersign.views = this.dialogList.comment |
|||
req.delegate(this.countersign).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 同意任务 */ |
|||
handleAgree() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.complete(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 驳回任务 */ |
|||
handleReject() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.reject(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 终止任务 */ |
|||
handleStop() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.breakProcess(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.rowClass { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
</style> |
@ -0,0 +1,426 @@ |
|||
<template> |
|||
<div> |
|||
|
|||
<div class="tab-header webtop"> |
|||
<!-- 标题 --> |
|||
<div>{{title}}旧件盘盈入库申请单</div> |
|||
<!-- start 添加修改按钮 --> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button> |
|||
</div> |
|||
<!-- end 添加修改按钮 --> |
|||
<!-- end 详情按钮 --> |
|||
</div> |
|||
|
|||
<div class=""> |
|||
|
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请人</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请部门</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 申请日期</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 盘点单号</div> |
|||
<el-form-item prop="sourceBillNo"> |
|||
<el-select v-model="formobj.sourceBillNo" filterable clearable placeholder="请选择" |
|||
class="addinputw addinputInfo" @change="selectSourceBillNo"> |
|||
<el-option v-for="item in sourceBillNoList" :key="item.billSid" :label="item.billNo" |
|||
:value="item.billSid"> |
|||
</el-option> |
|||
</el-select> |
|||
|
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">业务类型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.businessValue }}</span></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-col> |
|||
|
|||
</el-row> |
|||
|
|||
<div class="title"> |
|||
<div>旧件列表</div> |
|||
</div> |
|||
|
|||
<el-table v-loading="listLoading" :data="formobj.goodsList" border> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column fixed label="操作" wid align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" @click="doDelGoods(scope.row)">删除</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="商品名称" prop="goodsName" align="center" /> |
|||
<el-table-column label="商品编码" prop="goodsCode" align="center" /> |
|||
<el-table-column label="规格" prop="goodsSpec" align="center" /> |
|||
<el-table-column label="单位" prop="unit" align="center" /> |
|||
<el-table-column label="盘盈数量" prop="pyNum" align="center" /> |
|||
<el-table-column label="供应商" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-select v-model="scope.row.supplierName" clearable placeholder="请选择" |
|||
@change="selectSupplierName(scope.row,$event)"> |
|||
<el-option v-for="(item,i) in supplierList" :key="i" :label="item.supplierName" :value="item.sid"> |
|||
</el-option> |
|||
</el-select> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="入库单价" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-input ref="focusAssumptionInput" @input="commodityComputeYHAndXSJE3(scope.row)" |
|||
v-model="scope.row.inStoragePrice" clearable placeholder="" |
|||
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="入库数量" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-input ref="focusAssumptionInput" v-model="scope.row.inStorageNum" |
|||
@input="commodityComputeYHAndXSJE3(scope.row)" clearable placeholder="" |
|||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="金额" align="center"> |
|||
<template #default="scope"> |
|||
{{ totalQuantity(scope.row) }} |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
</el-table> |
|||
|
|||
</el-form> |
|||
|
|||
</div> |
|||
|
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/oldpPartStocktakingSurplus.js' |
|||
import { |
|||
getCurrentDate |
|||
} from '@/utils/index.js' |
|||
import { |
|||
getOrgSidByPath, |
|||
choiceSupplierInfo |
|||
} from '@/api/Common/dictcommons' |
|||
|
|||
export default { |
|||
components: {}, |
|||
data() { |
|||
return { |
|||
title: "【新增】", |
|||
listLoading: false, |
|||
submitdisabled: false, |
|||
formobj: { |
|||
"sid": "", |
|||
"createBySid": '', |
|||
"createByName": '', |
|||
"deptName": '', |
|||
"deptSid": '', |
|||
"createTime": getCurrentDate(), |
|||
"sourceBillNo": "", |
|||
"sourceBillSid": "", |
|||
"businessKey": "04", |
|||
"businessValue": "盘盈入库", |
|||
"remarks": "", |
|||
"warehouseTypeKey": "02", |
|||
"warehouseTypeValue": "旧件库", |
|||
"goodsList": [] |
|||
}, |
|||
hideUploadBtn: false, |
|||
supplierList: [], |
|||
sourceBillNoList: [], |
|||
rules: { |
|||
sourceBillNo: [{ |
|||
required: true, |
|||
message: '请选择盘点单号', |
|||
trigger: 'change' |
|||
}], |
|||
|
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
console.log('url:' + window.location.href) |
|||
var one = window.location.href.indexOf('&data') + 6 |
|||
const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用 |
|||
const obj = JSON.parse(decodeURIComponent(data)) |
|||
this.showInfo(obj.businessSid) |
|||
}, |
|||
mounted() { |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 告诉父级页面,子页面的弹框高度。 |
|||
code: 2, |
|||
data: 500 + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
computed: { |
|||
// 商品金额 |
|||
totalQuantity() { |
|||
return function(row) { |
|||
row.money = (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2) |
|||
return (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2) |
|||
} |
|||
}, |
|||
}, |
|||
|
|||
methods: { |
|||
|
|||
indexMethod(index) { |
|||
return index + 1 |
|||
}, |
|||
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.goodsList.length == 0) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请添加商品' |
|||
}) |
|||
|
|||
return |
|||
} |
|||
|
|||
for (var i = 0; i < this.formobj.goodsList.length; i++) { |
|||
var item = this.formobj.goodsList[i] |
|||
if (item.supplierName == '' || item.supplierSid == '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '供应商不能为空' |
|||
}) |
|||
|
|||
return |
|||
} |
|||
|
|||
if (Number(item.inStoragePrice) == 0) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '商品入库单价不能为空' |
|||
}) |
|||
|
|||
return |
|||
} |
|||
if (Number(item.inStorageNum) == 0) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '商品入库数量不能为空' |
|||
}) |
|||
|
|||
return |
|||
} |
|||
|
|||
} |
|||
this.submitdisabled = true |
|||
req.submit(this.formobj).then((res) => { |
|||
if (res.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: '保存成功' |
|||
}) |
|||
// 子页面向父级页面传递值(关闭弹框) |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
showAdd() { |
|||
this.title = "【新增】" |
|||
this.init() |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
|
|||
}, |
|||
showInfo(sid) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.title = "【修改】" |
|||
req.fetchDetailsBySid(sid) |
|||
.then(resp => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
|
|||
this.formobj.warehouseTypeKey = "02" |
|||
this.formobj.warehouswarehouseTypeValueeTypeKey = "旧件库" |
|||
|
|||
choiceSupplierInfo({ |
|||
deptSid: this.formobj.deptSid |
|||
}).then((resp) => { |
|||
if (resp.success) { |
|||
this.supplierList = resp.data |
|||
} |
|||
}) |
|||
|
|||
req.getSourceBillNoBySid({ |
|||
deptSid: this.formobj.deptSid, |
|||
warehouseTypeKey: "02" |
|||
}).then((resp) => { |
|||
if (resp.success) { |
|||
this.sourceBillNoList = resp.data |
|||
} |
|||
}) |
|||
|
|||
} |
|||
}) |
|||
.catch(e => { |
|||
this.formobj = {} |
|||
}) |
|||
}, |
|||
|
|||
selectSourceBillNo(val) { |
|||
console.log("selectSourceBillNo", val); |
|||
|
|||
const choose = this.sourceBillNoList.filter((item) => item.billSid == val) |
|||
console.log('>>>>>>>>>selectSourceBillNo', choose) |
|||
this.formobj.sourceBillNo = choose[0].billNo |
|||
this.formobj.sourceBillSid = choose[0].billSid |
|||
|
|||
this.getSourceBillGoods(this.formobj.sourceBillSid) |
|||
|
|||
}, |
|||
getSourceBillGoods(sid) { |
|||
|
|||
req.sourceBillBySid(sid).then((resp) => { |
|||
if (resp.success) { |
|||
this.formobj.goodsList = resp.data |
|||
} |
|||
}) |
|||
|
|||
}, |
|||
|
|||
doDelGoods(row) { |
|||
console.log("doDelGoods", row); |
|||
const index = this.formobj.goodsList.findIndex((item) => item == row) |
|||
this.formobj.goodsList.splice(index, 1) |
|||
}, |
|||
|
|||
selectSupplierName(row, val) { |
|||
console.log("selectSupplierName", row); |
|||
console.log("selectSupplierName", val); |
|||
|
|||
const choose = this.supplierList.filter((item) => item.sid == val) |
|||
console.log('>>>>>>>>>selectWarehouseAreaCode', choose) |
|||
row.supplierName = choose[0].supplierName |
|||
row.supplierSid = choose[0].sid |
|||
|
|||
}, |
|||
commodityComputeYHAndXSJE3(row) { |
|||
console.log("commodityComputeYHAndXSJE3", row); |
|||
|
|||
if (Number(row.inStorageNum) > Number(row.pyNum)) { |
|||
row.inStorageNum = Number(row.pyNum) |
|||
} |
|||
|
|||
row.money = (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2) |
|||
|
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
/deep/ .el-form-item__error { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.must { |
|||
color: #f00; |
|||
} |
|||
|
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|||
margin-left: 120px !important; |
|||
width: calc(100% - 115px); |
|||
} |
|||
|
|||
.first_row { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
|
|||
.titleOne { |
|||
padding: 7px; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
</style> |
@ -0,0 +1,202 @@ |
|||
<template> |
|||
<div> |
|||
|
|||
<div class="tab-header webtop"> |
|||
<!-- 标题 --> |
|||
<div>旧件盘盈入库申请单详情</div> |
|||
<!-- start 添加修改按钮 --> |
|||
<div> |
|||
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button> |
|||
</div> |
|||
<!-- end 添加修改按钮 --> |
|||
<!-- end 详情按钮 --> |
|||
</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="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请部门</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请日期</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">盘点单号</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">业务类型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.businessValue }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.remarks }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<div class="title"> |
|||
<div>旧件列表</div> |
|||
</div> |
|||
|
|||
<el-table v-loading="listLoading" :data="formobj.goodsList" border> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column label="商品名称" prop="goodsName" align="center" /> |
|||
<el-table-column label="商品编码" prop="goodsCode" align="center" /> |
|||
<el-table-column label="规格" prop="goodsSpec" align="center" /> |
|||
<el-table-column label="单位" prop="unit" align="center" /> |
|||
<el-table-column label="盘盈数量" prop="pyNum" align="center" /> |
|||
<el-table-column label="供应商" prop="supplierName" align="center" /> |
|||
<el-table-column label="入库单价" prop="inStoragePrice" align="center" /> |
|||
<el-table-column label="入库数量" prop="inStorageNum" align="center" /> |
|||
<el-table-column label="金额" align="center"> |
|||
<template #default="scope"> |
|||
{{ totalQuantity(scope.row) }} |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
</el-table> |
|||
|
|||
</el-form> |
|||
</div> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/oldpPartStocktakingSurplus.js' |
|||
|
|||
export default { |
|||
components: {}, |
|||
data() { |
|||
return { |
|||
listLoading: false, |
|||
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) // url解码unescape()已从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' |
|||
} |
|||
}, '*') |
|||
}, |
|||
computed: { |
|||
// 商品金额 |
|||
totalQuantity() { |
|||
return function(row) { |
|||
row.money = (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2) |
|||
return (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2) |
|||
} |
|||
}, |
|||
}, |
|||
methods: { |
|||
|
|||
showInfo(sid) { |
|||
req.fetchDetailsBySid(sid) |
|||
.then(resp => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
|
|||
} |
|||
}) |
|||
.catch(e => { |
|||
this.formobj = {} |
|||
}) |
|||
}, |
|||
|
|||
// 序号 |
|||
indexMethod(index) { |
|||
return index + 1 |
|||
}, |
|||
|
|||
/** 确认撤回任务 */ |
|||
openRevoke() { |
|||
this.$confirm('是否确认执行撤回操作', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.handleRevoke() |
|||
}).catch(() => { |
|||
this.$message({ |
|||
type: 'info', |
|||
message: '已取消撤回' |
|||
}) |
|||
}) |
|||
}, |
|||
/** 撤回任务 */ |
|||
handleRevoke() { |
|||
req.revokeProcess(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
</style> |
@ -0,0 +1,447 @@ |
|||
<template> |
|||
<div> |
|||
|
|||
<div class="tab-header webtop"> |
|||
<!-- 标题 --> |
|||
<div>盘亏出库申请单详情</div> |
|||
<!-- start 添加修改按钮 --> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="openCountersign('加签')">加 签</el-button> |
|||
<el-button type="primary" size="small" @click="openAgree('同意')">同 意</el-button> |
|||
<el-button type="danger" size="small" @click="openReject('驳回')">驳 回</el-button> |
|||
<el-button type="danger" size="small" @click="openStop('终止')">终 止</el-button> |
|||
</div> |
|||
<!-- end 添加修改按钮 --> |
|||
<!-- end 详情按钮 --> |
|||
</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="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请部门</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请日期</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">盘点单号</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">业务类型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.businessValue }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.remarks }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<div class="title"> |
|||
<div>商品列表</div> |
|||
</div> |
|||
|
|||
<el-table v-loading="listLoading" :data="formobj.goodsList" border> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column label="商品名称" prop="goodsName" align="center" /> |
|||
<el-table-column label="商品编码" prop="goodsCode" align="center" /> |
|||
<el-table-column label="规格" prop="goodsSpec" align="center" /> |
|||
<el-table-column label="单位" prop="unit" align="center" /> |
|||
<el-table-column label="仓库" prop="warehouseName" align="center" /> |
|||
<el-table-column label="库位" prop="warehouseRackName" align="center" /> |
|||
<el-table-column label="入库单价" prop="inStoragePrice" align="center" /> |
|||
<el-table-column label="盘亏数量" prop="pkNum" align="center" /> |
|||
<el-table-column label="出库数量" prop="outStorageNum" align="center" /> |
|||
<el-table-column label="金额" align="center"> |
|||
<template #default="scope"> |
|||
{{ totalQuantity(scope.row) }} |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
</el-form> |
|||
</div> |
|||
|
|||
<!-- 选择待办人 的弹出框--> |
|||
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%"> |
|||
<el-form class="formadd"> |
|||
<el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span class="icon">*</span>加签人员: |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item> |
|||
<el-select v-model="countersign.assignee" placeholder="请选择" filterable> |
|||
<el-option v-for="item in options" :key="item.userSid" :label="item.staffName" :value="item.userSid"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>当前环节:</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row :class="{rowClass:!currentLink}"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>意见:</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" |
|||
type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable></el-input></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div style="text-align:center;margin-top: 20px;"> |
|||
<el-button type="primary" size="mini" @click="reject">确 定</el-button> |
|||
<el-button type="info " size="mini" @click="nodeDialogVisible = false">取 消</el-button> |
|||
</div> |
|||
</el-form> |
|||
</el-dialog> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/stocktakingLoss.js' |
|||
import { |
|||
selectStaffListss |
|||
} from '@/api/Common/dictcommons' |
|||
export default { |
|||
components: {}, |
|||
data() { |
|||
return { |
|||
listLoading: false, |
|||
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) // url解码unescape()已从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: 500 + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
computed: { |
|||
// 商品金额 |
|||
totalQuantity() { |
|||
return function(row) { |
|||
row.money = (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2) |
|||
return (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2) |
|||
} |
|||
}, |
|||
}, |
|||
|
|||
methods: { |
|||
|
|||
showInfo(sid) { |
|||
req.fetchDetailsBySid(sid) |
|||
.then(resp => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
|
|||
} |
|||
}) |
|||
.catch(e => { |
|||
this.formobj = {} |
|||
}) |
|||
|
|||
selectStaffListss().then((res) => { |
|||
if (res.success) { |
|||
this.options = res.data |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
// 序号 |
|||
indexMethod(index) { |
|||
return index + 1 |
|||
}, |
|||
|
|||
// 加签 |
|||
openCountersign(val) { |
|||
this.operation = val |
|||
this.currentLink = true |
|||
this.countersignLink = true |
|||
this.dialogList.comment = '' |
|||
req.getNextNodesForSubmit({ |
|||
taskDefKey: this.current.taskDefKey, |
|||
businessSid: this.linkByParameter.businessSid |
|||
}).then((resp) => { |
|||
if (resp.success) { |
|||
var arr = resp.data |
|||
this.nextNode = arr[0] |
|||
this.nodeDialogVisible = true |
|||
} |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
// 同意 |
|||
openAgree(val) { |
|||
this.operation = val |
|||
this.currentLink = true |
|||
this.countersignLink = false |
|||
this.dialogList.comment = '同意' |
|||
req.getNextNodesForSubmit({ |
|||
taskDefKey: this.current.taskDefKey, |
|||
businessSid: this.linkByParameter.businessSid |
|||
}).then((resp) => { |
|||
if (resp.success) { |
|||
var arr = resp.data |
|||
this.nextNode = arr[0] |
|||
this.nodeDialogVisible = true |
|||
} |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
// 驳回 |
|||
openReject(val) { |
|||
this.operation = val |
|||
this.currentLink = true |
|||
this.countersignLink = false |
|||
this.dialogList.comment = '' |
|||
req.getPreviousNodesForReject({ |
|||
taskDefKey: this.current.taskDefKey, |
|||
businessSid: this.linkByParameter.businessSid |
|||
}).then((resp) => { |
|||
if (resp.success) { |
|||
var arr = resp.data |
|||
this.nextNode = arr[0] |
|||
this.nodeDialogVisible = true |
|||
} |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
// 终止 |
|||
openStop(val) { |
|||
this.operation = val |
|||
this.currentLink = false |
|||
this.countersignLink = false |
|||
this.dialogList.comment = '' |
|||
this.nodeDialogVisible = true |
|||
}, |
|||
reject() { |
|||
if (this.operation === '同意') { |
|||
this.handleAgree() |
|||
} else if (this.operation === '驳回') { |
|||
if (this.dialogList.comment === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请填写审批意见' |
|||
}) |
|||
} else { |
|||
this.handleReject() |
|||
} |
|||
} else if (this.operation === '终止') { |
|||
if (this.dialogList.comment === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请填写审批意见' |
|||
}) |
|||
} else { |
|||
this.handleStop() |
|||
} |
|||
} else if (this.operation === '加签') { |
|||
this.handleCountersign() |
|||
} |
|||
}, |
|||
/** 加签 */ |
|||
handleCountersign() { |
|||
if (this.countersign.assignee === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请选择加签人员' |
|||
}) |
|||
return |
|||
} |
|||
if (this.dialogList.comment === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请填写审批意见' |
|||
}) |
|||
return |
|||
} |
|||
this.countersign.views = this.dialogList.comment |
|||
req.delegate(this.countersign).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 同意任务 */ |
|||
handleAgree() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.complete(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 驳回任务 */ |
|||
handleReject() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.reject(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 终止任务 */ |
|||
handleStop() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.breakProcess(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.rowClass { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
</style> |
@ -0,0 +1,396 @@ |
|||
<template> |
|||
<div> |
|||
|
|||
<div class="tab-header webtop"> |
|||
<!-- 标题 --> |
|||
<div>{{title}}盘亏出库申请单</div> |
|||
<!-- start 添加修改按钮 --> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button> |
|||
</div> |
|||
<!-- end 添加修改按钮 --> |
|||
<!-- end 详情按钮 --> |
|||
</div> |
|||
|
|||
<div class=""> |
|||
|
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请人</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请部门</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 申请日期</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 盘点单号</div> |
|||
<el-form-item prop="sourceBillNo"> |
|||
<el-select v-model="formobj.sourceBillNo" filterable clearable placeholder="请选择" |
|||
class="addinputw addinputInfo" @change="selectSourceBillNo"> |
|||
<el-option v-for="item in sourceBillNoList" :key="item.billSid" :label="item.billNo" |
|||
:value="item.billSid"> |
|||
</el-option> |
|||
</el-select> |
|||
|
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">业务类型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.businessValue }}</span></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-col> |
|||
|
|||
</el-row> |
|||
|
|||
<div class="title"> |
|||
<div>商品列表</div> |
|||
</div> |
|||
|
|||
<el-table v-loading="listLoading" :data="formobj.goodsList" border> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column fixed label="操作" wid align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" @click="doDelGoods(scope.row)">删除</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="商品ID" prop="goodsID" align="center" /> |
|||
<el-table-column label="商品名称" prop="goodsName" align="center" /> |
|||
<el-table-column label="商品编码" prop="goodsCode" align="center" /> |
|||
<el-table-column label="规格" prop="goodsSpec" align="center" /> |
|||
<el-table-column label="单位" prop="unit" align="center" /> |
|||
<el-table-column label="仓库" prop="warehouseName" align="center" /> |
|||
<el-table-column label="库位" prop="warehouseRackName" align="center" /> |
|||
<el-table-column label="入库单价" prop="inStoragePrice" align="center" /> |
|||
<el-table-column label="盘亏数量" prop="pkNum" align="center" /> |
|||
<el-table-column label="出库数量" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-input ref="focusAssumptionInput" v-model="scope.row.outStorageNum" |
|||
@input="commodityComputeYHAndXSJE3(scope.row)" clearable placeholder="" |
|||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="金额" align="center"> |
|||
<template #default="scope"> |
|||
{{ totalQuantity(scope.row) }} |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
</el-form> |
|||
|
|||
</div> |
|||
|
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/stocktakingLoss.js' |
|||
import { |
|||
getCurrentDate |
|||
} from '@/utils/index.js' |
|||
import { |
|||
getOrgSidByPath, |
|||
} from '@/api/Common/dictcommons' |
|||
|
|||
export default { |
|||
components: {}, |
|||
data() { |
|||
return { |
|||
title: "【新增】", |
|||
listLoading: false, |
|||
submitdisabled: false, |
|||
formobj: { |
|||
"sid": "", |
|||
"createBySid": '', |
|||
"createByName": '', |
|||
"deptName": '', |
|||
"deptSid": '', |
|||
"createTime": getCurrentDate(), |
|||
"sourceBillNo": "", |
|||
"sourceBillSid": "", |
|||
"businessKey": "14", |
|||
"businessValue": "盘亏出库", |
|||
"remarks": "", |
|||
"warehouseTypeKey": "01", |
|||
"warehouseTypeValue": "配件库", |
|||
"goodsList": [] |
|||
}, |
|||
hideUploadBtn: false, |
|||
sourceBillNoList: [], |
|||
rules: { |
|||
sourceBillNo: [{ |
|||
required: true, |
|||
message: '请选择盘点单号', |
|||
trigger: 'change' |
|||
}], |
|||
|
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
console.log('url:' + window.location.href) |
|||
var one = window.location.href.indexOf('&data') + 6 |
|||
const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用 |
|||
const obj = JSON.parse(decodeURIComponent(data)) |
|||
this.showInfo(obj.businessSid) |
|||
}, |
|||
mounted() { |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 告诉父级页面,子页面的弹框高度。 |
|||
code: 2, |
|||
data: 500 + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
computed: { |
|||
// 商品金额 |
|||
totalQuantity() { |
|||
return function(row) { |
|||
row.money = (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2) |
|||
return (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2) |
|||
} |
|||
}, |
|||
}, |
|||
|
|||
methods: { |
|||
|
|||
init() { |
|||
getOrgSidByPath({ |
|||
orgPath: window.sessionStorage.getItem('defaultOrgPath') |
|||
}).then((res) => { |
|||
if (res.success) { |
|||
this.formobj.createOrgSid = res.data |
|||
this.formobj.useOrgSid = res.data |
|||
} |
|||
}) |
|||
req.getSourceBillNoBySid({ |
|||
deptSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem( |
|||
'defaultOrgPath').lastIndexOf('/') + 1), |
|||
warehouseTypeKey: "01" |
|||
}).then((resp) => { |
|||
if (resp.success) { |
|||
this.sourceBillNoList = resp.data |
|||
} |
|||
}) |
|||
|
|||
}, |
|||
|
|||
indexMethod(index) { |
|||
return index + 1 |
|||
}, |
|||
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.goodsList.length == 0) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请添加商品' |
|||
}) |
|||
|
|||
return |
|||
} |
|||
|
|||
for (var i = 0; i < this.formobj.goodsList.length; i++) { |
|||
var item = this.formobj.goodsList[i] |
|||
if (Number(item.outStorageNum) == 0) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '商品出库数量不能为空' |
|||
}) |
|||
|
|||
return |
|||
} |
|||
|
|||
} |
|||
this.submitdisabled = true |
|||
req.submit(this.formobj).then((res) => { |
|||
if (res.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: '保存成功' |
|||
}) |
|||
// 子页面向父级页面传递值(关闭弹框) |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
|
|||
showAdd() { |
|||
this.title = "【新增】" |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
|
|||
}, |
|||
showInfo(row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.title = "【修改】" |
|||
req.fetchDetailsBySid(row.sid) |
|||
.then(resp => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
|
|||
this.formobj.warehouseTypeKey = "01" |
|||
this.formobj.warehouswarehouseTypeValueeTypeKey = "配件库" |
|||
|
|||
req.getSourceBillNoBySid({ |
|||
deptSid: this.formobj.deptSid, |
|||
warehouseTypeKey: "01" |
|||
}).then((resp) => { |
|||
if (resp.success) { |
|||
this.sourceBillNoList = resp.data |
|||
} |
|||
}) |
|||
|
|||
} |
|||
}) |
|||
.catch(e => { |
|||
this.formobj = {} |
|||
}) |
|||
}, |
|||
|
|||
selectSourceBillNo(val) { |
|||
console.log("selectSourceBillNo", val); |
|||
|
|||
const choose = this.sourceBillNoList.filter((item) => item.billSid == val) |
|||
console.log('>>>>>>>>>selectSourceBillNo', choose) |
|||
this.formobj.sourceBillNo = choose[0].billNo |
|||
this.formobj.sourceBillSid = choose[0].billSid |
|||
|
|||
this.getSourceBillGoods(this.formobj.sourceBillSid) |
|||
|
|||
}, |
|||
getSourceBillGoods(sid) { |
|||
|
|||
req.sourceBillBySid(sid).then((resp) => { |
|||
if (resp.success) { |
|||
this.formobj.goodsList = resp.data |
|||
} |
|||
}) |
|||
|
|||
}, |
|||
|
|||
doDelGoods(row) { |
|||
console.log("doDelGoods", row); |
|||
const index = this.formobj.goodsList.findIndex((item) => item == row) |
|||
this.formobj.goodsList.splice(index, 1) |
|||
}, |
|||
|
|||
commodityComputeYHAndXSJE3(row) { |
|||
console.log("commodityComputeYHAndXSJE3", row); |
|||
|
|||
if (Number(row.outStorageNum) > Number(row.pkNum)) { |
|||
row.outStorageNum = Number(row.pkNum) |
|||
} |
|||
|
|||
row.money = (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2) |
|||
|
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
/deep/ .el-form-item__error { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.must { |
|||
color: #f00; |
|||
} |
|||
|
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|||
margin-left: 120px !important; |
|||
width: calc(100% - 115px); |
|||
} |
|||
|
|||
.first_row { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
|
|||
.titleOne { |
|||
padding: 7px; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
</style> |
@ -0,0 +1,203 @@ |
|||
<template> |
|||
<div> |
|||
|
|||
<div class="tab-header webtop"> |
|||
<!-- 标题 --> |
|||
<div>盘亏出库申请单详情</div> |
|||
<!-- start 添加修改按钮 --> |
|||
<div> |
|||
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button> |
|||
</div> |
|||
<!-- end 添加修改按钮 --> |
|||
<!-- end 详情按钮 --> |
|||
</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="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请部门</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请日期</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">盘点单号</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">业务类型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.businessValue }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.remarks }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<div class="title"> |
|||
<div>商品列表</div> |
|||
</div> |
|||
|
|||
<el-table v-loading="listLoading" :data="formobj.goodsList" border> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column label="商品名称" prop="goodsName" align="center" /> |
|||
<el-table-column label="商品编码" prop="goodsCode" align="center" /> |
|||
<el-table-column label="规格" prop="goodsSpec" align="center" /> |
|||
<el-table-column label="单位" prop="unit" align="center" /> |
|||
<el-table-column label="仓库" prop="warehouseName" align="center" /> |
|||
<el-table-column label="库位" prop="warehouseRackName" align="center" /> |
|||
<el-table-column label="入库单价" prop="inStoragePrice" align="center" /> |
|||
<el-table-column label="盘亏数量" prop="pkNum" align="center" /> |
|||
<el-table-column label="出库数量" prop="outStorageNum" align="center" /> |
|||
<el-table-column label="金额" align="center"> |
|||
<template #default="scope"> |
|||
{{ totalQuantity(scope.row) }} |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
</el-form> |
|||
</div> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/stocktakingLoss.js' |
|||
|
|||
export default { |
|||
components: {}, |
|||
data() { |
|||
return { |
|||
listLoading: false, |
|||
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) // url解码unescape()已从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' |
|||
} |
|||
}, '*') |
|||
}, |
|||
computed: { |
|||
// 商品金额 |
|||
totalQuantity() { |
|||
return function(row) { |
|||
row.money = (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2) |
|||
return (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2) |
|||
} |
|||
}, |
|||
}, |
|||
|
|||
methods: { |
|||
|
|||
showInfo(sid) { |
|||
req.fetchDetailsBySid(sid) |
|||
.then(resp => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
|
|||
} |
|||
}) |
|||
.catch(e => { |
|||
this.formobj = {} |
|||
}) |
|||
}, |
|||
|
|||
// 序号 |
|||
indexMethod(index) { |
|||
return index + 1 |
|||
}, |
|||
|
|||
|
|||
/** 确认撤回任务 */ |
|||
openRevoke() { |
|||
this.$confirm('是否确认执行撤回操作', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.handleRevoke() |
|||
}).catch(() => { |
|||
this.$message({ |
|||
type: 'info', |
|||
message: '已取消撤回' |
|||
}) |
|||
}) |
|||
}, |
|||
/** 撤回任务 */ |
|||
handleRevoke() { |
|||
req.revokeProcess(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
</style> |
@ -0,0 +1,447 @@ |
|||
<template> |
|||
<div> |
|||
|
|||
<div class="tab-header webtop"> |
|||
<!-- 标题 --> |
|||
<div>盘盈入库申请单详情</div> |
|||
<!-- start 添加修改按钮 --> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="openCountersign('加签')">加 签</el-button> |
|||
<el-button type="primary" size="small" @click="openAgree('同意')">同 意</el-button> |
|||
<el-button type="danger" size="small" @click="openReject('驳回')">驳 回</el-button> |
|||
<el-button type="danger" size="small" @click="openStop('终止')">终 止</el-button> |
|||
</div> |
|||
<!-- end 添加修改按钮 --> |
|||
<!-- end 详情按钮 --> |
|||
</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="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请部门</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请日期</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">盘点单号</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">业务类型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.businessValue }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.remarks }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<div class="title"> |
|||
<div>商品列表</div> |
|||
</div> |
|||
|
|||
<el-table v-loading="listLoading" :data="formobj.goodsList" border> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column label="商品名称" prop="goodsName" align="center" /> |
|||
<el-table-column label="商品编码" prop="goodsCode" align="center" /> |
|||
<el-table-column label="规格" prop="goodsSpec" align="center" /> |
|||
<el-table-column label="单位" prop="unit" align="center" /> |
|||
<el-table-column label="盘盈数量" prop="pyNum" align="center" /> |
|||
<el-table-column label="供应商" prop="supplierName" align="center" /> |
|||
<el-table-column label="入库单价" prop="inStoragePrice" align="center" /> |
|||
<el-table-column label="入库数量" prop="inStorageNum" align="center" /> |
|||
<el-table-column label="金额" align="center"> |
|||
<template #default="scope"> |
|||
{{ totalQuantity(scope.row) }} |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
</el-table> |
|||
|
|||
</el-form> |
|||
</div> |
|||
|
|||
<!-- 选择待办人 的弹出框--> |
|||
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%"> |
|||
<el-form class="formadd"> |
|||
<el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span class="icon">*</span>加签人员: |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item> |
|||
<el-select v-model="countersign.assignee" placeholder="请选择" filterable> |
|||
<el-option v-for="item in options" :key="item.userSid" :label="item.staffName" :value="item.userSid"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>当前环节:</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row :class="{rowClass:!currentLink}"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>意见:</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" |
|||
type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable></el-input></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div style="text-align:center;margin-top: 20px;"> |
|||
<el-button type="primary" size="mini" @click="reject">确 定</el-button> |
|||
<el-button type="info " size="mini" @click="nodeDialogVisible = false">取 消</el-button> |
|||
</div> |
|||
</el-form> |
|||
</el-dialog> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/stocktakingSurplus.js' |
|||
import { |
|||
selectStaffListss |
|||
} from '@/api/Common/dictcommons' |
|||
export default { |
|||
components: {}, |
|||
data() { |
|||
return { |
|||
listLoading: false, |
|||
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) // url解码unescape()已从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: 500 + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
computed: { |
|||
// 商品金额 |
|||
totalQuantity() { |
|||
return function(row) { |
|||
row.money = (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2) |
|||
return (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2) |
|||
} |
|||
}, |
|||
}, |
|||
methods: { |
|||
|
|||
showInfo(sid) { |
|||
req.fetchDetailsBySid(sid) |
|||
.then(resp => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
|
|||
} |
|||
}) |
|||
.catch(e => { |
|||
this.formobj = {} |
|||
}) |
|||
|
|||
selectStaffListss().then((res) => { |
|||
if (res.success) { |
|||
this.options = res.data |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
// 序号 |
|||
indexMethod(index) { |
|||
return index + 1 |
|||
}, |
|||
|
|||
|
|||
// 加签 |
|||
openCountersign(val) { |
|||
this.operation = val |
|||
this.currentLink = true |
|||
this.countersignLink = true |
|||
this.dialogList.comment = '' |
|||
req.getNextNodesForSubmit({ |
|||
taskDefKey: this.current.taskDefKey, |
|||
businessSid: this.linkByParameter.businessSid |
|||
}).then((resp) => { |
|||
if (resp.success) { |
|||
var arr = resp.data |
|||
this.nextNode = arr[0] |
|||
this.nodeDialogVisible = true |
|||
} |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
// 同意 |
|||
openAgree(val) { |
|||
this.operation = val |
|||
this.currentLink = true |
|||
this.countersignLink = false |
|||
this.dialogList.comment = '同意' |
|||
req.getNextNodesForSubmit({ |
|||
taskDefKey: this.current.taskDefKey, |
|||
businessSid: this.linkByParameter.businessSid |
|||
}).then((resp) => { |
|||
if (resp.success) { |
|||
var arr = resp.data |
|||
this.nextNode = arr[0] |
|||
this.nodeDialogVisible = true |
|||
} |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
// 驳回 |
|||
openReject(val) { |
|||
this.operation = val |
|||
this.currentLink = true |
|||
this.countersignLink = false |
|||
this.dialogList.comment = '' |
|||
req.getPreviousNodesForReject({ |
|||
taskDefKey: this.current.taskDefKey, |
|||
businessSid: this.linkByParameter.businessSid |
|||
}).then((resp) => { |
|||
if (resp.success) { |
|||
var arr = resp.data |
|||
this.nextNode = arr[0] |
|||
this.nodeDialogVisible = true |
|||
} |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
// 终止 |
|||
openStop(val) { |
|||
this.operation = val |
|||
this.currentLink = false |
|||
this.countersignLink = false |
|||
this.dialogList.comment = '' |
|||
this.nodeDialogVisible = true |
|||
}, |
|||
reject() { |
|||
if (this.operation === '同意') { |
|||
this.handleAgree() |
|||
} else if (this.operation === '驳回') { |
|||
if (this.dialogList.comment === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请填写审批意见' |
|||
}) |
|||
} else { |
|||
this.handleReject() |
|||
} |
|||
} else if (this.operation === '终止') { |
|||
if (this.dialogList.comment === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请填写审批意见' |
|||
}) |
|||
} else { |
|||
this.handleStop() |
|||
} |
|||
} else if (this.operation === '加签') { |
|||
this.handleCountersign() |
|||
} |
|||
}, |
|||
/** 加签 */ |
|||
handleCountersign() { |
|||
if (this.countersign.assignee === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请选择加签人员' |
|||
}) |
|||
return |
|||
} |
|||
if (this.dialogList.comment === '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请填写审批意见' |
|||
}) |
|||
return |
|||
} |
|||
this.countersign.views = this.dialogList.comment |
|||
req.delegate(this.countersign).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 同意任务 */ |
|||
handleAgree() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.complete(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 驳回任务 */ |
|||
handleReject() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.reject(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 终止任务 */ |
|||
handleStop() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.breakProcess(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.rowClass { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
</style> |
@ -0,0 +1,458 @@ |
|||
<template> |
|||
<div> |
|||
|
|||
<div class="tab-header webtop"> |
|||
<!-- 标题 --> |
|||
<div>{{title}}盘盈入库申请单</div> |
|||
<!-- start 添加修改按钮 --> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button> |
|||
</div> |
|||
<!-- end 添加修改按钮 --> |
|||
<!-- end 详情按钮 --> |
|||
</div> |
|||
|
|||
<div class=""> |
|||
|
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请人</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请部门</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 申请日期</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 盘点单号</div> |
|||
<el-form-item prop="sourceBillNo"> |
|||
<el-select v-model="formobj.sourceBillNo" filterable clearable placeholder="请选择" |
|||
class="addinputw addinputInfo" @change="selectSourceBillNo"> |
|||
<el-option v-for="item in sourceBillNoList" :key="item.billSid" :label="item.billNo" |
|||
:value="item.billSid"> |
|||
</el-option> |
|||
</el-select> |
|||
|
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">业务类型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.businessValue }}</span></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-col> |
|||
|
|||
</el-row> |
|||
|
|||
<div class="title"> |
|||
<div>商品列表</div> |
|||
</div> |
|||
|
|||
<el-table v-loading="listLoading" :data="formobj.goodsList" border> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column fixed label="操作" wid align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" @click="doDelGoods(scope.row)">删除</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="商品名称" prop="goodsName" align="center" /> |
|||
<el-table-column label="商品编码" prop="goodsCode" align="center" /> |
|||
<el-table-column label="规格" prop="goodsSpec" align="center" /> |
|||
<el-table-column label="单位" prop="unit" align="center" /> |
|||
<el-table-column label="盘盈数量" prop="pyNum" align="center" /> |
|||
<el-table-column label="供应商" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-select v-model="scope.row.supplierName" clearable placeholder="请选择" |
|||
@change="selectSupplierName(scope.row,$event)"> |
|||
<el-option v-for="(item,i) in supplierList" :key="i" :label="item.supplierName" :value="item.sid"> |
|||
</el-option> |
|||
</el-select> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="入库单价" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-input ref="focusAssumptionInput" @input="commodityComputeYHAndXSJE3(scope.row)" |
|||
v-model="scope.row.inStoragePrice" clearable placeholder="" |
|||
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="入库数量" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-input ref="focusAssumptionInput" v-model="scope.row.inStorageNum" |
|||
@input="commodityComputeYHAndXSJE3(scope.row)" clearable placeholder="" |
|||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="金额" align="center"> |
|||
<template #default="scope"> |
|||
{{ totalQuantity(scope.row) }} |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
</el-table> |
|||
|
|||
</el-form> |
|||
|
|||
</div> |
|||
|
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/stocktakingSurplus.js' |
|||
import { |
|||
getCurrentDate |
|||
} from '@/utils/index.js' |
|||
import { |
|||
getOrgSidByPath, |
|||
choiceSupplierInfo |
|||
} from '@/api/Common/dictcommons' |
|||
|
|||
export default { |
|||
components: {}, |
|||
data() { |
|||
return { |
|||
title: "【新增】", |
|||
listLoading: false, |
|||
submitdisabled: false, |
|||
formobj: { |
|||
"sid": "", |
|||
"createBySid": '', |
|||
"createByName": '', |
|||
"deptName": '', |
|||
"deptSid": '', |
|||
"createTime": getCurrentDate(), |
|||
"sourceBillNo": "", |
|||
"sourceBillSid": "", |
|||
"businessKey": "04", |
|||
"businessValue": "盘盈入库", |
|||
"remarks": "", |
|||
"warehouseTypeKey": "01", |
|||
"warehouseTypeValue": "配件库", |
|||
"goodsList": [] |
|||
}, |
|||
hideUploadBtn: false, |
|||
supplierList: [], |
|||
sourceBillNoList: [], |
|||
rules: { |
|||
sourceBillNo: [{ |
|||
required: true, |
|||
message: '请选择盘点单号', |
|||
trigger: 'change' |
|||
}], |
|||
|
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
console.log('url:' + window.location.href) |
|||
var one = window.location.href.indexOf('&data') + 6 |
|||
const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用 |
|||
const obj = JSON.parse(decodeURIComponent(data)) |
|||
this.showInfo(obj.businessSid) |
|||
}, |
|||
mounted() { |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 告诉父级页面,子页面的弹框高度。 |
|||
code: 2, |
|||
data: 500 + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
|
|||
computed: { |
|||
// 商品金额 |
|||
totalQuantity() { |
|||
return function(row) { |
|||
row.money = (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2) |
|||
return (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2) |
|||
} |
|||
}, |
|||
}, |
|||
|
|||
methods: { |
|||
|
|||
init() { |
|||
getOrgSidByPath({ |
|||
orgPath: window.sessionStorage.getItem('defaultOrgPath') |
|||
}).then((res) => { |
|||
if (res.success) { |
|||
this.formobj.createOrgSid = res.data |
|||
this.formobj.useOrgSid = res.data |
|||
} |
|||
}) |
|||
choiceSupplierInfo({ |
|||
deptSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem( |
|||
'defaultOrgPath').lastIndexOf('/') + 1) |
|||
}).then((resp) => { |
|||
if (resp.success) { |
|||
this.supplierList = resp.data |
|||
} |
|||
}) |
|||
|
|||
req.getSourceBillNoBySid({ |
|||
deptSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem( |
|||
'defaultOrgPath').lastIndexOf('/') + 1), |
|||
warehouseTypeKey: "01" |
|||
}).then((resp) => { |
|||
if (resp.success) { |
|||
this.sourceBillNoList = resp.data |
|||
} |
|||
}) |
|||
|
|||
}, |
|||
|
|||
indexMethod(index) { |
|||
return index + 1 |
|||
}, |
|||
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.goodsList.length == 0) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请添加商品' |
|||
}) |
|||
|
|||
return |
|||
} |
|||
|
|||
for (var i = 0; i < this.formobj.goodsList.length; i++) { |
|||
var item = this.formobj.goodsList[i] |
|||
if (item.supplierName == '' || item.supplierSid == '') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '供应商不能为空' |
|||
}) |
|||
|
|||
return |
|||
} |
|||
|
|||
if (Number(item.inStoragePrice) == 0) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '商品入库单价不能为空' |
|||
}) |
|||
|
|||
return |
|||
} |
|||
if (Number(item.inStorageNum) == 0) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '商品入库数量不能为空' |
|||
}) |
|||
|
|||
return |
|||
} |
|||
|
|||
} |
|||
this.submitdisabled = true |
|||
req.submit(this.formobj).then((res) => { |
|||
if (res.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: '保存成功' |
|||
}) |
|||
// 子页面向父级页面传递值(关闭弹框) |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
|
|||
showAdd() { |
|||
this.title = "【新增】" |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
|
|||
}, |
|||
showInfo(sid) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.title = "【修改】" |
|||
req.fetchDetailsBySid(sid) |
|||
.then(resp => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
|
|||
this.formobj.warehouseTypeKey = "01" |
|||
this.formobj.warehouswarehouseTypeValueeTypeKey = "配件库" |
|||
|
|||
choiceSupplierInfo({ |
|||
deptSid: this.formobj.deptSid |
|||
}).then((resp) => { |
|||
if (resp.success) { |
|||
this.supplierList = resp.data |
|||
} |
|||
}) |
|||
|
|||
req.getSourceBillNoBySid({ |
|||
deptSid: this.formobj.deptSid, |
|||
warehouseTypeKey: "01" |
|||
}).then((resp) => { |
|||
if (resp.success) { |
|||
this.sourceBillNoList = resp.data |
|||
} |
|||
}) |
|||
|
|||
} |
|||
}) |
|||
.catch(e => { |
|||
this.formobj = {} |
|||
}) |
|||
}, |
|||
|
|||
selectSourceBillNo(val) { |
|||
console.log("selectSourceBillNo", val); |
|||
|
|||
const choose = this.sourceBillNoList.filter((item) => item.billSid == val) |
|||
console.log('>>>>>>>>>selectSourceBillNo', choose) |
|||
this.formobj.sourceBillNo = choose[0].billNo |
|||
this.formobj.sourceBillSid = choose[0].billSid |
|||
|
|||
this.getSourceBillGoods(this.formobj.sourceBillSid) |
|||
|
|||
}, |
|||
getSourceBillGoods(sid) { |
|||
|
|||
req.sourceBillBySid(sid).then((resp) => { |
|||
if (resp.success) { |
|||
this.formobj.goodsList = resp.data |
|||
} |
|||
}) |
|||
|
|||
}, |
|||
|
|||
doDelGoods(row) { |
|||
console.log("doDelGoods", row); |
|||
const index = this.formobj.goodsList.findIndex((item) => item == row) |
|||
this.formobj.goodsList.splice(index, 1) |
|||
}, |
|||
|
|||
selectSupplierName(row, val) { |
|||
console.log("selectSupplierName", row); |
|||
console.log("selectSupplierName", val); |
|||
|
|||
const choose = this.supplierList.filter((item) => item.sid == val) |
|||
console.log('>>>>>>>>>selectWarehouseAreaCode', choose) |
|||
row.supplierName = choose[0].supplierName |
|||
row.supplierSid = choose[0].sid |
|||
|
|||
}, |
|||
commodityComputeYHAndXSJE3(row) { |
|||
console.log("commodityComputeYHAndXSJE3", row); |
|||
|
|||
if (Number(row.inStorageNum) > Number(row.pyNum)) { |
|||
row.inStorageNum = Number(row.pyNum) |
|||
} |
|||
|
|||
row.money = (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2) |
|||
|
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
/deep/ .el-form-item__error { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.must { |
|||
color: #f00; |
|||
} |
|||
|
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|||
margin-left: 120px !important; |
|||
width: calc(100% - 115px); |
|||
} |
|||
|
|||
.first_row { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
|
|||
.titleOne { |
|||
padding: 7px; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
</style> |
@ -0,0 +1,203 @@ |
|||
<template> |
|||
<div> |
|||
|
|||
<div class="tab-header webtop"> |
|||
<!-- 标题 --> |
|||
<div>盘盈入库申请单详情</div> |
|||
<!-- start 添加修改按钮 --> |
|||
<div> |
|||
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button> |
|||
</div> |
|||
<!-- end 添加修改按钮 --> |
|||
<!-- end 详情按钮 --> |
|||
</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="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请部门</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请日期</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">盘点单号</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">业务类型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.businessValue }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.remarks }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<div class="title"> |
|||
<div>商品列表</div> |
|||
</div> |
|||
|
|||
<el-table v-loading="listLoading" :data="formobj.goodsList" border> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column label="商品名称" prop="goodsName" align="center" /> |
|||
<el-table-column label="商品编码" prop="goodsCode" align="center" /> |
|||
<el-table-column label="规格" prop="goodsSpec" align="center" /> |
|||
<el-table-column label="单位" prop="unit" align="center" /> |
|||
<el-table-column label="盘盈数量" prop="pyNum" align="center" /> |
|||
<el-table-column label="供应商" prop="supplierName" align="center" /> |
|||
<el-table-column label="入库单价" prop="inStoragePrice" align="center" /> |
|||
<el-table-column label="入库数量" prop="inStorageNum" align="center" /> |
|||
<el-table-column label="金额" align="center"> |
|||
<template #default="scope"> |
|||
{{ totalQuantity(scope.row) }} |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
</el-table> |
|||
|
|||
</el-form> |
|||
</div> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/stocktakingSurplus.js' |
|||
|
|||
export default { |
|||
components: {}, |
|||
data() { |
|||
return { |
|||
listLoading: false, |
|||
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) // url解码unescape()已从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' |
|||
} |
|||
}, '*') |
|||
}, |
|||
computed: { |
|||
// 商品金额 |
|||
totalQuantity() { |
|||
return function(row) { |
|||
row.money = (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2) |
|||
return (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2) |
|||
} |
|||
}, |
|||
}, |
|||
methods: { |
|||
|
|||
showInfo(sid) { |
|||
req.fetchDetailsBySid(sid) |
|||
.then(resp => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
|
|||
} |
|||
}) |
|||
.catch(e => { |
|||
this.formobj = {} |
|||
}) |
|||
}, |
|||
|
|||
// 序号 |
|||
indexMethod(index) { |
|||
return index + 1 |
|||
}, |
|||
|
|||
|
|||
/** 确认撤回任务 */ |
|||
openRevoke() { |
|||
this.$confirm('是否确认执行撤回操作', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.handleRevoke() |
|||
}).catch(() => { |
|||
this.$message({ |
|||
type: 'info', |
|||
message: '已取消撤回' |
|||
}) |
|||
}) |
|||
}, |
|||
/** 撤回任务 */ |
|||
handleRevoke() { |
|||
req.revokeProcess(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
</style> |
Loading…
Reference in new issue