Browse Source

完善采购申请

master
yunuo970428 11 months ago
parent
commit
9f9e827352
  1. 2
      yxt-as-ui/src/views/purchase/procurement/procurementAdd.vue
  2. 31
      yxt-as-ui/src/views/purchase/procurement/relation/chooseproducts.vue

2
yxt-as-ui/src/views/purchase/procurement/procurementAdd.vue

@ -546,7 +546,7 @@ export default {
selectProducts() { selectProducts() {
this.viewState = 2 this.viewState = 2
const aa = [] const aa = []
this.$refs['divSp'].showData(aa, this.formobj.deptSid) this.$refs['divSp'].showData(aa, this.formobj.createBySid, this.formobj.createOrgSid, this.formobj.deptSid)
}, },
backData(value) { backData(value) {
this.viewState = 1 this.viewState = 1

31
yxt-as-ui/src/views/purchase/procurement/relation/chooseproducts.vue

@ -1,10 +1,11 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div> <div v-show="viewState == 1">
<div class="tab-header webtop"> <div class="tab-header webtop">
<div>选择商品</div> <div>选择商品</div>
<div> <div>
<el-button type="primary" size="small" @click="AddUpdateReturn">确定</el-button> <el-button type="primary" size="small" @click="toConfirm">确定</el-button>
<el-button type="primary" size="small" @click="addProducts">新增商品</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> <el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div> </div>
</div> </div>
@ -51,26 +52,32 @@
</div> </div>
</div> </div>
</div> </div>
<goodsAdd2 v-show="viewState == 2" ref="divAdd" @reloadlist="getList" @doback="resetState" />
</div> </div>
</template> </template>
<script> <script>
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import { chooseproducts } from '@/api/Common/dictcommons' import { chooseproducts } from '@/api/Common/dictcommons'
import goodsAdd2 from '@/views/goods/goods/goodsAdd2'
export default { export default {
name: 'SelectVehicle', name: 'SelectVehicle',
components: { components: {
Pagination Pagination,
goodsAdd2
}, },
data() { data() {
return { return {
viewState: 1,
isSearchShow: false, isSearchShow: false,
searchxianshitit: '隐藏查询条件', searchxianshitit: '隐藏查询条件',
tableKey: 0, tableKey: 0,
sids: [], sids: [],
list: [], list: [],
number: '', userSid: '',
createOrgSid: '',
deptSid: '',
listLoading: false, listLoading: false,
listQuery: { listQuery: {
current: 1, current: 1,
@ -129,7 +136,7 @@ export default {
handleSelectionChange(row) { handleSelectionChange(row) {
this.sids = row this.sids = row
}, },
showData(value, useOrgSid) { showData(value, userSid, createOrgSid, deptSid) {
// const aa = [] // const aa = []
// if (value.length > 0) { // if (value.length > 0) {
// for (var i = 0; i < value.length; i++) { // for (var i = 0; i < value.length; i++) {
@ -139,20 +146,30 @@ export default {
// } else { // } else {
// this.listQuery.params.saleVehSids = [] // this.listQuery.params.saleVehSids = []
// }`` // }``
this.listQuery.params.useOrgSid = useOrgSid this.userSid = userSid
this.createOrgSid = createOrgSid
this.deptSid = deptSid
this.listQuery.params.useOrgSid = deptSid
this.listQuery.current = 1 this.listQuery.current = 1
this.listQuery.size = 5 this.listQuery.size = 5
this.listQuery.total = 0 this.listQuery.total = 0
this.getList() this.getList()
}, },
// //
AddUpdateReturn() { toConfirm() {
if (this.sids.length > 0) { if (this.sids.length > 0) {
this.$emit('backData', this.sids) this.$emit('backData', this.sids)
} else { } else {
this.$notify({ title: '提示', message: '请至少选择一条记录进行操作', type: 'error', duration: 2000 }) this.$notify({ title: '提示', message: '请至少选择一条记录进行操作', type: 'error', duration: 2000 })
} }
}, },
addProducts() {
this.viewState = 2
this.$refs['divAdd'].showAdd(this.userSid, this.createOrgSid, this.deptSid)
},
resetState() {
this.viewState = 1
},
// //
handleReturn() { handleReturn() {
this.$emit('doback') this.$emit('doback')

Loading…
Cancel
Save