14 changed files with 2429 additions and 36 deletions
@ -0,0 +1,109 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export default { |
|||
|
|||
// 查询分页列表
|
|||
listPage: function(params) { |
|||
return request({ |
|||
url: '/as/v1/asoldpartreturnapply/confirmListPage', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
// 获取确认结果详情
|
|||
saveConfirmResult: function(data) { |
|||
return request({ |
|||
url: '/as/v1/asoldpartreturnconfirm/save', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
|
|||
// 获取确认结果详情
|
|||
fetchDetailsByMainSid: function(data) { |
|||
return request({ |
|||
url: '/as/v1/asoldpartreturnconfirm/fetchDetailsByMainSid/' + data, |
|||
method: 'get' |
|||
}); |
|||
}, |
|||
|
|||
|
|||
|
|||
// 初始化
|
|||
init: function(data) { |
|||
return request({ |
|||
url: '/as/v1/asoldpartreturnapply/fetchDetailsBySid/' + data, |
|||
method: 'get' |
|||
}); |
|||
}, |
|||
|
|||
|
|||
// 新增、保存
|
|||
save: function(data) { |
|||
return request({ |
|||
url: '/as/v1/asoldpartreturnapply/save', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
// 提交
|
|||
submit: function(data) { |
|||
return request({ |
|||
url: '/as/v1/asoldpartreturnapply/submit', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
|
|||
deleteBySids: function(data) { |
|||
return request({ |
|||
url: '/as/v1/asoldpartreturnapply/delBySids', |
|||
method: 'DELETE', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
// 查询分页列表
|
|||
getGoodsListPage: function(params) { |
|||
return request({ |
|||
url: '/wms/apiadmin/WmsOutBill/getInventoryList', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
// 下载模板
|
|||
downloadExcel: function() { |
|||
return request({ |
|||
url: '/as/v1/asoldpartreturnapply/downloadModPriceExcel', |
|||
method: 'post', |
|||
responseType: 'blob', // 表明返回服务器返回的数据类型
|
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
} |
@ -1,8 +1,535 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar ref="btnbar" view-title="旧件返厂申请厂家确认" :btndisabled="btndisabled" @btnhandle="btnHandle" /> |
|||
<div class="main-content"> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow"> |
|||
{{ searchxianshitit }} |
|||
</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form :inline="true" class="tab-header"> |
|||
<el-form-item label="分公司"> |
|||
<el-input v-model="queryParams.params.useOrgName" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="申请部门"> |
|||
<el-input v-model="queryParams.params.deptName" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="单据编号"> |
|||
<el-input v-model="queryParams.params.billNo" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="单据日期"> |
|||
<el-date-picker v-model="queryParams.params.createStartTime" type="date" placeholder="选择日期" |
|||
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> |
|||
</el-date-picker>至 |
|||
<el-date-picker v-model="queryParams.params.createEndTime" type="date" placeholder="选择日期" |
|||
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item label="办结日期"> |
|||
<el-date-picker v-model="queryParams.params.finishStartTime" type="date" placeholder="选择日期" |
|||
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> |
|||
</el-date-picker> |
|||
至 |
|||
<el-date-picker v-model="queryParams.params.finishEndTime" type="date" placeholder="选择日期" |
|||
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item label="厂家确认结果"> |
|||
<el-select v-model="queryParams.params.billState" placeholder="请选择"> |
|||
<el-option v-for="(item,i) in confirmResultsList" :key="i" :label="item.name" :value="item.sid"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<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> |
|||
</div> |
|||
</div> |
|||
<!-- Start 项目列表头部 --> |
|||
<div class="listtop"> |
|||
<div class="tit">旧件返厂申请列表</div> |
|||
</div> |
|||
<!-- End 项目列表头部 --> |
|||
<!-- Start 项目列表 --> |
|||
<div class=""> |
|||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" |
|||
@selection-change="selectionLineChangeHandle"> |
|||
<el-table-column fixed width="50" type="selection" align="center" /> |
|||
<el-table-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" :disabled="scope.row.nodeState!='待提交'" |
|||
@click="toEdit(scope.row)">办理</el-button> --> |
|||
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="nodeState" label="流程状态" align="center" /> |
|||
<el-table-column prop="billNo" label="单据编号" width="180" align="center" /> |
|||
<el-table-column prop="useOrgName" label="分公司" width="120" align="center" /> |
|||
<el-table-column prop="deptName" label="申请部门" width="120" align="center" /> |
|||
<el-table-column prop="createByName" label="申请人" align="center" /> |
|||
<el-table-column prop="createTime" label="申请日期" align="center" /> |
|||
<el-table-column prop="needReturnCount" label="应返厂数量合计" width="180" align="center" /> |
|||
<el-table-column prop="actualReturnCount" label="实际返厂数量合计" width="180" align="center" /> |
|||
<el-table-column label="附件" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<div style="color: #1890FF; text-decoration: underline ;" @click="showAdjunct(scope.row.filePaths)">查看 |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="厂家确认结果" align="center"> |
|||
<template slot-scope="scope"> |
|||
<div style="color: #1890FF; text-decoration: underline ;" @click="showResult(scope.row)"> |
|||
{{ scope.row.confirmResult }} |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
</el-table> |
|||
</div> |
|||
<!-- End 项目列表 --> |
|||
<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="loadList" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- End 查询和其列表部分 --> |
|||
<!-- 新增修改部分组件 --> |
|||
<!-- <divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" /> --> |
|||
<divInfo v-show="viewState == 4" ref="divinfo" @doback="resetState" @reloadlist="loadList" /> |
|||
|
|||
|
|||
<el-dialog title="附件" :visible.sync="dialogVisible" :before-close="handleClose"> |
|||
|
|||
<el-form ref="dataForm1" class="formadd" style="margin-top: -30px;"> |
|||
|
|||
<el-row class="first_row"> |
|||
<el-col :span="24" class="trightb"> |
|||
<el-image style="width: 120px;height: 120px; margin: 10px; background: #f0f;" |
|||
v-for="(item,index) in fileList" :src="item" :preview-src-list="[item]"> |
|||
</el-image> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
</el-form> |
|||
|
|||
|
|||
</el-dialog> |
|||
|
|||
|
|||
<el-dialog title="旧件返厂厂家确认详情" :visible.sync="dialogVisible2" :before-close="handleClose2"> |
|||
<el-form ref="dataForm1" class="formadd" style="margin-top: -40px;" :model="orderInfo"> |
|||
|
|||
<el-row class="first_row"> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">返件数量确认</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="16"> |
|||
<el-form-item class="trightb_item"> |
|||
<el-radio-group v-model="orderInfo.isUnanimous" size="small" :disabled="true"> |
|||
<el-radio :label="0">一致</el-radio> |
|||
<el-radio :label="1">不一致</el-radio> |
|||
</el-radio-group> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">备注</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="16"> |
|||
<el-form-item class="trightb_item"> |
|||
<span class="addinputw" style="width:100%">{{orderInfo.remarks}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">附件</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="16" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<el-image style="width: 120px;height: 120px; margin: 10px; " v-for="(item,index) in orderInfo.filePaths" |
|||
:src="item" :preview-src-list="[item]"> |
|||
</el-image> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</el-dialog> |
|||
|
|||
<el-dialog title="旧件返厂厂家确认" :visible.sync="dialogVisible3" :before-close="handleClose3"> |
|||
<el-form ref="dataForm1" class="formadd" style="margin-top: -40px;" :model="orderInfo"> |
|||
|
|||
<el-row class="first_row"> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">返件数量确认</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="16"> |
|||
<el-form-item class="trightb_item"> |
|||
<el-radio-group v-model="orderInfo.isUnanimous" size="small"> |
|||
<el-radio :label="0">一致</el-radio> |
|||
<el-radio :label="1">不一致</el-radio> |
|||
</el-radio-group> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">备注</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="16"> |
|||
<el-form-item class="trightb_item"> |
|||
<!-- <span class="addinputw" style="width:100%">{{orderInfo.remarks}}</span> --> |
|||
<el-input v-model="orderInfo.remarks" placeholder="" class="addinputw addinputInfo" clearable /> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">附件</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="16" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<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> |
|||
</el-form> |
|||
|
|||
<div class="btn" style="text-align: center; margin-top: 20px;"> |
|||
<el-button type="primary" size="mini" @click="saveResult()">保存</el-button> |
|||
<el-button type="primary" size="mini" @click="handleClose3()">关闭</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
|
|||
|
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
</script> |
|||
import req from '@/api/storage/manufacturerconfirm.js' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
// import divAdd from './manufacturerconfirmAdd.vue' |
|||
import divInfo from './manufacturerconfirmInfo.vue' |
|||
import uploadImg from '@/components/uploadFile/uploadImg' |
|||
export default { |
|||
|
|||
components: { |
|||
ButtonBar, |
|||
Pagination, |
|||
pageye, |
|||
// divAdd, |
|||
divInfo, |
|||
uploadImg |
|||
}, |
|||
data() { |
|||
return { |
|||
dialogVisible: false, |
|||
dialogVisible2: false, |
|||
dialogVisible3: false, |
|||
fileList: [], |
|||
orderInfo: { |
|||
filePaths: [] |
|||
}, |
|||
btndisabled: false, |
|||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
tableLoading: false, |
|||
dataList: [], |
|||
btnList: [{ |
|||
type: 'primary', |
|||
size: 'small', |
|||
icon: 'plus', |
|||
btnKey: 'toAdd', |
|||
btnLabel: '厂家确认' |
|||
}, |
|||
|
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
queryParams: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
name: '' |
|||
} |
|||
}, |
|||
sids: [], |
|||
selectionList: [], |
|||
confirmResultsList: [{ |
|||
name: "一致", |
|||
sid: "1" |
|||
}, |
|||
{ |
|||
name: "不一致", |
|||
sid: "2" |
|||
} |
|||
], |
|||
pathList: [], |
|||
imgList: [] |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
created() { |
|||
this.loadList() |
|||
}, |
|||
methods: { |
|||
handleClose() { |
|||
this.dialogVisible = false |
|||
}, |
|||
handleClose2() { |
|||
this.dialogVisible2 = false |
|||
}, |
|||
handleClose3() { |
|||
this.dialogVisible3 = false |
|||
}, |
|||
showAdjunct(paths) { |
|||
this.fileList = paths |
|||
this.dialogVisible = true |
|||
}, |
|||
saveResult() { |
|||
console.log("saveResult", this.orderInfo); |
|||
|
|||
req.saveConfirmResult(this.orderInfo).then((resp) => { |
|||
|
|||
|
|||
this.dialogVisible3 = false |
|||
this.orderInfo = { |
|||
filePaths: [] |
|||
} |
|||
this.loadList() |
|||
}).catch(() => { |
|||
|
|||
}) |
|||
|
|||
}, |
|||
showResult(row) { |
|||
|
|||
if (row.confirmResult == '未确认') { |
|||
this.$message({ |
|||
type: 'warning', |
|||
showClose: true, |
|||
message: '厂家暂未确认' |
|||
}) |
|||
} else { |
|||
|
|||
req.fetchDetailsByMainSid(row.sid).then((resp) => { |
|||
|
|||
<style> |
|||
</style> |
|||
console.log("fetchDetailsByMainSid", resp); |
|||
|
|||
this.orderInfo = resp.data |
|||
|
|||
this.dialogVisible2 = true |
|||
|
|||
}).catch(() => { |
|||
|
|||
}) |
|||
} |
|||
|
|||
|
|||
}, |
|||
selectionLineChangeHandle(val) { |
|||
console.log("val", val); |
|||
|
|||
this.selectionList = val |
|||
const aa = [] |
|||
val.forEach(element => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
|
|||
}, |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
switch (btnKey) { |
|||
case 'doDel': |
|||
this.doDel() |
|||
break |
|||
case 'toAdd': |
|||
this.toAdd() |
|||
break |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
loadList() { |
|||
this.tableLoading = true |
|||
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid') |
|||
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|||
this.queryParams.params.menuUrl = this.$route.path |
|||
req.listPage(this.queryParams).then((resp) => { |
|||
this.tableLoading = false |
|||
if (resp.success) { |
|||
const data = resp.data |
|||
this.queryParams.total = data.total |
|||
this.dataList = data.records |
|||
} else { |
|||
// 根据resp.code进行异常情况处理 |
|||
this.dataList = [] |
|||
this.queryParams.total = 0 |
|||
} |
|||
}).catch(() => { |
|||
this.tableLoading = false |
|||
}) |
|||
}, |
|||
|
|||
// 序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
dosearch() { |
|||
this.queryParams.current = 1 |
|||
this.loadList() |
|||
}, |
|||
resetQuery() { |
|||
this.queryParams = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
name: '' |
|||
} |
|||
} |
|||
this.loadList() |
|||
}, |
|||
doDel() { |
|||
|
|||
if (this.sids.length > 0) { |
|||
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
|||
this.$confirm(tip, '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
const loading = this.$loading({ |
|||
lock: true, |
|||
text: 'Loading', |
|||
spinner: 'el-icon-loading', |
|||
background: 'rgba(0, 0, 0, 0.7)' |
|||
}) |
|||
req.deleteBySids(this.sids).then((resp) => { |
|||
loading.close() |
|||
if (resp.success) { |
|||
this.$message({ |
|||
type: 'success', |
|||
message: resp.msg, |
|||
showClose: true |
|||
}) |
|||
this.loadList() |
|||
} else { |
|||
// 根据resp.code进行异常情况处理 |
|||
} |
|||
}).catch(e => { |
|||
loading.close() |
|||
}) |
|||
}).catch(() => {}) |
|||
} else { |
|||
this.$message({ |
|||
type: 'warning', |
|||
showClose: true, |
|||
message: '请至少选择一条记录进行删除操作' |
|||
}) |
|||
} |
|||
}, |
|||
|
|||
toAdd() { |
|||
|
|||
// this.viewState = 2 |
|||
// this.$refs['divadd'].showAdd() |
|||
|
|||
|
|||
if (this.sids.length == 1) { |
|||
this.dialogVisible3 = true |
|||
|
|||
this.orderInfo.mainSid = this.sids[0] |
|||
|
|||
} else { |
|||
this.$message({ |
|||
type: 'warning', |
|||
showClose: true, |
|||
message: '请选择一条记录' |
|||
}) |
|||
} |
|||
|
|||
}, |
|||
|
|||
toEdit(row) { |
|||
|
|||
this.viewState = 3 |
|||
this.$refs['divadd'].showEdit(row) |
|||
|
|||
}, |
|||
|
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
}, |
|||
toRelevancy(row) { |
|||
this.viewState = 4 |
|||
this.$refs['divinfo'].showEdit(row) |
|||
}, |
|||
|
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
backData(value) { |
|||
console.log('backData》》》》', value) |
|||
console.log('imgList', this.imgList) |
|||
|
|||
for (var i = 0; i < this.imgList.length; i++) { |
|||
this.orderInfo.filePaths.push(this.imgList[i].url) |
|||
} |
|||
|
|||
|
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
|||
|
@ -0,0 +1,575 @@ |
|||
<template> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<!-- 标题 --> |
|||
<div>{{title}}旧件返厂申请</div> |
|||
<!-- start 添加修改按钮 --> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="importDetail">导入厂家返件明细</el-button> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit">提交</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
<!-- end 添加修改按钮 --> |
|||
<!-- end 详情按钮 --> |
|||
</div> |
|||
<div class="listconadd"> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|||
<div class="title"> |
|||
<div>基础信息</div> |
|||
</div> |
|||
<el-row class="first_row"> |
|||
|
|||
<!-- <el-col :span="12"> |
|||
<div class="span-sty">单据编号</div> |
|||
<el-form-item><span class="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.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"><span class="must">*</span> 申请日期</div> |
|||
<el-form-item prop="createTime"> |
|||
<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="12"> |
|||
<div class="span-sty">分公司</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.useOrgName }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
|
|||
</el-row> |
|||
<el-row> |
|||
|
|||
|
|||
<el-col :span="12"> |
|||
<div class="span-sty">流程状态</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.nodeState }}</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' }" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
<div class="title"> |
|||
<div>返厂旧件列表</div> |
|||
</div> |
|||
<el-table v-loading="listLoading" :data="formobj.asOldpartreturnList" border> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<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="manufacturerName" 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="goodsSkuCode" label="商品编码" align="center" /> |
|||
<el-table-column prop="manufacturerName" label="厂家" align="center" /> |
|||
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" /> |
|||
<el-table-column prop="unit" label="单位" align="center" /> |
|||
<el-table-column label="需返厂数量" align="center" width="180"> |
|||
<template slot-scope="scope"> |
|||
<el-input ref="focusAssumptionInput" v-model="scope.row.needReturnCount" clearable placeholder="" |
|||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="实际返厂数量" align="center" width="180"> |
|||
<template slot-scope="scope"> |
|||
<el-input ref="focusAssumptionInput" v-model="scope.row.actualReturnCount" clearable placeholder="" |
|||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="差异说明" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<el-input ref="focusAssumptionInput" v-model="scope.row.remarks" clearable placeholder="" /> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
</el-form> |
|||
|
|||
</div> |
|||
|
|||
<!-- 导入 --> |
|||
<el-dialog :visible.sync="dialogVisible" width="60%" :show-close="false"> |
|||
<div style="margin-top: -40px;"> |
|||
<el-button size="medium" type="text" style="font-weight: bold" @click="downLoad">下载导入厂家返厂明细模板</el-button> |
|||
</div> |
|||
<el-card class="box-card"> |
|||
<div> |
|||
<el-upload ref="upload" class="upload-demo" accept=".xls,.xlsx" name="file" :action="updateAction" |
|||
:on-success="handleSuccess" :file-list="fileList" :auto-upload="false" :multiple="false" :limit="1" |
|||
:data="uploadData" :headers="headers"> |
|||
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> |
|||
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传</el-button> |
|||
</el-upload> |
|||
</div> |
|||
<div> |
|||
<h3>文件上传结果</h3> |
|||
<el-card class="box-card"> |
|||
<div>{{ uploadResultMesssage }}</div> |
|||
</el-card> |
|||
</div> |
|||
</el-card> |
|||
<div slot="footer" class="dialog-footer" style="text-align: center"> |
|||
<el-button type="primary" size="small" @click="handleConfirm">确定</el-button> |
|||
<el-button size="small" @click="dialogVisible = false">取消</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
|
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/manufacturerconfirm.js' |
|||
import uploadImg from '@/components/uploadFile/uploadImg' |
|||
import { |
|||
getOrgSidByPath |
|||
} from '@/api/Common/dictcommons' |
|||
|
|||
export default { |
|||
components: { |
|||
uploadImg |
|||
}, |
|||
data() { |
|||
return { |
|||
dialogVisible: false, |
|||
updateAction: process.env.VUE_APP_BASE_API + '/as/v1/asoldpartreturnapply/getExcelInfo', |
|||
fileList: [], |
|||
uploadSuccess: false, |
|||
uploadResultMesssage: '', |
|||
uploadData: { |
|||
sid: '' |
|||
}, |
|||
headers: { |
|||
token: window.sessionStorage.getItem('token') |
|||
}, |
|||
title: '【新增】', |
|||
listLoading: false, |
|||
submitdisabled: false, |
|||
formobj: { |
|||
"sid": "", |
|||
"remarks": "", |
|||
"createBySid": window.sessionStorage.getItem('userSid'), |
|||
"createByName": window.sessionStorage.getItem('name'), |
|||
"deptSid": window.sessionStorage.getItem('defaultOrgPathName').substring(window |
|||
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1), |
|||
"deptName": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage |
|||
.getItem('defaultOrgPath').lastIndexOf('/') + 1), |
|||
"createTime": "", |
|||
"billNo": "", |
|||
"filePaths": [], |
|||
"useOrgSid": '', |
|||
"useOrgName": '', |
|||
"orgSidPath": window.sessionStorage.getItem('orgSidPath'), |
|||
"procDefId": "", |
|||
"nodeId": "", |
|||
"procInstId": "", |
|||
"nodeState": "", |
|||
"taskId": "", |
|||
"finishTime": "", |
|||
"asOldpartreturnList": [ |
|||
|
|||
] |
|||
}, |
|||
hideUploadBtn: false, |
|||
|
|||
// commodity商品 |
|||
commodityKey: 1, |
|||
commodityLoading: false, |
|||
commodityQuery: { |
|||
current: 1, |
|||
size: 2, |
|||
total: 0, |
|||
params: { |
|||
name: '', |
|||
inOrg: "", |
|||
outOrg: "" |
|||
} |
|||
}, |
|||
commodityData: [], |
|||
isUpdata: false, |
|||
imgList: [], |
|||
rules: { |
|||
createTime: [{ |
|||
required: true, |
|||
message: '申请日期不能为空', |
|||
trigger: 'change' |
|||
}], |
|||
filePaths: [{ |
|||
required: true, |
|||
message: '附件不能为空', |
|||
trigger: 'blur' |
|||
}], |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
getOrgSidByPath({ |
|||
orgPath: window.sessionStorage.getItem('defaultOrgPath') |
|||
}).then((res) => { |
|||
if (res.success) { |
|||
this.formobj.createOrgSid = res.data |
|||
this.formobj.useOrgSid = res.data |
|||
} |
|||
}) |
|||
}, |
|||
methods: { |
|||
|
|||
commodityInput(value) { |
|||
this.commodityQuery.params.name = value |
|||
this.commodityLoading = true |
|||
this.commodityQuery.params.userSid = window.sessionStorage.getItem('userSid') |
|||
this.commodityQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|||
this.commodityQuery.params.menuUrl = this.$route.path |
|||
req.getGoodsListPage(this.commodityQuery).then((response) => { |
|||
if (response.success) { |
|||
this.commodityLoading = false |
|||
this.commodityData = response.data.records |
|||
this.commodityQuery.total = response.data.total |
|||
} else { |
|||
this.serviceLoading = false |
|||
this.commodityData = [] |
|||
this.commodityQuery.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
commodityDelete(index) { |
|||
this.formobj.asOldpartreturnList.splice(index, 1) |
|||
}, |
|||
commodityCurrentChange(value, row) { |
|||
console.log("commodityCurrentChange》》》》", value) |
|||
console.log("commodityCurrentChange》》》》", row) |
|||
row.sid = '' |
|||
row.remarks = '' |
|||
row.mainSid = '' |
|||
row.manufacturerName = value.manufacturerName |
|||
row.goodsSkuName = value.goodsSpuName |
|||
row.goodsSkuCode = value.goodsSkuCode |
|||
row.goodsSkuOwnSpec = value.goodsSkuOwnSpec |
|||
row.unit = value.unit |
|||
row.needReturnCount = 0 |
|||
row.actualReturnCount = 0 |
|||
document.body.click() |
|||
}, |
|||
|
|||
// 在头部标题上添加“新增”图标 |
|||
commodityHeader(h, { |
|||
column |
|||
}) { |
|||
return h( |
|||
'div', |
|||
[ |
|||
h('span', column.label), |
|||
h('i', { |
|||
class: 'add-btn-icon el-icon-plus', |
|||
style: 'color: red;font-size:20px', |
|||
on: { |
|||
click: this.commodityAdd // 点击执行函数 |
|||
} |
|||
}) |
|||
] |
|||
) |
|||
}, |
|||
commodityAdd() { |
|||
this.formobj.asOldpartreturnList.push({ |
|||
"sid": "", |
|||
"remarks": "", |
|||
"mainSid": "", |
|||
"manufacturerName": "", |
|||
"goodsSkuName": "", |
|||
"goodsSkuCode": "", |
|||
"goodsSkuOwnSpec": "", |
|||
"unit": "", |
|||
"needReturnCount": 0, |
|||
"actualReturnCount": 0 |
|||
}) |
|||
}, |
|||
|
|||
|
|||
doGoodsDel(sid) { |
|||
console.log("doGoodsDel》》》》", sid) |
|||
this.$confirm("是否确定删除此商品?", '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
const index = this.formobj.asOldpartreturnList.findIndex((item) => item === row) |
|||
console.log("index》》》》", index) |
|||
this.formobj.asOldpartreturnList.splice(index, 1) |
|||
|
|||
}) |
|||
}, |
|||
|
|||
indexMethod(index) { |
|||
return Number(index) + 1 |
|||
}, |
|||
importDetail() { |
|||
this.dialogVisible = true |
|||
}, |
|||
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: '保存成功' |
|||
}) |
|||
this.handleReturn('true') |
|||
} 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: '保存成功' |
|||
}) |
|||
this.handleReturn('true') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} |
|||
}) |
|||
|
|||
}, |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.imgList = [] |
|||
this.formobj = { |
|||
"sid": "", |
|||
"remarks": "", |
|||
"createBySid": window.sessionStorage.getItem('userSid'), |
|||
"createByName": window.sessionStorage.getItem('name'), |
|||
"deptSid": window.sessionStorage.getItem('defaultOrgPathName').substring(window |
|||
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1), |
|||
"deptName": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage |
|||
.getItem('defaultOrgPath').lastIndexOf('/') + 1), |
|||
"createTime": "", |
|||
"billNo": "", |
|||
"filePaths": [], |
|||
"useOrgSid": '', |
|||
"useOrgName": '', |
|||
"orgSidPath": window.sessionStorage.getItem('orgSidPath'), |
|||
"procDefId": "", |
|||
"nodeId": "", |
|||
"procInstId": "", |
|||
"nodeState": "", |
|||
"taskId": "", |
|||
"finishTime": "", |
|||
"asOldpartreturnList": [ |
|||
|
|||
] |
|||
} |
|||
this.submitdisabled = false |
|||
this.isUpdata = false |
|||
this.$emit('doback') |
|||
}, |
|||
|
|||
showAdd() { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.title = "【新增】" |
|||
this.isUpdata = false |
|||
}, |
|||
showEdit(row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.title = "【修改】" |
|||
this.isUpdata = true |
|||
var params = { |
|||
sid: row.sid |
|||
} |
|||
|
|||
req.init(row.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 = {} |
|||
}) |
|||
}, |
|||
|
|||
downLoad() { |
|||
const loading = this.$loading({ |
|||
lock: true, |
|||
text: 'Loading', |
|||
spinner: 'el-icon-loading', |
|||
background: 'rgba(0, 0, 0, 0.7)' |
|||
}) |
|||
req.downloadExcel().then((resp) => { |
|||
loading.close() |
|||
const blob = new Blob([resp], { |
|||
type: 'application/vnd.ms-excel' |
|||
}) |
|||
const fileName = '导入厂家返厂明细模版' + '.xls' |
|||
const elink = document.createElement('a') |
|||
elink.download = fileName |
|||
elink.style.display = 'nonde' |
|||
elink.href = URL.createObjectURL(blob) |
|||
document.body.appendChild(elink) |
|||
elink.click() |
|||
URL.revokeObjectURL(elink.href) |
|||
document.body.removeChild(elink) |
|||
}).catch(() => { |
|||
loading.close() |
|||
}) |
|||
}, |
|||
submitUpload() { |
|||
this.$refs.upload.submit() |
|||
}, |
|||
handleSuccess(resp, file, fileList) { |
|||
const _this = this |
|||
_this.uploadResultMesssage = resp.msg |
|||
_this.uploadSuccess = resp.success |
|||
|
|||
if (resp.success) { |
|||
|
|||
for (var i = 0; i < resp.data.length; i++) { |
|||
this.formobj.asOldpartreturnList.push(resp.data[i]) |
|||
} |
|||
|
|||
} |
|||
|
|||
}, |
|||
handleConfirm() { |
|||
if (!this.uploadSuccess) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请先上传导入厂家返件明细' |
|||
}) |
|||
return |
|||
} |
|||
this.dialogVisible = false |
|||
}, |
|||
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) |
|||
} |
|||
|
|||
|
|||
} |
|||
} |
|||
} |
|||
</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,172 @@ |
|||
<template> |
|||
<div> |
|||
|
|||
<div class="tab-header webtop"> |
|||
<!-- 标题 --> |
|||
<div>旧件返厂</div> |
|||
<!-- start 添加修改按钮 --> |
|||
<div> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
<!-- end 添加修改按钮 --> |
|||
<!-- end 详情按钮 --> |
|||
</div> |
|||
|
|||
<div class="listconadd"> |
|||
|
|||
<el-form ref="form_obj" :model="formobj" class="formaddcopy02"> |
|||
<!-- <div class="title"> |
|||
<div>基础信息</div> |
|||
</div> --> |
|||
<el-row class="first_row"> |
|||
|
|||
<!-- <el-col :span="12"> |
|||
<div class="span-sty">单据编号</div> |
|||
<el-form-item><span class="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.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="12"> |
|||
<div class="span-sty">分公司</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.useOrgName }}</span></el-form-item> |
|||
</el-col> |
|||
|
|||
|
|||
</el-row> |
|||
<el-row> |
|||
|
|||
<el-col :span="12"> |
|||
<div class="span-sty">流程状态</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.nodeState }}</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" |
|||
style="display: flex;align-items: center;justify-content: space-between;height:40px;margin-top: 10px;"> |
|||
<div>商品列表</div> |
|||
</div> |
|||
<el-table v-loading="listLoading" :data="formobj.asOldpartreturnList" border style="width: 100%;" |
|||
:row-style="{height: '40px'}"> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column label="商品名称" prop="goodsSkuName" align="center" /> |
|||
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" /> |
|||
<el-table-column label="厂家" prop="manufacturerName" align="center" /> |
|||
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" /> |
|||
<el-table-column label="单位" prop="unit" align="center" /> |
|||
<el-table-column label="需返厂数量" prop="needReturnCount" align="center" /> |
|||
<el-table-column label="实际返厂数量" prop="actualReturnCount" align="center" /> |
|||
<el-table-column label="差异说明" prop="remarks" align="center" /> |
|||
</el-table> |
|||
|
|||
</el-form> |
|||
|
|||
</div> |
|||
|
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/manufacturerconfirm.js' |
|||
|
|||
export default { |
|||
components: {}, |
|||
data() { |
|||
return { |
|||
listLoading: false, |
|||
submitdisabled: false, |
|||
formobj: {}, |
|||
} |
|||
}, |
|||
methods: { |
|||
indexMethod(index) { |
|||
return index + 1 |
|||
}, |
|||
|
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.$emit('doback') |
|||
}, |
|||
|
|||
showAdd() { |
|||
|
|||
}, |
|||
showEdit(row) { |
|||
|
|||
var params = { |
|||
sid: row.sid |
|||
} |
|||
req.init(row.sid) |
|||
.then(resp => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
} |
|||
}) |
|||
.catch(e => { |
|||
this.formobj = {} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</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); |
|||
} |
|||
|
|||
.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,416 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ viewTitle }}</div> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="openCountersign('加签')">加 签</el-button> |
|||
<el-button type="primary" size="small" @click="openAgree('同意')">同 意</el-button> |
|||
<el-button type="danger" size="small" @click="openReject('驳回')">驳 回</el-button> |
|||
<el-button type="danger" size="small" @click="openStop('终止')">终 止</el-button> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请人</div> |
|||
<el-form-item><span class="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.createDeptName }}</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> |
|||
<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" |
|||
style="display: flex;align-items: center;justify-content: space-between;height:40px;margin-top: 10px;"> |
|||
<div>商品列表</div> |
|||
</div> |
|||
<el-table v-loading="listLoading" :data="formobj.asOldpartreturnList" border style="width: 100%;" |
|||
:row-style="{height: '40px'}"> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column label="商品名称" prop="goodsSkuName" align="center" /> |
|||
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" /> |
|||
<el-table-column label="厂家" prop="manufacturerName" align="center" /> |
|||
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" /> |
|||
<el-table-column label="单位" prop="unit" align="center" /> |
|||
<el-table-column label="需返厂数量" prop="needReturnCount" align="center" /> |
|||
<el-table-column label="实际返厂数量" prop="actualReturnCount" align="center" /> |
|||
<el-table-column label="差异说明" prop="remarks" 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/oldPartsFactory' |
|||
import { selectStaffListss } from '@/api/Common/dictcommons' |
|||
|
|||
export default { |
|||
name: 'WorkSLRSettlementDaiBan', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
viewState: 1, |
|||
submitdisabled: false, |
|||
tableKey: 0, |
|||
index: 0, |
|||
formobj: { |
|||
"sid": "", |
|||
"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), |
|||
"createTime": "", |
|||
"billNo": "", |
|||
"filePaths": [], |
|||
"useOrgSid": '', |
|||
"useOrgName": '', |
|||
"orgSidPath": window.sessionStorage.getItem('orgSidPath'), |
|||
"procDefId": "", |
|||
"nodeId": "", |
|||
"procInstId": "", |
|||
"nodeState": "", |
|||
"taskId": "", |
|||
"finishTime": "", |
|||
"asOldpartreturnList": [ |
|||
|
|||
] |
|||
}, |
|||
rules: {}, |
|||
options: [], |
|||
operation: '', // 点击操作按钮 |
|||
dialogList: { |
|||
comment: '' |
|||
}, |
|||
startTask: true, |
|||
current: { |
|||
taskDefKey: '', |
|||
taskName: '' // 当前环节名称 |
|||
}, |
|||
nextNode: {}, // 下一环节 |
|||
nodeDialogVisible: false, |
|||
currentLink: true, |
|||
countersignLink: false, |
|||
// 环节所需参数 |
|||
linkByParameter: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
orgSidPath: '', |
|||
taskDefKey: '', |
|||
userSid: '' |
|||
}, |
|||
// 加签按钮所需参数 |
|||
countersign: { |
|||
taskId: '', |
|||
assignee: '', |
|||
userSid: '', |
|||
instanceId: '', |
|||
views: '' |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
console.log('url:' + window.location.href) |
|||
var one = window.location.href.indexOf('&data') + 6 |
|||
const data = window.location.href.substr(one) // 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' |
|||
} |
|||
}, '*') |
|||
}, |
|||
|
|||
methods: { |
|||
showInfo(sid) { |
|||
this.viewTitle = '旧件返厂申请详情' |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
req.fetchBySid(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,211 @@ |
|||
<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.createDeptName }}</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> |
|||
<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" |
|||
style="display: flex;align-items: center;justify-content: space-between;height:40px;margin-top: 10px;"> |
|||
<div>商品列表</div> |
|||
</div> |
|||
<el-table v-loading="listLoading" :data="formobj.asOldpartreturnList" border style="width: 100%;" |
|||
:row-style="{height: '40px'}"> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column label="商品名称" prop="goodsSkuName" align="center" /> |
|||
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" /> |
|||
<el-table-column label="厂家" prop="manufacturerName" align="center" /> |
|||
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" /> |
|||
<el-table-column label="单位" prop="unit" align="center" /> |
|||
<el-table-column label="需返厂数量" prop="needReturnCount" align="center" /> |
|||
<el-table-column label="实际返厂数量" prop="actualReturnCount" align="center" /> |
|||
<el-table-column label="差异说明" prop="remarks" align="center" /> |
|||
</el-table> |
|||
|
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/oldPartsFactory' |
|||
|
|||
export default { |
|||
name: 'WorkSLRSettlementEdit', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
viewState: 1, |
|||
submitdisabled: false, |
|||
tableKey: 0, |
|||
index: 0, |
|||
// service服务 |
|||
serviceKey: 1, |
|||
// subjoin附加项目 |
|||
subjoinKey: 2, |
|||
formobj: { |
|||
"sid": "", |
|||
"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), |
|||
"createTime": "", |
|||
"billNo": "", |
|||
"filePaths": [], |
|||
"useOrgSid": '', |
|||
"useOrgName": '', |
|||
"orgSidPath": window.sessionStorage.getItem('orgSidPath'), |
|||
"procDefId": "", |
|||
"nodeId": "", |
|||
"procInstId": "", |
|||
"nodeState": "", |
|||
"taskId": "", |
|||
"finishTime": "", |
|||
"asOldpartreturnList": [ |
|||
|
|||
] |
|||
}, |
|||
rules: {} |
|||
} |
|||
}, |
|||
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: { |
|||
|
|||
}, |
|||
methods: { |
|||
showInfo(sid) { |
|||
this.viewTitle = '【编辑】旧件返厂申请' |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
req.fetchBySid(sid).then((res) => { |
|||
if (res.success) { |
|||
this.formobj = res.data |
|||
} |
|||
}) |
|||
}, |
|||
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; |
|||
} |
|||
</style> |
@ -0,0 +1,215 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ viewTitle }}</div> |
|||
<div> |
|||
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">申请人</div> |
|||
<el-form-item><span class="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.createDeptName }}</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> |
|||
<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" |
|||
style="display: flex;align-items: center;justify-content: space-between;height:40px;margin-top: 10px;"> |
|||
<div>商品列表</div> |
|||
</div> |
|||
<el-table v-loading="listLoading" :data="formobj.asOldpartreturnList" border style="width: 100%;" |
|||
:row-style="{height: '40px'}"> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column label="商品名称" prop="goodsSkuName" align="center" /> |
|||
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" /> |
|||
<el-table-column label="厂家" prop="manufacturerName" align="center" /> |
|||
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" /> |
|||
<el-table-column label="单位" prop="unit" align="center" /> |
|||
<el-table-column label="需返厂数量" prop="needReturnCount" align="center" /> |
|||
<el-table-column label="实际返厂数量" prop="actualReturnCount" align="center" /> |
|||
<el-table-column label="差异说明" prop="remarks" align="center" /> |
|||
</el-table> |
|||
|
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/oldPartsFactory' |
|||
|
|||
export default { |
|||
name: 'WorkSLRSettlementYiBan', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
viewState: 1, |
|||
submitdisabled: false, |
|||
tableKey: 0, |
|||
index: 0, |
|||
// service服务 |
|||
serviceKey: 1, |
|||
// subjoin附加项目 |
|||
subjoinKey: 2, |
|||
formobj: { |
|||
"sid": "", |
|||
"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), |
|||
"createTime": "", |
|||
"billNo": "", |
|||
"filePaths": [], |
|||
"useOrgSid": '', |
|||
"useOrgName": '', |
|||
"orgSidPath": window.sessionStorage.getItem('orgSidPath'), |
|||
"procDefId": "", |
|||
"nodeId": "", |
|||
"procInstId": "", |
|||
"nodeState": "", |
|||
"taskId": "", |
|||
"finishTime": "", |
|||
"asOldpartreturnList": [ |
|||
|
|||
] |
|||
}, |
|||
rules: {}, |
|||
// 环节所需参数 |
|||
linkByParameter: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
orgSidPath: '', |
|||
taskDefKey: '', |
|||
userSid: '' |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
console.log('url:' + window.location.href) |
|||
var one = window.location.href.indexOf('&data') + 6 |
|||
const data = window.location.href.substr(one) // 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: { |
|||
|
|||
}, |
|||
methods: { |
|||
showInfo(sid) { |
|||
this.viewTitle = '旧件返厂申请详情' |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
req.fetchBySid(sid).then((res) => { |
|||
if (res.success) { |
|||
this.formobj = res.data |
|||
if (this.formobj.sitemVos.length > 0) { |
|||
this.formobj.sitemVos.forEach((e) => { |
|||
if (e.staffNameList.length > 0) { |
|||
e.repairerName = e.staffNameList.join(',') |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
}) |
|||
}, |
|||
/** 确认撤回任务 */ |
|||
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