Browse Source

Merge remote-tracking branch 'origin/master'

master
ligaode 2 days ago
parent
commit
7d971902a6
  1. 663
      yxt-as-ui/src/views/storage/manufacturerconfirm/index.vue
  2. 317
      yxt-as-ui/src/views/storage/manufacturerconfirm/manufacturerconfirmAdd.vue
  3. 175
      yxt-as-ui/src/views/storage/manufacturerconfirm/manufacturerconfirmInfo.vue
  4. 717
      yxt-as-ui/src/views/storage/oldPartsFactory/index.vue
  5. 172
      yxt-as-ui/src/views/storage/oldPartsFactory/manufacturerconfirmInfo.vue
  6. 497
      yxt-as-ui/src/views/storage/oldPartsFactory/oldPartsFactoryAdd.vue
  7. 178
      yxt-as-ui/src/views/storage/oldPartsFactory/oldPartsFactoryInfo.vue
  8. 642
      yxt-as-ui/src/views/workFlow/oldPartsFactoryFlow/oldPartsFactoryDaiBan.vue
  9. 282
      yxt-as-ui/src/views/workFlow/oldPartsFactoryFlow/oldPartsFactoryEdit.vue
  10. 293
      yxt-as-ui/src/views/workFlow/oldPartsFactoryFlow/oldPartsFactoryYiBan.vue

663
yxt-as-ui/src/views/storage/manufacturerconfirm/index.vue

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div v-show="viewState == 1"> <div v-show="viewState == 1">
<button-bar ref="btnbar" view-title="旧件返厂确认管理" :btndisabled="btndisabled" @btnhandle="btnHandle" /> <button-bar ref="btnbar" view-title="旧件返厂确认管理" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div class="main-content"> <div class="main-content">
<div class="searchcon"> <div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow"> <el-button size="small" class="searchbtn" @click="clicksearchShow">
@ -10,40 +10,33 @@
<div v-show="isSearchShow" class="search"> <div v-show="isSearchShow" class="search">
<el-form :inline="true" class="tab-header"> <el-form :inline="true" class="tab-header">
<el-form-item label="分公司"> <el-form-item label="分公司">
<el-input v-model="queryParams.params.useOrgName" placeholder="" clearable /> <el-input v-model="queryParams.params.useOrgName" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="申请部门"> <el-form-item label="申请部门">
<el-input v-model="queryParams.params.deptName" placeholder="" clearable /> <el-input v-model="queryParams.params.deptName" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="申请人"> <el-form-item label="申请人">
<el-input v-model="queryParams.params.createByName" placeholder="" clearable /> <el-input v-model="queryParams.params.createByName" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="单据编号"> <el-form-item label="单据编号">
<el-input v-model="queryParams.params.billNo" placeholder="" clearable /> <el-input v-model="queryParams.params.billNo" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="单据日期"> <el-form-item label="单据日期">
<el-date-picker v-model="queryParams.params.createStartTime" type="date" placeholder="选择日期" <el-date-picker v-model="queryParams.params.createStartTime" type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;" />
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> <span style="padding: 0 8px"></span>
</el-date-picker> <el-date-picker v-model="queryParams.params.createEndTime" type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;" />
<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>
<el-form-item label="办结日期"> <el-form-item label="办结日期">
<el-date-picker v-model="queryParams.params.finishStartTime" type="date" placeholder="选择日期" <el-date-picker v-model="queryParams.params.finishStartTime" type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;" />
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> <span style="padding: 0 8px"></span>
</el-date-picker> <el-date-picker v-model="queryParams.params.finishEndTime" type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;" />
<el-date-picker v-model="queryParams.params.finishEndTime" type="date" placeholder="选择日期"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
</el-date-picker>
</el-form-item> </el-form-item>
<!-- <el-form-item label="厂家确认结果"> <el-form-item label="厂家确认结果">
<el-select v-model="queryParams.params.billState" placeholder="请选择"> <el-select v-model="queryParams.params.confirmResult" placeholder="请选择">
<el-option v-for="(item,i) in confirmResultsList" :key="i" :label="item.name" :value="item.sid"> <el-option v-for="(item,i) in confirmResultsList" :key="i" :label="item.name" :value="item.sid">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> --> </el-form-item>
</el-form> </el-form>
<div class="btn" style="text-align: center;"> <div class="btn" style="text-align: center;">
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button> <el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
@ -58,481 +51,257 @@
<!-- End 项目列表头部 --> <!-- End 项目列表头部 -->
<!-- Start 项目列表 --> <!-- Start 项目列表 -->
<div class=""> <div class="">
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" <el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" @selection-change="selectionLineChangeHandle">
@selection-change="selectionLineChangeHandle"> <el-table-column fixed width="50" type="selection" align="center"/>
<el-table-column fixed width="50" type="selection" align="center" /> <el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column fixed label="操作" align="center" width="100"> <el-table-column fixed label="操作" align="center" width="100">
<template slot-scope="scope"> <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> <el-button type="primary" size="mini" @click="toRelevancy(scope.row)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="nodeState" label="流程状态" align="center" /> <el-table-column prop="nodeState" label="流程状态" align="center"/>
<el-table-column prop="billNo" label="单据编号" width="180" 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="useOrgName" label="分公司" width="120" align="center"/>
<el-table-column prop="deptName" 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="createByName" label="申请人" align="center"/>
<el-table-column prop="createTime" 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="needReturnCount" label="应返厂数量合计" width="180" align="center"/>
<el-table-column prop="actualReturnCount" label="实际返厂数量合计" width="180" align="center" /> <el-table-column prop="actualReturnCount" label="实际返厂数量合计" width="180" align="center"/>
<el-table-column label="附件" align="center" width="100"> <el-table-column label="附件" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="color: #1890FF; text-decoration: underline ;" @click="showAdjunct(scope.row.filePaths)">查看 <div style="color: #1890FF; text-decoration: underline ;" @click="showAdjunct(scope.row.filePaths)">查看
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="confirmCount" label="厂家确认数量" width="180" align="center" /> <el-table-column prop="confirmCount" label="厂家确认数量" width="180" align="center"/>
<!-- <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> </el-table>
</div> </div>
<!-- End 项目列表 --> <!-- End 项目列表 -->
<div class="pages"> <div class="pages">
<div class="tit" /> <div class="tit"/>
<!-- 翻页 --> <!-- 翻页 -->
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" <pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="loadList"/>
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
</div> </div>
</div> </div>
</div> </div>
<!-- End 查询和其列表部分 --> <!-- End 查询和其列表部分 -->
<!-- 新增修改部分组件 --> <!-- 新增修改部分组件 -->
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" /> <divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList"/>
<divInfo v-show="viewState == 4" ref="divinfo" @doback="resetState" @reloadlist="loadList" /> <divInfo v-show="viewState == 4" ref="divinfo" @doback="resetState" @reloadlist="loadList"/>
<el-dialog title="附件" :visible.sync="dialogVisible" :before-close="handleClose"> <el-dialog title="附件" :visible.sync="dialogVisible" :before-close="handleClose">
<el-form ref="dataForm1" class="formadd" style="margin-top: -30px;"> <el-form ref="dataForm1" class="formadd" style="margin-top: -30px;">
<el-row class="first_row"> <el-row class="first_row">
<el-col :span="24" class="trightb"> <el-col :span="24" class="trightb">
<el-image style="width: 120px;height: 120px; margin: 10px; background: #f0f;" <el-image style="width: 120px;height: 120px; margin: 10px; background: #f0f;" v-for="(item,index) in fileList" :key="index" :src="item" :preview-src-list="[item]">
v-for="(item,index) in fileList" :src="item" :preview-src-list="[item]">
</el-image> </el-image>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
</el-dialog> </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> </div>
</template> </template>
<script> <script>
import req from '@/api/storage/manufacturerconfirm.js' import req from '@/api/storage/manufacturerconfirm.js'
import ButtonBar from '@/components/ButtonBar' import ButtonBar from '@/components/ButtonBar'
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import divAdd from './manufacturerconfirmAdd.vue'
import divAdd from './manufacturerconfirmAdd.vue' import divInfo from './manufacturerconfirmInfo.vue'
import divInfo from './manufacturerconfirmInfo.vue'
import uploadImg from '@/components/uploadFile/uploadImg' export default {
export default {
components: {
components: { ButtonBar,
ButtonBar, Pagination,
Pagination, divAdd,
pageye, divInfo
divAdd, },
divInfo, data() {
uploadImg return {
}, dialogVisible: false,
data() { fileList: [],
return { btndisabled: false,
dialogVisible: false, viewState: 1, // 1 2 3 4
dialogVisible2: false, isSearchShow: false,
dialogVisible3: false, searchxianshitit: '显示查询条件',
fileList: [], tableLoading: false,
orderInfo: { dataList: [],
filePaths: [] btnList: [
{
type: 'primary',
size: 'small',
icon: 'plus',
btnKey: 'toAdd',
btnLabel: '厂家确认'
}, },
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', type: 'info',
size: 'small', size: 'small',
icon: 'cross', icon: 'cross',
btnKey: 'doClose', btnKey: 'doClose',
btnLabel: '关闭' btnLabel: '关闭'
} }
], ],
queryParams: { queryParams: {
current: 1, current: 1,
size: 10, size: 10,
total: 0, total: 0,
params: { params: {
name: '' useOrgName: '',
} deptName: '',
createByName: '',
billNo: '',
createStartTime: '',
createEndTime: '',
finishStartTime: '',
finishEndTime: '',
confirmResult: '',
userSid: '',
orgPath: '',
menuUrl: ''
}
},
sids: [],
selectionList: [],
confirmResultsList: [
{
name: '未确认',
sid: '1'
}, },
sids: [], {
selectionList: [], name: '已确认',
confirmResultsList: [{ sid: '2'
name: "一致", }
sid: "1" ]
}, }
{ },
name: "不一致", mounted() {
sid: "2" this.$refs['btnbar'].setButtonList(this.btnList)
} },
], created() {
pathList: [], this.loadList()
imgList: [] },
} methods: {
handleClose() {
this.dialogVisible = false
}, },
mounted() { showAdjunct(paths) {
this.$refs['btnbar'].setButtonList(this.btnList) this.fileList = paths
this.dialogVisible = true
}, },
created() { selectionLineChangeHandle(val) {
this.loadList() this.selectionList = val
const aa = []
val.forEach(element => {
aa.push(element.sid)
})
this.sids = aa
}, },
methods: { //
handleClose() { clicksearchShow() {
this.dialogVisible = false this.isSearchShow = !this.isSearchShow
}, if (this.isSearchShow) {
handleClose2() { this.searchxianshitit = '隐藏查询条件'
this.dialogVisible2 = false } else {
}, this.searchxianshitit = '显示查询条件'
handleClose3() { }
this.dialogVisible3 = false },
}, btnHandle(btnKey) {
showAdjunct(paths) { switch (btnKey) {
this.fileList = paths case 'toAdd':
this.dialogVisible = true this.toAdd()
}, break
saveResult() { case 'doClose':
console.log("saveResult", this.orderInfo); this.doClose()
break
req.saveConfirmResult(this.orderInfo).then((resp) => { default:
break
}
this.dialogVisible3 = false },
this.orderInfo = { loadList() {
filePaths: [] this.tableLoading = true
} this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
this.loadList() this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
}).catch(() => { this.queryParams.params.menuUrl = this.$route.path
req.listPage(this.queryParams).then((resp) => {
}) this.tableLoading = false
if (resp.success) {
}, const data = resp.data
showResult(row) { this.queryParams.total = data.total
this.dataList = data.records
if (row.confirmResult == '未确认') {
this.$message({
type: 'warning',
showClose: true,
message: '厂家暂未确认'
})
} else { } else {
// resp.code
req.fetchDetailsByMainSid(row.sid).then((resp) => { this.dataList = []
this.queryParams.total = 0
console.log("fetchDetailsByMainSid", resp);
this.orderInfo = resp.data
this.dialogVisible2 = true
}).catch(() => {
})
} }
}).catch(() => {
this.tableLoading = false
})
},
//
}, indexMethod(index) {
selectionLineChangeHandle(val) { var pagestart = (this.queryParams.current - 1) * this.queryParams.size
console.log("val", val); var pageindex = index + 1 + pagestart
return pageindex
this.selectionList = val },
const aa = [] dosearch() {
val.forEach(element => { this.queryParams.current = 1
aa.push(element.sid) this.loadList()
}) },
this.sids = aa resetQuery() {
this.queryParams = {
}, current: 1,
// size: 10,
clicksearchShow() { total: 0,
this.isSearchShow = !this.isSearchShow params: {
if (this.isSearchShow) { useOrgName: '',
this.searchxianshitit = '隐藏查询条件' deptName: '',
} else { createByName: '',
this.searchxianshitit = '显示查询条件' billNo: '',
} createStartTime: '',
}, createEndTime: '',
btnHandle(btnKey) { finishStartTime: '',
switch (btnKey) { finishEndTime: '',
case 'doDel': confirmResult: '',
this.doDel() userSid: '',
break orgPath: '',
case 'toAdd': menuUrl: ''
this.toAdd()
break
case 'doClose':
this.doClose()
break
default:
break
} }
}, }
loadList() { this.loadList()
this.tableLoading = true },
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid') toAdd() {
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') if (this.sids.length === 1) {
this.queryParams.params.menuUrl = this.$route.path this.viewState = 2
req.listPage(this.queryParams).then((resp) => { this.$refs['divadd'].showAdd(this.sids[0])
this.tableLoading = false } else {
if (resp.success) { this.$message({
const data = resp.data type: 'warning',
this.queryParams.total = data.total showClose: true,
this.dataList = data.records message: '请选择一条记录'
} 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() {
if (this.sids.length == 1) {
// this.dialogVisible3 = true
// this.orderInfo.mainSid = this.sids[0]
this.viewState = 2
this.$refs['divadd'].showAdd(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)
}
} }
},
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
} }
} }
}
</script> </script>
<style scoped> <style scoped>
</style> </style>

317
yxt-as-ui/src/views/storage/manufacturerconfirm/manufacturerconfirmAdd.vue

@ -1,30 +1,15 @@
<template> <template>
<div> <div class="app-container">
<div class="tab-header webtop"> <div class="tab-header webtop">
<!-- 标题 --> <div>{{ title }}厂家确认</div>
<div>{{title}}厂家确认</div>
<!-- start 添加修改按钮 -->
<div> <div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">确认</el-button> <el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">确认</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> <el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div> </div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div> </div>
<div class="listconadd"> <div class="listconadd">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> <el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<!-- <div class="title">
<div>基础信息</div>
</div> -->
<el-row class="first_row"> <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"> <el-col :span="8">
<div class="span-sty">申请人</div> <div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
@ -33,7 +18,6 @@
<div class="span-sty">申请部门</div> <div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">申请日期</div> <div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
@ -43,204 +27,163 @@
<el-col :span="24"> <el-col :span="24">
<div class="span-sty"><span class="must">*</span> 附件</div> <div class="span-sty"><span class="must">*</span> 附件</div>
<el-form-item prop="imgList"> <el-form-item prop="imgList">
<upload-img ref="uploadImg" class="addinputw" v-model="imgList" :limit="50" bucket="map" <upload-img ref="uploadImg" class="addinputw" v-model="imgList" :limit="50" bucket="map" :upload-data="{ type: '0001' }" @change="backData"/>
:upload-data="{ type: '0001' }" @change="backData" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<div class="span-sty">备注</div> <div class="span-sty">备注</div>
<el-form-item> <el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" <el-form-item>
type="textarea" :rows="4" clearable /> <el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" type="textarea" :rows="4" clearable/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div class="title">已返厂旧件列表</div>
<div class="title" <el-table v-loading="listLoading" :data="formobj.asOldpartreturnConfirmDetailDetailsList" border style="width: 100%;" :row-style="{height: '40px'}">
style="display: flex;align-items: center;justify-content: space-between;height:40px;margin-top: 10px;"> <el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center"/>
<div>已返厂旧件列表</div> <el-table-column label="商品名称" prop="goodsSpuName" align="center"/>
</div> <el-table-column label="商品编码" prop="goodsSkuCode" align="center"/>
<el-table v-loading="listLoading" :data="formobj.asOldpartreturnConfirmDetailDetailsList" border <el-table-column label="厂家" prop="manufacturerName" align="center"/>
style="width: 100%;" :row-style="{height: '40px'}"> <el-table-column label="规格" prop="goodsSkuOwnSpec" align="center"/>
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> <el-table-column label="单位" prop="unit" align="center"/>
<el-table-column label="商品名称" prop="goodsSpuName" align="center" /> <el-table-column label="车架号" prop="vinNo" align="center"/>
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" /> <el-table-column label="维修单号" prop="sourceBillNo" align="center"/>
<el-table-column label="厂家" prop="manufacturerName" align="center" /> <el-table-column label="索赔单号" prop="claimBillNo" align="center"/>
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" /> <el-table-column label="需返厂数量" prop="needReturnCount" align="center"/>
<el-table-column label="单位" prop="unit" align="center" /> <el-table-column label="实际返厂数量" prop="actualReturnCount" align="center"/>
<el-table-column label="车架号" prop="vinNo" align="center" /> <el-table-column label="差异说明" prop="remarks" align="center"/>
<el-table-column label="维修单号" prop="sourceBillNo" align="center" />
<el-table-column label="索赔单号" prop="claimBillNo" 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-column label="确认数量" align="center" width="180"> <el-table-column label="确认数量" align="center" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input ref="focusAssumptionInput" v-model="scope.row.confirmCount" clearable placeholder="" <el-input ref="focusAssumptionInput" v-model="scope.row.confirmCount" clearable placeholder="" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" @input="commodityComputeYHAndXSJE(scope.row)"/>
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" @input="commodityComputeYHAndXSJE(scope.row)" />
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-form> </el-form>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import req from '@/api/storage/manufacturerconfirm.js' import req from '@/api/storage/manufacturerconfirm.js'
import uploadImg from '@/components/uploadFile/uploadImg' import uploadImg from '@/components/uploadFile/uploadImg'
export default {
components: { export default {
uploadImg components: {
}, uploadImg
data() { },
return { data() {
listLoading: false, return {
submitdisabled: false, listLoading: false,
title: "新增", submitdisabled: false,
formobj: {}, title: '新增',
imgList: [], formobj: {},
rules: { imgList: [],
filePaths: [{ rules: {
required: true, filePaths: [{ required: true, message: '附件不能为空', trigger: 'blur' }]
message: '附件不能为空',
trigger: 'blur'
}],
}
} }
}
},
methods: {
indexMethod(index) {
return index + 1
}, },
methods: {
indexMethod(index) {
return index + 1
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.imgList = []
this.submitdisabled = false
this.$emit('doback')
},
showAdd(sid) { handleReturn(isreload) {
this.$nextTick(() => { if (isreload === 'true') this.$emit('reloadlist')
this.$refs['form_obj'].clearValidate() this.imgList = []
}) this.submitdisabled = false
req.init(sid) this.$emit('doback')
.then(resp => { },
if (resp.success) { showAdd(sid) {
this.formobj = resp.data this.$nextTick(() => {
for (var i = 0; i < resp.data.filePaths.length; i++) { this.$refs['form_obj'].clearValidate()
this.imgList.push({ })
url: resp.data.filePaths[i] req.init(sid).then(resp => {
}) if (resp.success) {
} this.formobj = resp.data
} for (var i = 0; i < resp.data.filePaths.length; i++) {
}) this.imgList.push({
.catch(e => { url: resp.data.filePaths[i]
this.formobj = {} })
}) }
},
showEdit(row) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
var params = {
sid: row.sid
} }
req.init(row.sid) }).catch(e => {
.then(resp => { this.formobj = {}
if (resp.success) { })
this.formobj = resp.data },
showEdit(row) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.init(row.sid).then(resp => {
if (resp.success) {
this.formobj = resp.data
}
}).catch(e => {
this.formobj = {}
})
},
backData(value) {
console.log('imgList', this.imgList)
this.imgList = value
this.formobj.filePaths = []
for (var i = 0; i < this.imgList.length; i++) {
this.formobj.filePaths.push(this.imgList[i].url)
}
},
commodityComputeYHAndXSJE(row) {
if (Number(row.actualReturnCount) < Number(row.confirmCount)) {
row.confirmCount = Number(row.actualReturnCount)
}
},
saveOrUpdate() {
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.save(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '保存成功'
})
this.handleReturn('true')
} else {
this.submitdisabled = false
} }
}).catch(() => {
this.submitdisabled = false
}) })
.catch(e => {
this.formobj = {}
})
},
backData(value) {
console.log('backData》》》》', value)
console.log('imgList', this.imgList)
this.imgList = value
this.formobj.filePaths = []
for (var i = 0; i < this.imgList.length; i++) {
this.formobj.filePaths.push(this.imgList[i].url)
}
},
commodityComputeYHAndXSJE(row) {
if (Number(row.actualReturnCount) < Number(row.confirmCount)) {
row.confirmCount = Number(row.actualReturnCount)
} }
})
},
saveOrUpdate() {
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.save(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '保存成功'
})
this.handleReturn('true')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
} }
} }
}
</script> </script>
<style scoped> <style scoped>
/deep/ .el-form-item__error { /deep/ .el-form-item__error {
margin-left: 120px !important; margin-left: 120px !important;
} }
.must { .must {
color: #f00; color: #f00;
} }
.span-sty { .span-sty {
width: 130px !important; width: 130px !important;
} }
.addinputInfo { .addinputInfo {
margin-left: 120px !important; margin-left: 120px !important;
} }
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { .formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important; margin-left: 120px !important;
width: calc(100% - 115px); width: calc(100% - 115px);
} }
.first_row { .first_row {
border-top: 1px solid #E0E3EB; border-top: 1px solid #E0E3EB;
} }
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
</style> </style>

175
yxt-as-ui/src/views/storage/manufacturerconfirm/manufacturerconfirmInfo.vue

@ -1,29 +1,14 @@
<template> <template>
<div> <div class="app-container">
<div class="tab-header webtop"> <div class="tab-header webtop">
<!-- 标题 -->
<div>厂家确认</div> <div>厂家确认</div>
<!-- start 添加修改按钮 -->
<div> <div>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> <el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div> </div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div> </div>
<div class="listconadd"> <div class="listconadd">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02"> <el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<!-- <div class="title">
<div>基础信息</div>
</div> -->
<el-row class="first_row"> <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"> <el-col :span="8">
<div class="span-sty">申请人</div> <div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
@ -32,145 +17,89 @@
<div class="span-sty">申请部门</div> <div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">申请日期</div> <div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col> </el-col>
</el-row>
<!-- <el-row>
<el-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-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-row>
<el-col :span="24"> <el-col :span="24">
<div class="span-sty">附件</div> <div class="span-sty">附件</div>
<el-form-item class="trightb_item"> <el-form-item class="trightb_item">
<el-image style="width: 120px;height: 120px; margin: 10px;" class="addinputInfo" <el-image style="width: 120px;height: 120px; margin: 10px;" class="addinputInfo" v-for="(item, index) in formobj.filePaths" :key="index" :src="item" :preview-src-list="[item]">
v-for="(item,index) in formobj.filePaths" :src="item" :preview-src-list="[item]">
</el-image> </el-image>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<div class="span-sty">备注</div> <div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div class="title">已返厂旧件列表</div>
<div class="title" <el-table v-loading="listLoading" :data="formobj.asOldpartreturnConfirmDetailDetailsList" border style="width: 100%;" :row-style="{height: '40px'}">
style="display: flex;align-items: center;justify-content: space-between;height:40px;margin-top: 10px;"> <el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center"/>
<div>已返厂旧件列表</div> <el-table-column label="商品名称" prop="goodsSpuName" align="center"/>
</div> <el-table-column label="图号" prop="goodsSkuCode" align="center"/>
<el-table v-loading="listLoading" :data="formobj.asOldpartreturnConfirmDetailDetailsList" border <el-table-column label="厂家" prop="manufacturerName" align="center"/>
style="width: 100%;" :row-style="{height: '40px'}"> <el-table-column label="规格" prop="goodsSkuOwnSpec" align="center"/>
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> <el-table-column label="单位" prop="unit" align="center"/>
<el-table-column label="商品名称" prop="goodsSpuName" align="center" /> <el-table-column label="车架号" prop="vinNo" align="center"/>
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" /> <el-table-column label="维修单号" prop="sourceBillNo" align="center"/>
<el-table-column label="厂家" prop="manufacturerName" align="center" /> <el-table-column label="索赔单号" prop="claimBillNo" align="center"/>
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" /> <el-table-column label="需返厂数量" prop="needReturnCount" align="center"/>
<el-table-column label="单位" prop="unit" align="center" /> <el-table-column label="实际返厂数量" prop="actualReturnCount" align="center"/>
<el-table-column label="车架号" prop="vinNo" align="center" /> <el-table-column label="差异说明" prop="remarks" align="center"/>
<el-table-column label="维修单号" prop="sourceBillNo" align="center" /> <el-table-column label="确认数量" prop="confirmCount" align="center"/>
<el-table-column label="索赔单号" prop="claimBillNo" 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-column label="确认数量" prop="confirmCount" align="center" />
</el-table> </el-table>
</el-form> </el-form>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import req from '@/api/storage/manufacturerconfirm.js' import req from '@/api/storage/manufacturerconfirm.js'
export default { export default {
components: {}, components: {},
data() { data() {
return { return {
listLoading: false, listLoading: false,
submitdisabled: false, submitdisabled: false,
formobj: {}, formobj: {}
} }
},
methods: {
indexMethod(index) {
return index + 1
}, },
methods: { handleReturn() {
indexMethod(index) { this.formobj = {}
return index + 1 this.$emit('doback')
}, },
showEdit(row) {
handleReturn(isreload) { req.init(row.sid).then(resp => {
if (isreload === 'true') this.$emit('reloadlist') if (resp.success) {
this.$emit('doback') this.formobj = resp.data
},
showAdd() {
},
showEdit(row) {
var params = {
sid: row.sid
} }
req.init(row.sid) }).catch(e => {
.then(resp => { this.formobj = {}
if (resp.success) { })
this.formobj = resp.data
}
})
.catch(e => {
this.formobj = {}
})
}
} }
} }
}
</script> </script>
<style scoped> <style scoped>
.span-sty { .span-sty {
width: 130px !important; width: 130px !important;
} }
.addinputInfo { .addinputInfo {
margin-left: 120px !important; margin-left: 120px !important;
} }
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { .first_row {
margin-left: 120px !important; border-top: 1px solid #E0E3EB;
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> </style>

717
yxt-as-ui/src/views/storage/oldPartsFactory/index.vue

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div v-show="viewState == 1"> <div v-show="viewState == 1">
<button-bar ref="btnbar" view-title="旧件返厂管理" :btndisabled="btndisabled" @btnhandle="btnHandle" /> <button-bar ref="btnbar" view-title="旧件返厂管理" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div class="main-content"> <div class="main-content">
<div class="searchcon"> <div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow"> <el-button size="small" class="searchbtn" @click="clicksearchShow">
@ -10,40 +10,33 @@
<div v-show="isSearchShow" class="search"> <div v-show="isSearchShow" class="search">
<el-form :inline="true" class="tab-header"> <el-form :inline="true" class="tab-header">
<el-form-item label="分公司"> <el-form-item label="分公司">
<el-input v-model="queryParams.params.useOrgName" placeholder="" clearable /> <el-input v-model="queryParams.params.useOrgName" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="申请部门"> <el-form-item label="申请部门">
<el-input v-model="queryParams.params.deptName" placeholder="" clearable /> <el-input v-model="queryParams.params.deptName" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="申请人"> <el-form-item label="申请人">
<el-input v-model="queryParams.params.createByName" placeholder="" clearable /> <el-input v-model="queryParams.params.createByName" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="单据编号"> <el-form-item label="单据编号">
<el-input v-model="queryParams.params.billNo" placeholder="" clearable /> <el-input v-model="queryParams.params.billNo" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="单据日期"> <el-form-item label="单据日期">
<el-date-picker v-model="queryParams.params.createStartTime" type="date" placeholder="选择日期" <el-date-picker v-model="queryParams.params.createStartTime" type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;" />
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> <span style="padding: 0 8px"></span>
</el-date-picker> <el-date-picker v-model="queryParams.params.createEndTime" type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;" />
<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>
<el-form-item label="办结日期"> <el-form-item label="办结日期">
<el-date-picker v-model="queryParams.params.finishStartTime" type="date" placeholder="选择日期" <el-date-picker v-model="queryParams.params.finishStartTime" type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;" />
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> <span style="padding: 0 8px"></span>
</el-date-picker> <el-date-picker v-model="queryParams.params.finishEndTime" type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;" />
<el-date-picker v-model="queryParams.params.finishEndTime" type="date" placeholder="选择日期"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
</el-date-picker>
</el-form-item> </el-form-item>
<!-- <el-form-item label="厂家确认结果"> <el-form-item label="厂家确认结果">
<el-select v-model="queryParams.params.billState" placeholder="请选择"> <el-select v-model="queryParams.params.confirmResult" placeholder="请选择">
<el-option v-for="(item,i) in confirmResultsList" :key="i" :label="item.name" :value="item.sid"> <el-option v-for="(item,i) in confirmResultsList" :key="i" :label="item.name" :value="item.sid">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> --> </el-form-item>
</el-form> </el-form>
<div class="btn" style="text-align: center;"> <div class="btn" style="text-align: center;">
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button> <el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
@ -58,14 +51,12 @@
<!-- End 项目列表头部 --> <!-- End 项目列表头部 -->
<!-- Start 项目列表 --> <!-- Start 项目列表 -->
<div class=""> <div class="">
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" <el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" @selection-change="selectionLineChangeHandle">
@selection-change="selectionLineChangeHandle"> <el-table-column fixed width="50" type="selection" align="center"/>
<el-table-column fixed width="50" type="selection" align="center" /> <el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column fixed label="操作" align="center" width="180"> <el-table-column fixed label="操作" align="center" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" :disabled="scope.row.nodeState!='待提交'" <el-button type="primary" size="mini" :disabled="scope.row.nodeState =='发起申请' ? false : scope.row.nodeState == '待提交' ? false : true" @click="toEdit(scope.row)">办理</el-button>
@click="toEdit(scope.row)">办理</el-button>
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">查看</el-button> <el-button type="primary" size="mini" @click="toRelevancy(scope.row)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -75,445 +66,337 @@
<span v-else @click="flowRecord(scope.row)" class="bluezi">{{ scope.row.nodeState }}</span> <span v-else @click="flowRecord(scope.row)" class="bluezi">{{ scope.row.nodeState }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="billNo" label="单据编号" width="180" 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="useOrgName" label="分公司" width="120" align="center"/>
<el-table-column prop="deptName" label="申请部门" width="120" align="center" /> <el-table-column prop="deptName" label="申请部门" width="120" align="center"/>
<el-table-column prop="createByName" label="申请人" width="100" align="center" /> <el-table-column prop="createByName" label="申请人" width="100" align="center"/>
<el-table-column prop="createTime" label="申请日期" width="120" align="center" /> <el-table-column prop="createTime" label="申请日期" width="120" align="center"/>
<el-table-column prop="needReturnCount" label="应返厂数量合计" width="180" 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 prop="actualReturnCount" label="实际返厂数量合计" width="180" align="center"/>
<el-table-column label="附件" align="center" width="100"> <el-table-column label="附件" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="color: #1890FF; text-decoration: underline ;cursor: pointer;" <span class="bluezi" @click="showAdjunct(scope.row.filePaths)">查看</span>
@click="showAdjunct(scope.row.filePaths)">查看
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="返厂情况" prop="state" align="center" width="100" /> <el-table-column label="返厂情况" prop="state" align="center" width="100"/>
<!-- <template slot-scope="scope">
<div style="color: #1890FF; text-decoration: underline ;">{{scope.row.state}}
</div>
</template>
</el-table-column> -->
<el-table-column label="厂家确认情况" align="center" width="150"> <el-table-column label="厂家确认情况" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="color: #1890FF; text-decoration: underline ;cursor: pointer;" <span class="bluezi" v-show="scope.row.confirmSid!=''" @click="showDetail(scope.row)">查看</span>
v-show="scope.row.confirmSid!=''" @click="showDetail(scope.row)">
查看
</div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<!-- End 项目列表 --> <!-- End 项目列表 -->
<div class="pages"> <div class="pages">
<div class="tit" /> <div class="tit"/>
<!-- 翻页 --> <!-- 翻页 -->
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" <pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="loadList"/>
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
</div> </div>
</div> </div>
</div> </div>
<!-- End 查询和其列表部分 --> <!-- End 查询和其列表部分 -->
<!-- 新增修改部分组件 --> <!-- 新增修改部分组件 -->
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" /> <divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList"/>
<divInfo v-show="viewState == 4" ref="divinfo" @doback="resetState" @reloadlist="loadList" /> <divInfo v-show="viewState == 4" ref="divinfo" @doback="resetState" @reloadlist="loadList"/>
<manufacturerconfirmInfo v-show="viewState == 5" ref="manufacturerconfirmInfo" @doback="resetState" <manufacturerconfirmInfo v-show="viewState == 5" ref="manufacturerconfirmInfo" @doback="resetState" @reloadlist="loadList"/>
@reloadlist="loadList" />
<el-dialog title="附件" :visible.sync="dialogVisible" :before-close="handleClose"> <el-dialog title="附件" :visible.sync="dialogVisible" :before-close="handleClose">
<el-form ref="dataForm1" class="formadd" style="margin-top: -30px;"> <el-form ref="dataForm1" class="formadd" style="margin-top: -30px;">
<el-row class="first_row"> <el-row class="first_row">
<el-col :span="24" class="trightb"> <el-col :span="24" class="trightb">
<el-image style="width: 120px;height: 120px; margin: 10px; background: #f0f;" <el-image style="width: 120px;height: 120px; margin: 10px; background: #f0f;" v-for="(item, index) in fileList" :key="index" :src="item" :preview-src-list="[item]">
v-for="(item,index) in fileList" :src="item" :preview-src-list="[item]">
</el-image> </el-image>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
</el-dialog> </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="centerDialogVisible" width="78%" height="1%" :before-close="closeIt" center> <el-dialog title="" :visible.sync="centerDialogVisible" width="78%" height="1%" :before-close="closeIt" center>
<iframe frameborder="0" id="iframe" style="width:100%;" scrolling="no" <iframe frameborder="0" id="iframe" style="width:100%;" scrolling="no" :src="this.centerDialogVisible === true ? url :''"></iframe>
:src="this.centerDialogVisible === true ? url :''"></iframe>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import req from '@/api/storage/oldPartsFactory.js' import req from '@/api/storage/oldPartsFactory.js'
import ButtonBar from '@/components/ButtonBar' import ButtonBar from '@/components/ButtonBar'
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import divAdd from './oldPartsFactoryAdd.vue'
import divAdd from './oldPartsFactoryAdd.vue' import divInfo from './oldPartsFactoryInfo.vue'
import divInfo from './oldPartsFactoryInfo.vue' import manufacturerconfirmInfo from '../manufacturerconfirm/manufacturerconfirmInfo'
import manufacturerconfirmInfo from './manufacturerconfirmInfo.vue' import { getStorage } from '@/utils/auth'
import {
getStorage
} from '@/utils/auth'
export default {
components: {
ButtonBar,
Pagination,
pageye,
divAdd,
divInfo,
manufacturerconfirmInfo
},
data() {
return {
url: '',
dialogHeight: '80%',
centerDialogVisible: false,
dialogVisible: false,
dialogVisible2: false,
fileList: [],
orderInfo: {},
btndisabled: false,
viewState: 1, // 1 2 3 4
isSearchShow: false,
searchxianshitit: '显示查询条件',
tableLoading: false,
dataList: [],
btnList: [{
type: 'primary',
size: 'small',
icon: 'plus',
btnKey: 'toAdd',
btnLabel: '新增'
}, {
type: 'danger',
size: 'small',
icon: 'del',
btnKey: 'doDel',
btnLabel: '删除'
},
{ export default {
type: 'info', components: {
size: 'small', ButtonBar,
icon: 'cross', Pagination,
btnKey: 'doClose', divAdd,
btnLabel: '关闭' divInfo,
} manufacturerconfirmInfo
], },
queryParams: { data() {
current: 1, return {
size: 10, url: '',
total: 0, dialogHeight: '80%',
params: { centerDialogVisible: false,
"useOrgName": "", dialogVisible: false,
"deptName": "", fileList: [],
"createByName": "", btndisabled: false,
"billNo": "", viewState: 1, // 1 2 3 4
"createStartTime": "", isSearchShow: false,
"createEndTime": "", searchxianshitit: '显示查询条件',
"finishStartTime": "", tableLoading: false,
"finishEndTime": "", dataList: [],
"billState": "", btnList: [
"userSid": "", {
"orgPath": "", type: 'primary',
"menuUrl": "", size: 'small',
"menuSid": "" icon: 'plus',
} btnKey: 'toAdd',
btnLabel: '新增'
}, {
type: 'danger',
size: 'small',
icon: 'del',
btnKey: 'doDel',
btnLabel: '删除'
}, },
sids: [],
selectionList: [], {
confirmResultsList: [{ type: 'info',
name: "一致", size: 'small',
sid: "1" icon: 'cross',
}, btnKey: 'doClose',
{ btnLabel: '关闭'
name: "不一致",
sid: "2"
}
],
pathList: []
}
},
mounted() {
// vuewindowpostMessagehandleMessage
window.addEventListener('message', this.handleMessage)
this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
this.loadList()
},
methods: {
async handleMessage(event) {
var code = ''
if (event.data.params !== null && event.data.params !== undefined) {
code = event.data.params.code
} }
if (code === 1) { ],
this.centerDialogVisible = false queryParams: {
} else if (code === 2) { current: 1,
this.dialogHeight = event.data.params.data size: 10,
this.setIframeHeight(document.getElementById('iframe')) total: 0,
params: {
useOrgName: '',
deptName: '',
createByName: '',
billNo: '',
createStartTime: '',
createEndTime: '',
finishStartTime: '',
finishEndTime: '',
confirmResult: '',
userSid: '',
orgPath: '',
menuUrl: '',
menuSid: ''
} }
}, },
closeIt() { sids: [],
this.url = '' selectionList: [],
this.centerDialogVisible = false confirmResultsList: [
}, {
setIframeHeight(iframe) { name: '未确认',
iframe.height = this.dialogHeight sid: '1'
}, },
flowRecord(row) { {
this.centerDialogVisible = true name: '已确认',
var params = { sid: '2'
deployId: row.procDefId,
procInsId: row.procInstId,
token: getStorage()
} }
this.url = '/#/flow/flowRecordForBusiness?data=' + encodeURI((JSON.stringify(params))) ]
}, }
handleClose() { },
this.dialogVisible = false mounted() {
}, // vuewindowpostMessagehandleMessage
handleClose2() { window.addEventListener('message', this.handleMessage)
this.dialogVisible2 = false this.$refs['btnbar'].setButtonList(this.btnList)
}, },
showAdjunct(paths) { created() {
this.fileList = paths this.loadList()
this.dialogVisible = true },
}, methods: {
showDetail(row) { async handleMessage(event) {
var code = ''
if (event.data.params !== null && event.data.params !== undefined) {
this.viewState = 5 code = event.data.params.code
this.$refs['manufacturerconfirmInfo'].showEdit(row.confirmSid) }
}, if (code === 1) {
showResult(row) { this.centerDialogVisible = false
} else if (code === 2) {
if (row.confirmResult == '未确认') { this.dialogHeight = event.data.params.data
this.$message({ this.setIframeHeight(document.getElementById('iframe'))
type: 'warning', }
showClose: true, },
message: '厂家暂未确认' closeIt() {
}) this.url = ''
this.centerDialogVisible = false
},
setIframeHeight(iframe) {
iframe.height = this.dialogHeight
},
flowRecord(row) {
this.centerDialogVisible = true
var params = {
deployId: row.procDefId,
procInsId: row.procInstId,
token: getStorage()
}
this.url = '/#/flow/flowRecordForBusiness?data=' + encodeURI((JSON.stringify(params)))
},
handleClose() {
this.dialogVisible = false
},
showAdjunct(paths) {
this.fileList = paths
this.dialogVisible = true
},
showDetail(row) {
this.viewState = 5
this.$refs['manufacturerconfirmInfo'].showEdit(row.confirmSid)
},
selectionLineChangeHandle(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 { } else {
req.fetchDetailsByMainSid(row.sid).then((resp) => { // resp.code
this.dataList = []
console.log("fetchDetailsByMainSid", resp); this.queryParams.total = 0
this.orderInfo = resp.data
this.dialogVisible2 = true
}).catch(() => {
})
} }
}).catch(() => {
this.tableLoading = false
})
},
}, //
selectionLineChangeHandle(val) { indexMethod(index) {
console.log("val", val); var pagestart = (this.queryParams.current - 1) * this.queryParams.size
var pageindex = index + 1 + pagestart
this.selectionList = val return pageindex
const aa = [] },
val.forEach(element => { dosearch() {
aa.push(element.sid) this.queryParams.current = 1
}) this.loadList()
this.sids = aa },
resetQuery() {
}, this.queryParams = {
// current: 1,
clicksearchShow() { size: 10,
this.isSearchShow = !this.isSearchShow total: 0,
if (this.isSearchShow) { params: {
this.searchxianshitit = '隐藏查询条件' useOrgName: '',
} else { deptName: '',
this.searchxianshitit = '显示查询条件' createByName: '',
} billNo: '',
}, createStartTime: '',
btnHandle(btnKey) { createEndTime: '',
switch (btnKey) { finishStartTime: '',
case 'doDel': finishEndTime: '',
this.doDel() confirmResult: '',
break userSid: '',
case 'toAdd': orgPath: '',
this.toAdd() menuUrl: '',
break menuSid: ''
case 'doClose':
this.doClose()
break
default:
break
} }
}, }
loadList() { this.loadList()
this.tableLoading = true },
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid') doDel() {
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') if (this.sids.length > 0) {
this.queryParams.params.menuUrl = this.$route.path const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
req.listPage(this.queryParams).then((resp) => { this.$confirm(tip, '提示', {
this.tableLoading = false confirmButtonText: '确定',
if (resp.success) { cancelButtonText: '取消',
const data = resp.data type: 'warning'
this.queryParams.total = data.total }).then(() => {
this.dataList = data.records const loading = this.$loading({
} else { lock: true,
// resp.code text: 'Loading',
this.dataList = [] spinner: 'el-icon-loading',
this.queryParams.total = 0 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(() => { }).catch(() => {
this.tableLoading = false
}) })
}, } else {
this.$message({
// showClose: true,
indexMethod(index) { message: '请至少选择一条记录进行删除操作'
var pagestart = (this.queryParams.current - 1) * this.queryParams.size })
var pageindex = index + 1 + pagestart }
return pageindex },
}, toAdd() {
dosearch() { this.viewState = 2
this.queryParams.current = 1 this.$refs['divadd'].showAdd()
this.loadList() },
}, toEdit(row) {
resetQuery() { this.viewState = 3
this.queryParams = { this.$refs['divadd'].showEdit(row)
current: 1, },
size: 10, doClose() {
total: 0, this.$store.dispatch('tagsView/delView', this.$route)
params: { this.$router.go(-1)
"useOrgName": "", },
"deptName": "", toRelevancy(row) {
"createByName": "", this.viewState = 4
"billNo": "", this.$refs['divinfo'].showEdit(row)
"createStartTime": "", },
"createEndTime": "", resetState() {
"finishStartTime": "", this.viewState = 1
"finishEndTime": "",
"billState": "",
"userSid": "",
"orgPath": "",
"menuUrl": "",
"menuSid": ""
}
}
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({
showClose: true,
message: '请至少选择一条记录进行删除操作'
})
}
},
toAdd() {
this.viewState = 2
this.$refs['divadd'].showAdd()
},
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
},
} }
} }
}
</script> </script>
<style scoped> <style scoped>
</style> </style>

172
yxt-as-ui/src/views/storage/oldPartsFactory/manufacturerconfirmInfo.vue

@ -1,172 +0,0 @@
<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="goodsSpuName" 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="vinNo" align="center" />
<el-table-column label="维修单号" prop="sourceBillNo" align="center" />
<el-table-column label="索赔单号" prop="claimBillNo" 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-column label="确认数量" prop="confirmCount" 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(sid) {
req.init(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>

497
yxt-as-ui/src/views/storage/oldPartsFactory/oldPartsFactoryAdd.vue

@ -1,28 +1,18 @@
<template> <template>
<div> <div class="app-container">
<div class="tab-header webtop"> <div class="tab-header webtop">
<!-- 标题 -->
<div>{{title}}旧件返厂申请</div> <div>{{title}}旧件返厂申请</div>
<!-- start 添加修改按钮 -->
<div> <div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="importDetail">导入厂家返件明细</el-button> <el-button type="primary" size="small" :disabled="submitdisabled" @click="importDetail">导入厂家返件明细</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" v-show="formobj.sid!=''" @click="downLoadDetail">导出待出库旧件明细</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</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="primary" size="small" :disabled="submitdisabled" @click="submit">提交</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" v-show="formobj.sid!=''"
@click="downLoadDetail">下载待出库旧件明细</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> <el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div> </div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div> </div>
<div class="listconadd"> <div class="listconadd">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> <el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row class="first_row"> <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"> <el-col :span="8">
<div class="span-sty">申请人</div> <div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
@ -33,102 +23,41 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">申请日期</div> <div class="span-sty">申请日期</div>
<el-form-item prop="createTime"> <el-form-item>
<span class="addinputInfo">{{ formobj.createTime }}</span> <span class="addinputInfo">{{ formobj.createTime }}</span>
<!-- <el-date-picker v-model="formobj.createTime" class="addinputw addinputInfo" type="date"
value-format="yyyy-MM-dd" placeholder="选择日期">
</el-date-picker> -->
</el-form-item> </el-form-item>
</el-col> </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-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"> <el-col :span="24">
<div class="span-sty"><span class="must">*</span> 附件</div> <div class="span-sty"><span class="must">*</span> 附件</div>
<el-form-item prop="filePaths"> <el-form-item prop="filePaths">
<upload-img ref="uploadImg" class="addinputw" v-model="imgList" :limit="50" bucket="map" <upload-img ref="uploadImg" class="addinputw" v-model="imgList" :limit="50" bucket="map" :upload-data="{ type: '0001' }" @change="backData" />
:upload-data="{ type: '0001' }" @change="backData" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<div class="span-sty">备注</div> <div class="span-sty">备注</div>
<el-form-item> <el-form-item>
<el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" type="textarea" <el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" type="textarea" :rows="4" clearable />
:rows="4" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div class="title titleOne"> <div class="title titleOne">
<div>返厂旧件列表</div> <div>返厂旧件列表</div>
<el-button type="primary" size="mini" @click="seleGoods3()">添加</el-button> <el-button type="primary" size="mini" @click="seleGoods3()">添加</el-button>
</div> </div>
<el-table v-loading="listLoading" :data="formobj.asOldpartreturnList" border> <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 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="商品ID" align="center" />
<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-column prop="unit" 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 fixed label="操作" align="center" width="180"> <el-table-column fixed label="操作" align="center" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" :disabled="scope.row.isCf=='否'" <el-button type="primary" size="mini" :disabled="scope.row.isCf=='否'" @click="delGoods(scope.$index)">删除</el-button>
@click="delGoods(scope.$index)">删除</el-button>
<el-button type="primary" size="mini" @click="seleGoods(scope.row)">选择旧件</el-button> <el-button type="primary" size="mini" @click="seleGoods(scope.row)">选择旧件</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="goodsSpuName" label="商品名称" align="center" /> <el-table-column prop="goodsSpuName" label="商品名称" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" /> <el-table-column prop="goodsSkuCode" label="图号" align="center" />
<el-table-column prop="manufacturerName" label="厂家" align="center" /> <el-table-column prop="manufacturerName" label="厂家" align="center" />
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" /> <el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" />
<el-table-column prop="unit" label="单位" align="center" /> <el-table-column prop="unit" label="单位" align="center" />
@ -144,9 +73,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="isCf" label="是否迟返" align="center" /> <el-table-column prop="isCf" label="是否迟返" align="center" />
</el-table> </el-table>
</el-form> </el-form>
</div> </div>
<!-- 导入 --> <!-- 导入 -->
@ -156,9 +83,19 @@
</div> </div>
<el-card class="box-card"> <el-card class="box-card">
<div> <div>
<el-upload ref="upload" class="upload-demo" accept=".xls,.xlsx" name="file" :action="updateAction" <el-upload
:on-success="handleSuccess" :file-list="fileList" :auto-upload="false" :multiple="false" :limit="1" ref="upload"
:data="uploadData" :headers="headers"> 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 slot="trigger" size="small" type="primary">选取文件</el-button>
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传</el-button> <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传</el-button>
</el-upload> </el-upload>
@ -176,16 +113,13 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog title="选择旧件" :visible.sync="dialogVisible2" :before-close="handleClose2" <el-dialog title="选择旧件" :visible.sync="dialogVisible2" :before-close="handleClose2" style="width:150%;margin-left: -20%;">
style="width:150%;margin-left: -20%;"> <el-table v-loading="tableLoading" :data="dataList" border style="width: 100%;margin-top: -20px;" @selection-change="selectionLineChangeHandle">
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%;margin-top: -20px;"
@selection-change="selectionLineChangeHandle">
<el-table-column fixed width="50" type="selection" align="center" /> <el-table-column fixed width="50" type="selection" align="center" />
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> <el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column prop="goodsID" label="商品ID" align="center" /> <el-table-column prop="goodsID" label="商品ID" align="center" />
<el-table-column prop="goodsSpuName" label="商品名称" align="center" /> <el-table-column prop="goodsSpuName" label="商品名称" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" /> <el-table-column prop="goodsSkuCode" label="图号" align="center" />
<el-table-column prop="manufacturerName" label="厂家" align="center" /> <el-table-column prop="manufacturerName" label="厂家" align="center" />
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" /> <el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" />
<el-table-column prop="unit" label="单位" align="center" /> <el-table-column prop="unit" label="单位" align="center" />
@ -204,22 +138,15 @@
<div class="pages"> <div class="pages">
<div class="tit" /> <div class="tit" />
<!-- 翻页 --> <!-- 翻页 -->
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" <pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="seleGoods" />
:limit.sync="queryParams.size" class="pagination" @pagination="seleGoods" />
</div> </div>
<div class="btn" style="text-align: center; margin-top: 20px;"> <div class="btn" style="text-align: center; margin-top: 20px;">
<el-button type="primary" size="mini" @click="addDialogList()">确认</el-button> <el-button type="primary" size="mini" @click="addDialogList()">确认</el-button>
<el-button type="primary" size="mini" @click="handleClose2()">关闭</el-button> <el-button type="primary" size="mini" @click="handleClose2()">关闭</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog title="选择旧件" :visible.sync="dialogVisible3" :before-close="handleClose3" style="width:150%;margin-left: -20%;">
<el-dialog title="选择旧件" :visible.sync="dialogVisible3" :before-close="handleClose3" <el-table v-loading="tableLoading" :data="dataList" border style="width: 100%;margin-top: -20px;" @selection-change="selectionLineChangeHandle3">
style="width:150%;margin-left: -20%;">
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%;margin-top: -20px;"
@selection-change="selectionLineChangeHandle3">
<el-table-column fixed width="50" type="selection" align="center" /> <el-table-column fixed width="50" type="selection" align="center" />
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> <el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column prop="goodsID" label="商品ID" align="center" /> <el-table-column prop="goodsID" label="商品ID" align="center" />
@ -230,9 +157,7 @@
<el-table-column prop="unit" label="单位" align="center" /> <el-table-column prop="unit" label="单位" align="center" />
<el-table-column label="仓库-库区" align="center" width="150"> <el-table-column label="仓库-库区" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <span>{{scope.row.warehouseName}} - {{scope.row.warehouseAreaName}}</span>
{{scope.row.warehouseName}} - {{scope.row.warehouseAreaName}}
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="warehouseRackName" label="库位" align="center" /> <el-table-column prop="warehouseRackName" label="库位" align="center" />
@ -243,20 +168,13 @@
<div class="pages"> <div class="pages">
<div class="tit" /> <div class="tit" />
<!-- 翻页 --> <!-- 翻页 -->
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" <pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="seleGoods3" />
:limit.sync="queryParams.size" class="pagination" @pagination="seleGoods3" />
</div> </div>
<div class="btn" style="text-align: center; margin-top: 20px;"> <div class="btn" style="text-align: center; margin-top: 20px;">
<el-button type="primary" size="mini" @click="addDialogList3()">确认</el-button> <el-button type="primary" size="mini" @click="addDialogList3()">确认</el-button>
<el-button type="primary" size="mini" @click="handleClose3()">关闭</el-button> <el-button type="primary" size="mini" @click="handleClose3()">关闭</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -293,29 +211,25 @@
listLoading: false, listLoading: false,
submitdisabled: false, submitdisabled: false,
formobj: { formobj: {
"sid": "", sid: '',
"remarks": "", remarks: '',
"createBySid": window.sessionStorage.getItem('userSid'), createBySid: window.sessionStorage.getItem('userSid'),
"createByName": window.sessionStorage.getItem('name'), createByName: window.sessionStorage.getItem('name'),
"deptSid": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage deptSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1),
.getItem('defaultOrgPath').lastIndexOf('/') + 1), deptName: window.sessionStorage.getItem('defaultOrgPathName').substring(window.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1),
"deptName": window.sessionStorage.getItem('defaultOrgPathName').substring(window createTime: getCurrentDate(),
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1), billNo: '',
"createTime": getCurrentDate(), filePaths: [],
"billNo": "", useOrgSid: '',
"filePaths": [], useOrgName: '',
"useOrgSid": '', orgSidPath: window.sessionStorage.getItem('orgSidPath'),
"useOrgName": '', procDefId: '',
"orgSidPath": window.sessionStorage.getItem('orgSidPath'), nodeId: '',
"procDefId": "", procInstId: '',
"nodeId": "", nodeState: '',
"procInstId": "", taskId: '',
"nodeState": "", finishTime: '',
"taskId": "", asOldpartreturnList: []
"finishTime": "",
"asOldpartreturnList": [
]
}, },
imgList: [], imgList: [],
dataList: [], dataList: [],
@ -328,23 +242,14 @@
size: 10, size: 10,
total: 0, total: 0,
params: { params: {
"vinNo": "", vinNo: '',
"goodsSkuCode": "", goodsSkuCode: '',
"sourceBillNo": "", sourceBillNo: '',
"orgPath": "", orgPath: ''
} }
}, },
rules: { rules: {
createTime: [{ filePaths: [{ required: true, message: '附件不能为空', trigger: 'blur' }]
required: true,
message: '申请日期不能为空',
trigger: 'change'
}],
filePaths: [{
required: true,
message: '附件不能为空',
trigger: 'blur'
}],
} }
} }
}, },
@ -366,8 +271,6 @@
this.dialogVisible = true this.dialogVisible = true
}, },
saveOrUpdate() { saveOrUpdate() {
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
this.$refs['form_obj'].validate((valid) => { this.$refs['form_obj'].validate((valid) => {
if (valid) { if (valid) {
this.submitdisabled = true this.submitdisabled = true
@ -389,7 +292,6 @@
}) })
}, },
submit() { submit() {
this.$refs['form_obj'].validate((valid) => { this.$refs['form_obj'].validate((valid) => {
if (valid) { if (valid) {
this.submitdisabled = true this.submitdisabled = true
@ -409,74 +311,57 @@
}) })
} }
}) })
}, },
handleReturn(isreload) { handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist') if (isreload === 'true') this.$emit('reloadlist')
this.imgList = [] this.imgList = []
this.formobj = { this.formobj = {
"sid": "", sid: '',
"remarks": "", remarks: '',
"createBySid": window.sessionStorage.getItem('userSid'), createBySid: window.sessionStorage.getItem('userSid'),
"createByName": window.sessionStorage.getItem('name'), createByName: window.sessionStorage.getItem('name'),
"deptSid": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage deptSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1),
.getItem('defaultOrgPath').lastIndexOf('/') + 1), deptName: window.sessionStorage.getItem('defaultOrgPathName').substring(window.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1),
"deptName": window.sessionStorage.getItem('defaultOrgPathName').substring(window createTime: getCurrentDate(),
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1), billNo: '',
"createTime": getCurrentDate(), filePaths: [],
"billNo": "", useOrgSid: '',
"filePaths": [], useOrgName: '',
"useOrgSid": '', orgSidPath: window.sessionStorage.getItem('orgSidPath'),
"useOrgName": '', procDefId: '',
"orgSidPath": window.sessionStorage.getItem('orgSidPath'), nodeId: '',
"procDefId": "", procInstId: '',
"nodeId": "", nodeState: '',
"procInstId": "", taskId: '',
"nodeState": "", finishTime: '',
"taskId": "", asOldpartreturnList: []
"finishTime": "",
"asOldpartreturnList": [
]
} }
this.submitdisabled = false this.submitdisabled = false
this.isUpdata = false
this.$emit('doback') this.$emit('doback')
}, },
showAdd() { showAdd() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['form_obj'].clearValidate() this.$refs['form_obj'].clearValidate()
}) })
this.title = "【新增】" this.title = '【新增】'
this.isUpdata = false
}, },
showEdit(row) { showEdit(row) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['form_obj'].clearValidate() this.$refs['form_obj'].clearValidate()
}) })
this.title = "【修改】" this.title = '【修改】'
this.isUpdata = true req.init(row.sid).then(resp => {
// var params = { if (resp.success) {
// sid: row.sid this.formobj = resp.data
// } for (var i = 0; i < resp.data.filePaths.length; i++) {
this.imgList.push({
req.init(row.sid) url: resp.data.filePaths[i].url
.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 => { }).catch(e => {
this.formobj = {} this.formobj = {}
}) })
}, },
downLoadDetail() { downLoadDetail() {
const loading = this.$loading({ const loading = this.$loading({
@ -493,7 +378,7 @@
const fileName = '待出库旧件明细' + '.xls' const fileName = '待出库旧件明细' + '.xls'
const elink = document.createElement('a') const elink = document.createElement('a')
elink.download = fileName elink.download = fileName
elink.style.display = 'nonde' elink.style.display = 'none'
elink.href = URL.createObjectURL(blob) elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink) document.body.appendChild(elink)
elink.click() elink.click()
@ -535,15 +420,11 @@
const _this = this const _this = this
_this.uploadResultMesssage = resp.msg _this.uploadResultMesssage = resp.msg
_this.uploadSuccess = resp.success _this.uploadSuccess = resp.success
if (resp.success) { if (resp.success) {
for (var i = 0; i < resp.data.length; i++) { for (var i = 0; i < resp.data.length; i++) {
this.formobj.asOldpartreturnList.push(resp.data[i]) this.formobj.asOldpartreturnList.push(resp.data[i])
} }
} }
}, },
handleConfirm() { handleConfirm() {
if (!this.uploadSuccess) { if (!this.uploadSuccess) {
@ -560,178 +441,148 @@
console.log('backData》》》》', value) console.log('backData》》》》', value)
console.log('imgList', this.imgList) console.log('imgList', this.imgList)
this.imgList = value this.imgList = value
for (var i = 0; i < this.imgList.length; i++) { for (var i = 0; i < this.imgList.length; i++) {
this.formobj.filePaths.push(this.imgList[i].url) this.formobj.filePaths.push(this.imgList[i].url)
} }
}, },
seleGoods(row) { seleGoods(row) {
this.itemInfo = row this.itemInfo = row
this.queryParams.params = { this.queryParams.params = {
"vinNo": row.vinNo, vinNo: row.vinNo,
"goodsSkuCode": row.goodsSkuCode, goodsSkuCode: row.goodsSkuCode,
"sourceBillNo": row.sourceBillNo, sourceBillNo: row.sourceBillNo,
"orgPath": window.sessionStorage.getItem('defaultOrgPath'), orgPath: window.sessionStorage.getItem('defaultOrgPath')
} }
req.getGoodsListPage(this.queryParams).then(resp => { req.getGoodsListPage(this.queryParams).then(resp => {
if (resp.success) { if (resp.success) {
const data = resp.data const data = resp.data
this.queryParams.total = data.total this.queryParams.total = data.total
this.dataList = data.records this.dataList = data.records
this.dialogVisible2 = true this.dialogVisible2 = true
} else { } else {
// resp.code // resp.code
this.dataList = [] this.dataList = []
this.queryParams.total = 0 this.queryParams.total = 0
} }
}).catch(e => {
}) })
.catch(e => {})
}, },
delGoods(index) { delGoods(index) {
this.formobj.asOldpartreturnList.splice(index, 1) this.formobj.asOldpartreturnList.splice(index, 1)
}, },
selectionLineChangeHandle(val) { selectionLineChangeHandle(val) {
this.selectionList = val this.selectionList = val
}, },
addDialogList() { addDialogList() {
this.dialogVisible2 = false this.dialogVisible2 = false
if (this.selectionList.length > 0) { if (this.selectionList.length > 0) {
const choose = this.formobj.asOldpartreturnList.filter((item) => item == this.itemInfo) const choose = this.formobj.asOldpartreturnList.filter((item) => item == this.itemInfo)
console.log('>>>>>>>>>addDialogList', choose)
var num = 0 var num = 0
if (choose != null && choose.length > 0) { if (choose != null && choose.length > 0) {
for (var i = 0; i < this.selectionList.length; i++) { for (var i = 0; i < this.selectionList.length; i++) {
var item = this.selectionList[i] var item = this.selectionList[i]
num += Number(item.count) num += Number(item.count)
} }
choose[0].actualReturnCount = num choose[0].actualReturnCount = num
} }
} }
}, },
handleClose2() { handleClose2() {
this.dialogVisible2 = false this.dialogVisible2 = false
}, },
seleGoods3() { seleGoods3() {
this.queryParams.params = { this.queryParams.params = {
"vinNo": '', vinNo: '',
"goodsSkuCode": '', goodsSkuCode: '',
"sourceBillNo": '', sourceBillNo: '',
"orgPath": window.sessionStorage.getItem('defaultOrgPath'), orgPath: window.sessionStorage.getItem('defaultOrgPath')
} }
req.getGoodsListPage(this.queryParams).then(resp => { req.getGoodsListPage(this.queryParams).then(resp => {
if (resp.success) { if (resp.success) {
const data = resp.data const data = resp.data
this.queryParams.total = data.total this.queryParams.total = data.total
this.dataList = data.records this.dataList = data.records
this.dialogVisible3 = true this.dialogVisible3 = true
} else { } else {
// resp.code // resp.code
this.dataList = [] this.dataList = []
this.queryParams.total = 0 this.queryParams.total = 0
} }
}).catch(e => {
}) })
.catch(e => {})
}, },
selectionLineChangeHandle3(val) { selectionLineChangeHandle3(val) {
this.selectionList3 = val this.selectionList3 = val
}, },
addDialogList3() { addDialogList3() {
this.dialogVisible3 = false this.dialogVisible3 = false
for (var i = 0; i < this.selectionList3.length; i++) { for (var i = 0; i < this.selectionList3.length; i++) {
var item = this.selectionList3[i] var item = this.selectionList3[i]
this.formobj.asOldpartreturnList.push({ this.formobj.asOldpartreturnList.push({
"sid": '', sid: '',
"remarks": '', remarks: '',
"mainSid": '', mainSid: '',
"vinNo": item.vinNo, vinNo: item.vinNo,
"goodsSpuSid": item.goodsSpuSid, goodsSpuSid: item.goodsSpuSid,
"goodsSpuName": item.goodsSpuName, goodsSpuName: item.goodsSpuName,
"goodsSkuSid": item.goodsSkuSid, goodsSkuSid: item.goodsSkuSid,
"goodsSkuTitle": item.goodsSkuTitle, goodsSkuTitle: item.goodsSkuTitle,
"goodsSkuCode": item.goodsSkuCode, goodsSkuCode: item.goodsSkuCode,
"goodsSkuOwnSpec": item.goodsSkuOwnSpec, goodsSkuOwnSpec: item.goodsSkuOwnSpec,
"manufacturerSid": item.manufacturerSid, manufacturerSid: item.manufacturerSid,
"manufacturerName": item.manufacturerName, manufacturerName: item.manufacturerName,
"warehouseSid": item.warehouseSid, warehouseSid: item.warehouseSid,
"warehouseName": item.warehouseName, warehouseName: item.warehouseName,
"warehouseAreaSid": item.warehouseAreaSid, warehouseAreaSid: item.warehouseAreaSid,
"warehouseAreaName": item.warehouseAreaName, warehouseAreaName: item.warehouseAreaName,
"warehouseRackSid": item.warehouseRackSid, warehouseRackSid: item.warehouseRackSid,
"warehouseRackName": item.warehouseRackName, warehouseRackName: item.warehouseRackName,
"unit": item.unit, unit: item.unit,
"sourceBillNo": item.sourceBillNo, sourceBillNo: item.sourceBillNo,
"claimBillNo": '', claimBillNo: '',
"isCf": "是", isCf: '是',
"needReturnCount": item.count, needReturnCount: item.count,
"actualReturnCount": item.count actualReturnCount: item.count
}) })
} }
}, },
handleClose3() { handleClose3() {
this.dialogVisible3 = false this.dialogVisible3 = false
}, }
} }
} }
</script> </script>
<style scoped> <style scoped>
/deep/ .el-form-item__error { /deep/ .el-form-item__error {
margin-left: 120px !important; margin-left: 120px !important;
} }
.must { .must {
color: #f00; color: #f00;
} }
.span-sty { .span-sty {
width: 130px !important; width: 130px !important;
} }
.addinputInfo { .addinputInfo {
margin-left: 120px !important; margin-left: 120px !important;
} }
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { .formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important; margin-left: 120px !important;
width: calc(100% - 115px); width: calc(100% - 115px);
} }
.first_row { .first_row {
border-top: 1px solid #E0E3EB; border-top: 1px solid #E0E3EB;
} }
.titleOne { .titleOne {
padding: 7px; padding: 7px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
</style> </style>

178
yxt-as-ui/src/views/storage/oldPartsFactory/oldPartsFactoryInfo.vue

@ -1,29 +1,14 @@
<template> <template>
<div> <div class="app-container">
<div class="tab-header webtop"> <div class="tab-header webtop">
<!-- 标题 -->
<div>旧件返厂</div> <div>旧件返厂</div>
<!-- start 添加修改按钮 -->
<div> <div>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> <el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div> </div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div> </div>
<div class="listconadd"> <div class="listconadd">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02"> <el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<!-- <div class="title">
<div>基础信息</div>
</div> -->
<el-row class="first_row"> <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"> <el-col :span="8">
<div class="span-sty">申请人</div> <div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
@ -32,147 +17,88 @@
<div class="span-sty">申请部门</div> <div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">申请日期</div> <div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col> </el-col>
</el-row>
<!-- <el-row>
<el-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-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-row>
<el-col :span="24"> <el-col :span="24">
<div class="span-sty">附件</div> <div class="span-sty">附件</div>
<el-form-item class="trightb_item"> <el-form-item class="trightb_item">
<el-image style="width: 120px;height: 120px; margin: 10px;" class="addinputInfo" <el-image style="width: 120px;height: 120px; margin: 10px;" class="addinputInfo" v-for="(item, index) in formobj.filePaths" :key="index" :src="item" :preview-src-list="[item]">
v-for="(item,index) in formobj.filePaths" :src="item" :preview-src-list="[item]">
</el-image> </el-image>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<div class="span-sty">备注</div> <div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div class="title">商品列表</div>
<div class="title" <el-table v-loading="listLoading" :data="formobj.asOldpartreturnList" border style="width: 100%;" :row-style="{height: '40px'}">
style="display: flex;align-items: center;justify-content: space-between;height:40px;margin-top: 10px;"> <el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center"/>
<div>商品列表</div> <el-table-column label="商品名称" prop="goodsSpuName" align="center"/>
</div> <el-table-column label="图号" prop="goodsSkuCode" align="center"/>
<el-table v-loading="listLoading" :data="formobj.asOldpartreturnList" border style="width: 100%;" <el-table-column label="厂家" prop="manufacturerName" align="center"/>
:row-style="{height: '40px'}"> <el-table-column label="规格" prop="goodsSkuOwnSpec" align="center"/>
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> <el-table-column label="单位" prop="unit" align="center"/>
<el-table-column label="商品名称" prop="goodsSpuName" align="center" /> <el-table-column label="车架号" prop="vinNo" align="center"/>
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" /> <el-table-column label="维修单号" prop="sourceBillNo" align="center"/>
<el-table-column label="厂家" prop="manufacturerName" align="center" /> <el-table-column label="索赔单号" prop="claimBillNo" align="center"/>
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" /> <el-table-column label="需返厂数量" prop="needReturnCount" align="center"/>
<el-table-column label="单位" prop="unit" align="center" /> <el-table-column label="实际返厂数量" prop="actualReturnCount" align="center"/>
<el-table-column label="车架号" prop="vinNo" align="center" /> <el-table-column label="差异说明" prop="remarks" align="center"/>
<el-table-column label="维修单号" prop="sourceBillNo" align="center" /> <el-table-column label="是否迟返" prop="isCf" align="center"/>
<el-table-column label="索赔单号" prop="claimBillNo" 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-column label="是否迟返" prop="isCf" align="center" />
</el-table> </el-table>
</el-form> </el-form>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import req from '@/api/storage/oldPartsFactory.js' import req from '@/api/storage/oldPartsFactory.js'
export default { export default {
components: {}, components: {},
data() { data() {
return { return {
listLoading: false, listLoading: false,
submitdisabled: false, submitdisabled: false,
formobj: {}, formobj: {}
} }
},
methods: {
indexMethod(index) {
return index + 1
}, },
methods: {
indexMethod(index) {
return index + 1
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.$emit('doback')
},
showAdd() {
},
showEdit(row) {
var params = { handleReturn() {
sid: row.sid this.formobj = {}
this.$emit('doback')
},
showEdit(row) {
req.init(row.sid).then(resp => {
if (resp.success) {
this.formobj = resp.data
} }
req.init(row.sid) }).catch(e => {
.then(resp => { this.formobj = {}
if (resp.success) { })
this.formobj = resp.data
}
})
.catch(e => {
this.formobj = {}
})
}
} }
} }
}
</script> </script>
<style scoped> <style scoped>
.span-sty { .span-sty {
width: 130px !important; width: 130px !important;
} }
.addinputInfo {
.addinputInfo { margin-left: 120px !important;
margin-left: 120px !important; }
} .first_row {
border-top: 1px solid #E0E3EB;
.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> </style>

642
yxt-as-ui/src/views/workFlow/oldPartsFactoryFlow/oldPartsFactoryDaiBan.vue

@ -31,35 +31,28 @@
<div class="span-sty">备注</div> <div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<div class="span-sty">附件</div> <div class="span-sty">附件</div>
<el-form-item class="trightb_item"> <el-form-item class="trightb_item">
<el-image style="width: 120px;height: 120px; margin: 10px;" class="addinputInfo" <el-image style="width: 120px;height: 120px; margin: 10px;" class="addinputInfo" v-for="(item, index) in formobj.filePaths" :key="index" :src="item" :preview-src-list="[item]">
v-for="(item,index) in formobj.filePaths" :src="item" :preview-src-list="[item]">
</el-image> </el-image>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div class="title" <div class="title">商品列表</div>
style="display: flex;align-items: center;justify-content: space-between;height:40px;margin-top: 10px;"> <el-table v-loading="listLoading" :data="formobj.asOldpartreturnList" border style="width: 100%;" :row-style="{height: '40px'}">
<div>商品列表</div> <el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
</div> <el-table-column label="商品名称" prop="goodsSkuName" align="center"/>
<el-table v-loading="listLoading" :data="formobj.asOldpartreturnList" border style="width: 100%;" <el-table-column label="图号" prop="goodsSkuCode" align="center"/>
:row-style="{height: '40px'}"> <el-table-column label="厂家" prop="manufacturerName" align="center"/>
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> <el-table-column label="规格" prop="goodsSkuOwnSpec" align="center"/>
<el-table-column label="商品名称" prop="goodsSkuName" align="center" /> <el-table-column label="单位" prop="unit" align="center"/>
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" /> <el-table-column label="需返厂数量" prop="needReturnCount" align="center"/>
<el-table-column label="厂家" prop="manufacturerName" align="center" /> <el-table-column label="实际返厂数量" prop="actualReturnCount" align="center"/>
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" /> <el-table-column label="差异说明" prop="remarks" 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-table>
</el-form> </el-form>
</div> </div>
</div> </div>
@ -92,8 +85,9 @@
<span>意见:</span> <span>意见:</span>
</el-col> </el-col>
<el-col :span="20"> <el-col :span="20">
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" <el-form-item>
type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable></el-input></el-form-item> <el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable></el-input>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div style="text-align:center;margin-top: 20px;"> <div style="text-align:center;margin-top: 20px;">
@ -106,339 +100,335 @@
</template> </template>
<script> <script>
import req from '@/api/storage/oldPartsFactory' import req from '@/api/storage/oldPartsFactory'
import { import { selectStaffListss } from '@/api/Common/dictcommons'
selectStaffListss
} from '@/api/Common/dictcommons'
export default { export default {
name: 'WorkSLRSettlementDaiBan', name: 'WorkSLRSettlementDaiBan',
data() { data() {
return { return {
viewTitle: '', viewTitle: '',
viewState: 1, viewState: 1,
submitdisabled: false, submitdisabled: false,
tableKey: 0, tableKey: 0,
index: 0, index: 0,
formobj: { formobj: {
"sid": "", sid: '',
"remarks": "", remarks: '',
"createBySid": '', createBySid: '',
"createByName": '', createByName: '',
"deptSid": '', deptSid: '',
"deptName": '', deptName: '',
"createTime": "", createTime: '',
"billNo": "", billNo: '',
"filePaths": [], filePaths: [],
"useOrgSid": '', useOrgSid: '',
"useOrgName": '', useOrgName: '',
"orgSidPath": '', orgSidPath: '',
"procDefId": "", procDefId: '',
"nodeId": "", nodeId: '',
"procInstId": "", procInstId: '',
"nodeState": "", nodeState: '',
"taskId": "", taskId: '',
"finishTime": "", finishTime: '',
"asOldpartreturnList": [ 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) // 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: {
}, showInfo(sid) {
rules: {}, this.viewTitle = '旧件返厂申请详情'
options: [], this.$nextTick(() => {
operation: '', // this.$refs['form_obj'].clearValidate()
dialogList: { })
comment: '' req.fetchBySid(sid).then((res) => {
}, if (res.success) {
startTask: true, this.formobj = res.data
current: {
taskDefKey: '',
taskName: '' //
},
nextNode: {}, //
nodeDialogVisible: false,
currentLink: true,
countersignLink: false,
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
},
//
countersign: {
taskId: '',
assignee: '',
userSid: '',
instanceId: '',
views: ''
} }
} })
selectStaffListss().then((res) => {
if (res.success) {
this.options = res.data
}
})
}, },
created() { //
console.log('url:' + window.location.href) openCountersign(val) {
var one = window.location.href.indexOf('&data') + 6 this.operation = val
const data = window.location.href.substr(one) // urlunescape()web,使 this.currentLink = true
const obj = JSON.parse(decodeURIComponent(data)) this.countersignLink = true
console.log('iframe页面获取的obj:', obj) this.dialogList.comment = ''
// req.getNextNodesForSubmit({
this.linkByParameter.businessSid = obj.businessSid taskDefKey: this.current.taskDefKey,
this.linkByParameter.instanceId = obj.instanceId businessSid: this.linkByParameter.businessSid
this.linkByParameter.taskId = obj.taskId }).then((resp) => {
this.linkByParameter.taskDefKey = obj.taskDefKey if (resp.success) {
// this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath') var arr = resp.data
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid') this.nextNode = arr[0]
this.current.taskDefKey = obj.taskDefKey this.nodeDialogVisible = true
this.current.taskName = obj.taskName }
// this.submitdisabled = false
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({ openAgree(val) {
cmd: 'returnHeight', this.operation = val
params: { this.currentLink = true
// this.countersignLink = false
code: 2, this.dialogList.comment = '同意'
data: 500 + 'px' req.getNextNodesForSubmit({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
} }
}, '*') this.submitdisabled = false
})
}, },
//
methods: { openReject(val) {
showInfo(sid) { this.operation = val
this.viewTitle = '旧件返厂申请详情' this.currentLink = true
this.$nextTick(() => { this.countersignLink = false
this.$refs['form_obj'].clearValidate() this.dialogList.comment = ''
}) req.getPreviousNodesForReject({
req.fetchBySid(sid).then((res) => { taskDefKey: this.current.taskDefKey,
if (res.success) { businessSid: this.linkByParameter.businessSid
this.formobj = res.data }).then((resp) => {
} if (resp.success) {
}) var arr = resp.data
selectStaffListss().then((res) => { this.nextNode = arr[0]
if (res.success) { this.nodeDialogVisible = true
this.options = res.data
}
})
},
//
openCountersign(val) {
this.operation = val
this.currentLink = true
this.countersignLink = true
this.dialogList.comment = ''
req.getNextNodesForSubmit({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openAgree(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = '同意'
req.getNextNodesForSubmit({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openReject(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = ''
req.getPreviousNodesForReject({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openStop(val) {
this.operation = val
this.currentLink = false
this.countersignLink = false
this.dialogList.comment = ''
this.nodeDialogVisible = true
},
reject() {
if (this.operation === '同意') {
this.handleAgree()
} else if (this.operation === '驳回') {
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
} else {
this.handleReject()
}
} else if (this.operation === '终止') {
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
} else {
this.handleStop()
}
} else if (this.operation === '加签') {
this.handleCountersign()
} }
}, this.submitdisabled = false
/** 加签 */ })
handleCountersign() { },
if (this.countersign.assignee === '') { //
openStop(val) {
this.operation = val
this.currentLink = false
this.countersignLink = false
this.dialogList.comment = ''
this.nodeDialogVisible = true
},
reject() {
if (this.operation === '同意') {
this.handleAgree()
} else if (this.operation === '驳回') {
if (this.dialogList.comment === '') {
this.$message({ this.$message({
showClose: true, showClose: true,
type: 'error', type: 'error',
message: '请选择加签人员' message: '请填写审批意见'
}) })
return } else {
this.handleReject()
} }
} else if (this.operation === '终止') {
if (this.dialogList.comment === '') { if (this.dialogList.comment === '') {
this.$message({ this.$message({
showClose: true, showClose: true,
type: 'error', type: 'error',
message: '请填写审批意见' message: '请填写审批意见'
}) })
return } else {
this.handleStop()
} }
this.countersign.views = this.dialogList.comment } else if (this.operation === '加签') {
req.delegate(this.countersign).then((response) => { this.handleCountersign()
if (response.success) { }
this.$notify({ },
title: '提示', /** 加签 */
message: '执行成功', handleCountersign() {
type: 'success', if (this.countersign.assignee === '') {
duration: 2000 this.$message({
}) showClose: true,
this.nodeDialogVisible = false type: 'error',
// message: '请选择加签人员'
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 同意任务 */
handleAgree() {
this.linkByParameter.comment = this.dialogList.comment
req.complete(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 驳回任务 */
handleReject() {
this.linkByParameter.comment = this.dialogList.comment
req.reject(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
}) })
}, return
/** 终止任务 */ }
handleStop() { if (this.dialogList.comment === '') {
this.linkByParameter.comment = this.dialogList.comment this.$message({
req.breakProcess(this.linkByParameter).then((response) => { showClose: true,
if (response.success) { type: 'error',
this.$notify({ message: '请填写审批意见'
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
}) })
return
} }
this.countersign.views = this.dialogList.comment
req.delegate(this.countersign).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 同意任务 */
handleAgree() {
this.linkByParameter.comment = this.dialogList.comment
req.complete(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 驳回任务 */
handleReject() {
this.linkByParameter.comment = this.dialogList.comment
req.reject(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 终止任务 */
handleStop() {
this.linkByParameter.comment = this.dialogList.comment
req.breakProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
} }
} }
}
</script> </script>
<style scoped> <style scoped>
.span-sty { .span-sty {
width: 130px !important; width: 130px !important;
} }
.addinputInfo { .addinputInfo {
margin-left: 120px !important; margin-left: 120px !important;
} }
.rowClass { .rowClass {
border-top: 1px solid #E0E3EB; border-top: 1px solid #E0E3EB;
} }
</style> </style>

282
yxt-as-ui/src/views/workFlow/oldPartsFactoryFlow/oldPartsFactoryEdit.vue

@ -29,35 +29,27 @@
<div class="span-sty">备注</div> <div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<div class="span-sty">附件</div> <div class="span-sty">附件</div>
<el-form-item class="trightb_item"> <el-form-item class="trightb_item">
<el-image style="width: 120px;height: 120px; margin: 10px;" class="addinputInfo" <el-image style="width: 120px;height: 120px; margin: 10px;" class="addinputInfo" v-for="(item, index) in formobj.filePaths" :key="index" :src="item" :preview-src-list="[item]"></el-image>
v-for="(item,index) in formobj.filePaths" :src="item" :preview-src-list="[item]">
</el-image>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div class="title" <div class="title">商品列表</div>
style="display: flex;align-items: center;justify-content: space-between;height:40px;margin-top: 10px;"> <el-table v-loading="listLoading" :data="formobj.asOldpartreturnList" border style="width: 100%;" :row-style="{height: '40px'}">
<div>商品列表</div> <el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center"/>
</div> <el-table-column label="商品名称" prop="goodsSkuName" align="center"/>
<el-table v-loading="listLoading" :data="formobj.asOldpartreturnList" border style="width: 100%;" <el-table-column label="商品编码" prop="goodsSkuCode" align="center"/>
:row-style="{height: '40px'}"> <el-table-column label="厂家" prop="manufacturerName" align="center"/>
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> <el-table-column label="规格" prop="goodsSkuOwnSpec" align="center"/>
<el-table-column label="商品名称" prop="goodsSkuName" align="center" /> <el-table-column label="单位" prop="unit" align="center"/>
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" /> <el-table-column label="需返厂数量" prop="needReturnCount" align="center"/>
<el-table-column label="厂家" prop="manufacturerName" align="center" /> <el-table-column label="实际返厂数量" prop="actualReturnCount" align="center"/>
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" /> <el-table-column label="差异说明" prop="remarks" 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-table>
</el-form> </el-form>
</div> </div>
</div> </div>
@ -65,145 +57,137 @@
</template> </template>
<script> <script>
import req from '@/api/storage/oldPartsFactory' 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": '',
"createByName": '',
"deptSid": '',
"deptName": '',
"createTime": "",
"billNo": "",
"filePaths": [],
"useOrgSid": '',
"useOrgName": '',
"orgSidPath": '',
"procDefId": "",
"nodeId": "",
"procInstId": "",
"nodeState": "",
"taskId": "",
"finishTime": "",
"asOldpartreturnList": [
] export default {
}, name: 'WorkSLRSettlementEdit',
rules: {} data() {
return {
viewTitle: '',
viewState: 1,
submitdisabled: false,
tableKey: 0,
index: 0,
formobj: {
sid: '',
remarks: '',
createBySid: '',
createByName: '',
deptSid: '',
deptName: '',
createTime: '',
billNo: '',
filePaths: [],
useOrgSid: '',
useOrgName: '',
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) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
} }
}, }, '*')
created() { },
console.log('url:' + window.location.href) computed: {},
var one = window.location.href.indexOf('&data') + 6 methods: {
const data = window.location.href.substr(one) // urlunescape()web,使 showInfo(sid) {
const obj = JSON.parse(decodeURIComponent(data)) this.viewTitle = '【编辑】旧件返厂申请'
this.showInfo(obj.businessSid) this.$nextTick(() => {
}, this.$refs['form_obj'].clearValidate()
mounted() { })
window.parent.postMessage({ req.fetchBySid(sid).then((res) => {
cmd: 'returnHeight', if (res.success) {
params: { this.formobj = res.data
//
code: 2,
data: 500 + 'px'
} }
}, '*') })
},
computed: {
}, },
methods: { saveOrUpdate() {
showInfo(sid) { this.$refs['form_obj'].validate((valid) => {
this.viewTitle = '【编辑】旧件返厂申请' if (valid) {
this.$nextTick(() => { this.submitdisabled = true
this.$refs['form_obj'].clearValidate() req.saveOrUpdate(this.formobj).then((res) => {
}) if (res.success) {
req.fetchBySid(sid).then((res) => { this.$message({
if (res.success) { showClose: true,
this.formobj = res.data type: 'success',
} message: '保存成功'
}) })
}, // ()
saveOrUpdate() { window.parent.postMessage({
this.$refs['form_obj'].validate((valid) => { cmd: 'returnHeight',
if (valid) { params: {
this.submitdisabled = true //
req.saveOrUpdate(this.formobj).then((res) => { code: 1
if (res.success) { }
this.$message({ }, '*')
showClose: true, } else {
type: 'success',
message: '保存成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false this.submitdisabled = false
}) }
} }).catch(() => {
}) this.submitdisabled = false
}, })
submit() { }
this.$refs['form_obj'].validate((valid) => { })
if (valid) { },
this.submitdisabled = true submit() {
req.submit(this.formobj).then((res) => { this.$refs['form_obj'].validate((valid) => {
if (res.success) { if (valid) {
this.$message({ this.submitdisabled = true
showClose: true, req.submit(this.formobj).then((res) => {
type: 'success', if (res.success) {
message: '提交成功' this.$message({
}) showClose: true,
// () type: 'success',
window.parent.postMessage({ message: '提交成功'
cmd: 'returnHeight', })
params: { // ()
// window.parent.postMessage({
code: 1 cmd: 'returnHeight',
} params: {
}, '*') //
} else { code: 1
this.submitdisabled = false }
} }, '*')
}).catch(() => { } else {
this.submitdisabled = false this.submitdisabled = false
}) }
} }).catch(() => {
}) this.submitdisabled = false
} })
}
})
} }
} }
}
</script> </script>
<style scoped> <style scoped>
.span-sty { .span-sty {
width: 130px !important; width: 130px !important;
} }
.addinputInfo { .addinputInfo {
margin-left: 120px !important; margin-left: 120px !important;
} }
</style> </style>

293
yxt-as-ui/src/views/workFlow/oldPartsFactoryFlow/oldPartsFactoryYiBan.vue

@ -28,35 +28,28 @@
<div class="span-sty">备注</div> <div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<div class="span-sty">附件</div> <div class="span-sty">附件</div>
<el-form-item class="trightb_item"> <el-form-item class="trightb_item">
<el-image style="width: 120px;height: 120px; margin: 10px;" class="addinputInfo" <el-image style="width: 120px;height: 120px; margin: 10px;" class="addinputInfo" v-for="(item, index) in formobj.filePaths" :key="index" :src="item" :preview-src-list="[item]">
v-for="(item,index) in formobj.filePaths" :src="item" :preview-src-list="[item]">
</el-image> </el-image>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div class="title" <div class="title">>商品列表</div>
style="display: flex;align-items: center;justify-content: space-between;height:40px;margin-top: 10px;"> <el-table v-loading="listLoading" :data="formobj.asOldpartreturnList" border style="width: 100%;" :row-style="{height: '40px'}">
<div>商品列表</div> <el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center"/>
</div> <el-table-column label="商品名称" prop="goodsSkuName" align="center"/>
<el-table v-loading="listLoading" :data="formobj.asOldpartreturnList" border style="width: 100%;" <el-table-column label="商品编码" prop="goodsSkuCode" align="center"/>
:row-style="{height: '40px'}"> <el-table-column label="厂家" prop="manufacturerName" align="center"/>
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> <el-table-column label="规格" prop="goodsSkuOwnSpec" align="center"/>
<el-table-column label="商品名称" prop="goodsSkuName" align="center" /> <el-table-column label="单位" prop="unit" align="center"/>
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" /> <el-table-column label="需返厂数量" prop="needReturnCount" align="center"/>
<el-table-column label="厂家" prop="manufacturerName" align="center" /> <el-table-column label="实际返厂数量" prop="actualReturnCount" align="center"/>
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" /> <el-table-column label="差异说明" prop="remarks" 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-table>
</el-form> </el-form>
</div> </div>
</div> </div>
@ -64,151 +57,143 @@
</template> </template>
<script> <script>
import req from '@/api/storage/oldPartsFactory' import req from '@/api/storage/oldPartsFactory'
export default { export default {
name: 'WorkSLRSettlementYiBan', name: 'WorkSLRSettlementYiBan',
data() { data() {
return { return {
viewTitle: '', viewTitle: '',
viewState: 1, viewState: 1,
submitdisabled: false, submitdisabled: false,
tableKey: 0, tableKey: 0,
index: 0, index: 0,
// service formobj: {
serviceKey: 1, sid: '',
// subjoin remarks: '',
subjoinKey: 2, createBySid: '',
formobj: { createByName: '',
"sid": "", deptSid: '',
"remarks": "", deptName: '',
"createBySid": '', createTime: '',
"createByName": '', billNo: '',
"deptSid": '', filePaths: [],
"deptName": '', useOrgSid: '',
"createTime": "", useOrgName: '',
"billNo": "", orgSidPath: '',
"filePaths": [], procDefId: '',
"useOrgSid": '', nodeId: '',
"useOrgName": '', procInstId: '',
"orgSidPath": '', nodeState: '',
"procDefId": "", taskId: '',
"nodeId": "", finishTime: '',
"procInstId": "", asOldpartreturnList: []
"nodeState": "", },
"taskId": "", rules: {},
"finishTime": "", //
"asOldpartreturnList": [ linkByParameter: {
businessSid: '',
] comment: '',
}, instanceId: '',
rules: {}, taskId: '',
// orgSidPath: '',
linkByParameter: { taskDefKey: '',
businessSid: '', userSid: ''
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
}
} }
}, }
created() { },
console.log('url:' + window.location.href) created() {
var one = window.location.href.indexOf('&data') + 6 console.log('url:' + window.location.href)
const data = window.location.href.substr(one) // urlunescape()web,使 var one = window.location.href.indexOf('&data') + 6
const obj = JSON.parse(decodeURIComponent(data)) const data = window.location.href.substr(one) // urlunescape()web,使
console.log('iframe页面获取的obj:', obj) const obj = JSON.parse(decodeURIComponent(data))
// console.log('iframe页面获取的obj:', obj)
this.linkByParameter.businessSid = obj.businessSid //
this.linkByParameter.instanceId = obj.instanceId this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.taskId = obj.taskId this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskDefKey = obj.taskDefKey this.linkByParameter.taskId = obj.taskId
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid') this.linkByParameter.taskDefKey = obj.taskDefKey
// this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
this.showInfo(obj.businessSid) //
}, this.showInfo(obj.businessSid)
mounted() { },
window.parent.postMessage({ mounted() {
cmd: 'returnHeight', window.parent.postMessage({
params: { cmd: 'returnHeight',
// params: {
code: 2, //
data: 500 + 'px' 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(',')
}
})
}
} }
}, '*') })
}, },
computed: { /** 确认撤回任务 */
openRevoke() {
}, this.$confirm('是否确认执行撤回操作', '提示', {
methods: { confirmButtonText: '确定',
showInfo(sid) { cancelButtonText: '取消',
this.viewTitle = '旧件返厂申请详情' type: 'warning'
this.$nextTick(() => { }).then(() => {
this.$refs['form_obj'].clearValidate() this.handleRevoke()
}) }).catch(() => {
req.fetchBySid(sid).then((res) => { this.$message({
if (res.success) { type: 'info',
this.formobj = res.data message: '已取消撤回'
if (this.formobj.sitemVos.length > 0) {
this.formobj.sitemVos.forEach((e) => {
if (e.staffNameList.length > 0) {
e.repairerName = e.staffNameList.join(',')
}
})
}
}
}) })
}, })
/** 确认撤回任务 */ },
openRevoke() { /** 撤回任务 */
this.$confirm('是否确认执行撤回操作', '提示', { handleRevoke() {
confirmButtonText: '确定', req.revokeProcess(this.linkByParameter).then((response) => {
cancelButtonText: '取消', if (response.success) {
type: 'warning' this.$notify({
}).then(() => { title: '提示',
this.handleRevoke() message: '执行成功',
}).catch(() => { type: 'success',
this.$message({ duration: 2000
type: 'info',
message: '已取消撤回'
}) })
}) this.nodeDialogVisible = false
}, //
/** 撤回任务 */ window.parent.postMessage({
handleRevoke() { cmd: 'returnHeight',
req.revokeProcess(this.linkByParameter).then((response) => { params: {
if (response.success) { //
this.$notify({ code: 1
title: '提示', }
message: '执行成功', }, '*')
type: 'success', }
duration: 2000 })
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
} }
} }
}
</script> </script>
<style scoped> <style scoped>
.span-sty { .span-sty {
width: 130px !important; width: 130px !important;
} }
.addinputInfo { .addinputInfo {
margin-left: 120px !important; margin-left: 120px !important;
} }
</style> </style>

Loading…
Cancel
Save