Browse Source

完善其他出库流程

master
myTest383 7 months ago
parent
commit
347935ac0d
  1. 25
      yxt-as-ui/src/router/index.js
  2. 434
      yxt-as-ui/src/views/workFlow/qitachukuFlow/otherOutboundDaiBan.vue
  3. 456
      yxt-as-ui/src/views/workFlow/qitachukuFlow/otherOutboundEdit.vue
  4. 187
      yxt-as-ui/src/views/workFlow/qitachukuFlow/otherOutboundYiBan.vue
  5. 168
      yxt-as-ui/src/views/workFlow/qitachukuFlow/relation/chooseproducts.vue

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

@ -1383,11 +1383,34 @@ export const constantRoutes = [{
},
// 欠款月结客户备案 -- 已办
{
path: '/qiankuanyuejieFlow/maintenanceEnterpriseYiBan',
path: '/workFlow/maintenanceEnterpriseYiBan',
component: () =>
import('@/views/workFlow/qiankuanyuejieFlow/maintenanceEnterpriseYiBan.vue'),
name: 'MaintenanceEnterpriseYiBan'
},
// 其他出库 -- 编辑
{
path: '/qitachukuFlow/otherOutboundEdit',
component: () =>
import('@/views/workFlow/qitachukuFlow/otherOutboundEdit.vue'),
name: 'OtherOutboundEdit'
},
// 其他出库 -- 待办
{
path: '/qitachukuFlow/otherOutboundDaiBan',
component: () =>
import('@/views/workFlow/qitachukuFlow/otherOutboundDaiBan.vue'),
name: 'OtherOutboundDaiBan'
},
// 其他出库 -- 已办
{
path: '/qitachukuFlow/otherOutboundYiBan',
component: () =>
import('@/views/workFlow/qitachukuFlow/otherOutboundYiBan.vue'),
name: 'OtherOutboundYiBan'
},
// 404 page must be placed at the end !!!
// { path: '*', redirect: '/404', hidden: true }
]

434
yxt-as-ui/src/views/workFlow/qitachukuFlow/otherOutboundDaiBan.vue

@ -0,0 +1,434 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<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>
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<el-row class="first_row">
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.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="8">
<div class="span-sty">业务类型</div>
<el-form-item><span class="addinputInfo">{{ formobj.busTypeValue }}</span></el-form-item>
</el-col>
<el-col :span="16">
<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 v-loading="listLoading" :data="formobj.otheroutDetailList" border style="width: 100%;">
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column label="商品ID" prop="goodsID" align="center" width="200" />
<el-table-column label="商品名称" prop="goodsSkuTitle" align="center" width="200" />
<el-table-column label="图号" prop="goodsSkuCode" align="center" width="150" />
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" width="150" />
<el-table-column label="单位" prop="unit" align="center" width="120" />
<el-table-column label="仓库" prop="warehouseName" align="center" width="200" />
<el-table-column label="库位" prop="warehouseRackCode" align="center" width="120" />
<!-- <el-table-column label="库存" prop="count" align="center" width="120" /> -->
<el-table-column label="入库单价" prop="inCost" align="center" width="120" />
<el-table-column label="出库数量" prop="outCount" align="center" width="120" />
<el-table-column label="金额" prop="amount" align="center" />
</el-table>
</el-form>
</div>
</div>
<!-- 选择待办人 的弹出框-->
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%">
<el-form class="formadd">
<el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span class="icon">*</span>加签人员:
</el-col>
<el-col :span="20">
<el-form-item>
<el-select v-model="countersign.assignee" placeholder="请选择" filterable>
<el-option v-for="item in options" :key="item.userSid" :label="item.staffName" :value="item.userSid">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span>当前环节:</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item>
</el-col>
</el-row>
<el-row :class="{rowClass:!currentLink}">
<el-col :span="4" class="tleftb">
<span>意见:</span>
</el-col>
<el-col :span="20">
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw"
type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable></el-input></el-form-item>
</el-col>
</el-row>
<div style="text-align:center;margin-top: 20px;">
<el-button type="primary" size="mini" @click="reject"> </el-button>
<el-button type="info " size="mini" @click="nodeDialogVisible = false"> </el-button>
</div>
</el-form>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/storage/otherOutbound.js'
import {
selectStaffListss
} from '@/api/Common/dictcommons'
export default {
components: {},
data() {
return {
viewState: 1,
listLoading: false,
submitdisabled: 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) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
// this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
this.current.taskDefKey = obj.taskDefKey
this.current.taskName = obj.taskName
//
this.countersign.taskId = obj.taskId
this.countersign.userSid = window.sessionStorage.getItem('userSid')
this.countersign.instanceId = obj.instanceId
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
methods: {
indexMethod(index) {
return index + 1
},
showInfo(sid) {
req.fetchDetailsBySid(sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
//this.Array
this.formobj.otheroutDetailList.forEach(item => {
this.$set(item, 'amount', (Number(item.outCount) * Number(item.inCost)).toFixed(2))
})
}
})
.catch(e => {
this.formobj = {}
})
selectStaffListss().then((res) => {
if (res.success) {
this.options = res.data
}
})
},
resetState() {
this.viewState = 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>

456
yxt-as-ui/src/views/workFlow/qitachukuFlow/otherOutboundEdit.vue

@ -0,0 +1,456 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<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.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="8">
<div class="span-sty"><span class="must">*</span> 业务类型</div>
<el-form-item prop="busTypeKey"><el-select v-model="formobj.busTypeKey" filterable clearable
placeholder="请选择" class="addinputInfo addinputw" @change="busTypeSelect">
<el-option v-for="(item,i) in busTypeList" :key="item.dictKey" :label="item.dictValue"
:value="item.dictKey">
</el-option>
</el-select></el-form-item>
</el-col>
<el-col :span="16">
<div class="span-sty">备注</div>
<el-form-item><el-input v-model="formobj.remarks" placeholder="" class="addinputInfo addinputw"
clearable /></el-form-item>
</el-col>
</el-row>
<div class="title titleOne">
<div>商品列表</div>
<el-button type="primary" size="mini" class="btntopblueline" @click="seleMaintenance()">选择商品</el-button>
</div>
<el-table v-loading="listLoading" :data="formobj.otheroutDetailList" border style="width: 100%;"
ref="dataTable">
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column label="操作" align="center" width="120">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="doGoods(scope.row)">删除</el-button>
</template>
</el-table-column>
<el-table-column label="商品ID" prop="goodsID" align="center" width="200" />
<el-table-column label="商品名称" prop="goodsSkuTitle" align="center" width="200" />
<el-table-column label="图号" prop="goodsSkuCode" align="center" width="150" />
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" width="150" />
<el-table-column label="单位" prop="unit" align="center" width="120" />
<el-table-column label="仓库" prop="warehouseName" align="center" width="200" />
<el-table-column label="库位" prop="warehouseRackCode" align="center" width="120" />
<!-- <el-table-column label="库存" prop="count" align="center" width="120" /> -->
<el-table-column label="入库单价" prop="inCost" align="center" width="120" />
<el-table-column label="出库数量" align="center" width="120">
<template slot-scope="scope">
<el-input ref="focusAssumptionInput" @input="commodityComputeYHAndXSJE(scope.row,$event)"
v-model="scope.row.outCount" clearable placeholder=""
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
</template>
</el-table-column>
<el-table-column label="金额" prop="amount" align="center" width="150" />
</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/otherOutbound.js'
import {
getCurrentDate
} from '@/utils/index.js'
import chooseproducts from './relation/chooseproducts'
import {
getOrgSidByPath,
getTypeValueList
} from '@/api/Common/dictcommons'
export default {
components: {
chooseproducts,
},
data() {
return {
viewState: 1,
title: '【新增】',
listLoading: false,
submitdisabled: false,
formobj: {
"sid": "",
"createTime": getCurrentDate(),
"billNo": "",
"remarks": "",
"createBySid": window.sessionStorage.getItem('userSid'),
"createByName": window.sessionStorage.getItem('name'),
"deptSid": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
.getItem('defaultOrgPath').lastIndexOf('/') + 1),
"deptName": window.sessionStorage.getItem('defaultOrgPathName').substring(window
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1),
"busTypeKey": "",
"busTypeValue": "",
"finishTime": "",
"procDefId": "",
"nodeId": "",
"procInstId": "",
"nodeState": "",
"taskId": "",
"createOrgName": "",
"createOrgSid": "",
"otheroutDetailList": [
]
},
busTypeList: [],
rules: {
busTypeKey: [{
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) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
methods: {
init() {
getOrgSidByPath({
orgPath: window.sessionStorage.getItem('defaultOrgPath')
}).then((res) => {
if (res.success) {
this.formobj.createOrgSid = res.data
this.formobj.useOrgSid = res.data
}
})
getTypeValueList({
type: 'wms_busType',
groupNum: 'wms_ck'
}).then((res) => {
if (res.success) {
this.busTypeList = res.data
}
})
},
backData(value) {
this.viewState = 1
if (value.length > 0) {
value.forEach((e) => {
this.formobj.otheroutDetailList.push({
"sid": "",
"mainSid": "",
"goodsID": e.goodsID,
"goodsSpuSid": e.goodsSpuSid,
"goodsSpuName": e.goodsSpuName,
"goodsSkuSid": e.goodsSkuSid,
"goodsSkuTitle": e.goodsSkuTitle,
"goodsSkuCode": e.goodsSkuCode,
"goodsSkuOwnSpec": e.goodsSkuOwnSpec,
"manufacturerSid": e.manufacturerSid,
"manufacturerName": e.manufacturerName,
"unit": e.unit,
"warehouseSid": e.warehouseSid,
"warehouseName": e.warehouseName,
"warehouseAreaSid": e.warehouseAreaSid,
"warehouseArea": e.warehouseArea,
"warehouseRackSid": e.warehouseRackSid,
"warehouseRackCode": e.warehouseRackCode,
"inCost": e.taxPrice,
// "count": e.count,
"outCount": 0,
"amount": 0
})
})
}
},
resetState() {
this.viewState = 1
},
seleMaintenance() {
this.viewState = 2
const aa = []
this.$refs['divSp'].showData(aa, this.formobj.deptSid)
},
doGoods(row) {
this.$confirm("是否确定删除此商品?", '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const index = this.formobj.otheroutDetailList.findIndex((item) => item === row)
console.log("index》》》》", index)
this.formobj.otheroutDetailList.splice(index, 1)
})
},
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.otheroutDetailList.length == 0) {
this.$message({
showClose: true,
type: 'error',
message: '请添加商品'
})
return
}
for (var i = 0; i < this.formobj.otheroutDetailList.length; i++) {
var item = this.formobj.otheroutDetailList[i]
if (item.goodsSkuSid == '') {
this.$message({
showClose: true,
type: 'error',
message: '请添加商品'
})
return
}
if (item.outCount == 0) {
this.$message({
showClose: true,
type: 'error',
message: '出库数量不能为空或0'
})
return
}
}
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
})
}
})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
"sid": "",
"createTime": getCurrentDate(),
"billNo": "",
"remarks": "",
"createBySid": window.sessionStorage.getItem('userSid'),
"createByName": window.sessionStorage.getItem('name'),
"deptSid": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
.getItem('defaultOrgPath').lastIndexOf('/') + 1),
"deptName": window.sessionStorage.getItem('defaultOrgPathName').substring(window
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1),
"busTypeKey": "",
"busTypeValue": "",
"finishTime": "",
"procDefId": "",
"nodeId": "",
"procInstId": "",
"nodeState": "",
"taskId": "",
"createOrgName": "",
"createOrgSid": "",
"otheroutDetailList": []
}
this.submitdisabled = false
this.$emit('doback')
},
showInfo(sid) {
this.title = "【修改】"
this.init()
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.fetchDetailsBySid(sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
//this.Array
this.formobj.otheroutDetailList.forEach(item => {
this.$set(item, 'amount', (Number(item.outCount) * Number(item.inCost)).toFixed(2))
})
}
})
.catch(e => {
this.formobj = {}
})
},
busTypeSelect(val) {
const choose = this.busTypeList.filter((item) => item.dictKey == val)
console.log('>>>>>>>>>busTypeSelect', choose)
this.formobj.busTypeKey = choose[0].dictKey
this.formobj.busTypeValue = choose[0].dictValue
},
commodityComputeYHAndXSJE(row, val) {
// if (Number(row.outCount) > Number(row.count)) {
// row.outCount = row.count
// }
row.amount = (Number(row.outCount) * Number(row.inCost)).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;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .el-radio-group {
display: inline;
line-height: 1px;
vertical-align: middle;
}
</style>

187
yxt-as-ui/src/views/workFlow/qitachukuFlow/otherOutboundYiBan.vue

@ -0,0 +1,187 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<!-- 标题 -->
<div>其他出库详情</div>
<!-- start 添加修改按钮 -->
<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 class="first_row">
<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="8">
<div class="span-sty">业务类型</div>
<el-form-item><span class="addinputInfo">{{ formobj.busTypeValue }}</span></el-form-item>
</el-col>
<el-col :span="16">
<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 v-loading="listLoading" :data="formobj.otheroutDetailList" border style="width: 100%;">
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column label="商品ID" prop="goodsID" align="center" width="200" />
<el-table-column label="商品名称" prop="goodsSkuTitle" align="center" width="200" />
<el-table-column label="图号" prop="goodsSkuCode" align="center" width="150" />
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" width="150" />
<el-table-column label="单位" prop="unit" align="center" width="120" />
<el-table-column label="仓库" prop="warehouseName" align="center" width="200" />
<el-table-column label="库位" prop="warehouseRackCode" align="center" width="120" />
<!-- <el-table-column label="库存" prop="count" align="center" width="120" /> -->
<el-table-column label="入库单价" prop="inCost" align="center" width="120" />
<el-table-column label="出库数量" prop="outCount" align="center" width="120" />
<el-table-column label="金额" prop="amount" align="center" />
</el-table>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/storage/otherOutbound.js'
export default {
components: {},
data() {
return {
viewState: 1,
listLoading: false,
submitdisabled: 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) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
methods: {
indexMethod(index) {
return index + 1
},
showInfo(sid) {
req.fetchDetailsBySid(sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
//this.Array
this.formobj.otheroutDetailList.forEach(item => {
this.$set(item, 'amount', (Number(item.outCount) * Number(item.inCost)).toFixed(2))
})
}
})
.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>

168
yxt-as-ui/src/views/workFlow/qitachukuFlow/relation/chooseproducts.vue

@ -0,0 +1,168 @@
<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="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="120px" class="tab-header">
<el-form-item label="商品名称" class="searchlist">
<el-input v-model="listQuery.params.goodsSkuTitle" 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.manufacturerName" 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>
</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="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="warehouseRackCode" label="库位" align="center" />
<!-- <el-table-column prop="count" label="库存" align="center" /> -->
<!-- <el-table-column prop="manufacturerName" 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/otherOutbound.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: '',
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.sourceBillBySid(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.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>
Loading…
Cancel
Save