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() {
this.viewState = 2
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) {
this.viewState = 1

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

@ -1,10 +1,11 @@
<template>
<div class="app-container">
<div>
<div v-show="viewState == 1">
<div class="tab-header webtop">
<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>
</div>
</div>
@ -51,26 +52,32 @@
</div>
</div>
</div>
<goodsAdd2 v-show="viewState == 2" ref="divAdd" @reloadlist="getList" @doback="resetState" />
</div>
</template>
<script>
import Pagination from '@/components/pagination'
import { chooseproducts } from '@/api/Common/dictcommons'
import goodsAdd2 from '@/views/goods/goods/goodsAdd2'
export default {
name: 'SelectVehicle',
components: {
Pagination
Pagination,
goodsAdd2
},
data() {
return {
viewState: 1,
isSearchShow: false,
searchxianshitit: '隐藏查询条件',
tableKey: 0,
sids: [],
list: [],
number: '',
userSid: '',
createOrgSid: '',
deptSid: '',
listLoading: false,
listQuery: {
current: 1,
@ -129,7 +136,7 @@ export default {
handleSelectionChange(row) {
this.sids = row
},
showData(value, useOrgSid) {
showData(value, userSid, createOrgSid, deptSid) {
// const aa = []
// if (value.length > 0) {
// for (var i = 0; i < value.length; i++) {
@ -139,20 +146,30 @@ export default {
// } else {
// 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.size = 5
this.listQuery.total = 0
this.getList()
},
//
AddUpdateReturn() {
toConfirm() {
if (this.sids.length > 0) {
this.$emit('backData', this.sids)
} else {
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() {
this.$emit('doback')

Loading…
Cancel
Save