diff --git a/anrui-scm/anrui-scm-ui/src/api/purchasingchannels/purchasingchannels.js b/anrui-scm/anrui-scm-ui/src/api/purchasingchannels/purchasingchannels.js
index bb1a091e90..144c74b9f7 100644
--- a/anrui-scm/anrui-scm-ui/src/api/purchasingchannels/purchasingchannels.js
+++ b/anrui-scm/anrui-scm-ui/src/api/purchasingchannels/purchasingchannels.js
@@ -4,7 +4,7 @@ export default {
// 查询分页列表
listPage: function(params) {
return request({
- url: '/buscenter/v1/buspurchasechannel/listPage',
+ url: '/scm/v1/scmpurchasechannel/listPage',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
@@ -13,7 +13,7 @@ export default {
// 保存修改记录
choice: function(data) {
return request({
- url: '/buscenter/v1/buspurchasechannel/choice',
+ url: '/scm/v1/scmpurchasechannel/choice',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
diff --git a/anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js b/anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js
index 2be1c9cf39..ce6437ecee 100644
--- a/anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js
+++ b/anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js
@@ -748,7 +748,7 @@ const codemenu = [
title: '采购渠道'
},
children: [{
- path: '/purchasingchannels',
+ path: '/purchasingchannels/caigouqudaotobeselected',
component: () => import('@/views/purchasingchannels/caigouqudaotobeselected.vue'),
name: 'caigouqudaotobeselected',
meta: { title: '采购渠道', noCache: true }
diff --git a/anrui-scm/anrui-scm-ui/src/views/purchasingchannels/caigouqudaoselected.vue b/anrui-scm/anrui-scm-ui/src/views/purchasingchannels/caigouqudaoselected.vue
index e553a726ef..40687d9cf6 100644
--- a/anrui-scm/anrui-scm-ui/src/views/purchasingchannels/caigouqudaoselected.vue
+++ b/anrui-scm/anrui-scm-ui/src/views/purchasingchannels/caigouqudaoselected.vue
@@ -45,15 +45,21 @@
-
+
+
+
+
+ {{ scope.row.purchaseOrderTypeValue }}
+
+
- {{ scope.row.saleOrderNo }}
+ {{ scope.row.saleOrderNo }}
@@ -96,6 +102,16 @@
查看
+
+
+ {{ scope.row.choiceDate }}
+
+
+
+
+ {{ scope.row.operateName }}
+
+
@@ -105,6 +121,33 @@
+
+
+
+
+
+
+
+
+ 选择采购渠道
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -116,15 +159,17 @@ import req from '@/api/purchasingchannels/purchasingchannels'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
-import { getPathSidByUserSid } from '@/api/cheliang/dictcommons'
+import { getPathSidByUserSid, selectOrgLists, typeValues } from '@/api/cheliang/dictcommons'
import { getStorage } from '@/utils/auth'
+import saleOrder from '@/components/publicPage/saleOrder'
export default {
name: 'caigouqudaoselected',
components: {
Pagination,
pageye,
- ButtonBar
+ ButtonBar,
+ saleOrder
},
data() {
return {
@@ -132,8 +177,16 @@ export default {
dialogHeight: '80%',
centerDialogVisible: false,
viewState: 1,
+ dialogVisible: false,
btndisabled: false,
btnList: [
+ {
+ type: 'primary',
+ size: 'small',
+ icon: '',
+ btnKey: 'tobeSelect',
+ btnLabel: '再次选择'
+ },
{
type: 'info',
size: 'small',
@@ -148,8 +201,13 @@ export default {
tableKey: 0,
list: [],
orgDept_list: [],
+ purchaseOrderType_list: [],
FormLoading: false,
listLoading: false,
+ formobj: {
+ purchaseOrderTypeValue: '',
+ purchaseOrderTypeKey: ''
+ },
listQuery: {
params: {
applyDeptSid: '',
@@ -160,7 +218,7 @@ export default {
saleOrderApproEndDate: '',
saleOrderApproStartDate: '',
saleOrderNo: '',
- state: '',
+ state: '2',
useOrgSid: ''
},
current: 1,
@@ -217,6 +275,9 @@ export default {
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
+ case 'tobeSelect':
+ this.tobeSelect()
+ break
case 'doClose':
this.doClose()
break
@@ -225,6 +286,16 @@ export default {
}
},
init() {
+ typeValues({ type: 'purchaseOrderType' }).then((resp) => {
+ if (resp.success) {
+ this.purchaseOrderType_list = resp.data
+ }
+ })
+ selectOrgLists({ userSid: window.sessionStorage.getItem('userSid') }).then((res) => {
+ if (res.success) {
+ this.orgDept_list = res.data
+ }
+ })
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((res) => {
if (res.success) {
this.listQuery.params.useOrgSid = res.data
@@ -239,6 +310,19 @@ export default {
var pageindex = index + 1 + pagestart
return pageindex
},
+ handleSelectionChange(row) {
+ const aa = []
+ row.forEach((element) => {
+ aa.push({
+ sid: element.sid,
+ userSid: window.sessionStorage.getItem('userSid'),
+ orgSidPath: window.sessionStorage.getItem('defaultOrgPath'),
+ purchaseOrderTypeKey: '',
+ purchaseOrderTypeValue: ''
+ })
+ })
+ this.sids = aa
+ },
// 查询列表信息
getList() {
this.listLoading = true
@@ -274,7 +358,7 @@ export default {
saleOrderApproEndDate: '',
saleOrderApproStartDate: '',
saleOrderNo: '',
- state: '',
+ state: '2',
useOrgSid: ''
},
current: 1,
@@ -283,6 +367,56 @@ export default {
}
this.init()
},
+ tobeSelect() {
+ if (this.sids.length === 1) {
+ this.dialogVisible = true
+ } else {
+ this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行操作' })
+ return
+ }
+ },
+ changePurchaseOrderType(value) {
+ const choose = this.purchaseOrderType_list.filter((item) => item.dictValue === value)
+ this.formobj.purchaseOrderTypeKey = choose[0].dictKey
+ },
+ handleConfirm() {
+ if (this.formobj.purchaseOrderTypeValue === '') {
+ this.$message({ showClose: true, type: 'error', message: '选择采购渠道不能为空' })
+ return
+ }
+ for (var i = 0; i < this.sids.length; i++) {
+ this.sids[i].purchaseOrderTypeValue = this.formobj.purchaseOrderTypeValue
+ this.sids[i].purchaseOrderTypeKey = this.formobj.purchaseOrderTypeKey
+ }
+ const tip = '请确认采购渠道是否选择正确'
+ this.$confirm(tip, '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ req.choice(this.sids).then((res) => {
+ if (res.success) {
+ this.$message({ showClose: true, type: 'success', message: '操作成功' })
+ this.handleQuXiao()
+ this.getList()
+ }
+ })
+ })
+ },
+ handleQuXiao() {
+ this.formobj = {
+ purchaseOrderTypeValue: '',
+ purchaseOrderTypeKey: ''
+ }
+ this.dialogVisible = false
+ },
+ lookSale(row) {
+ this.viewState = 2
+ this.$refs['divSale'].showInfo({ sid: row.saleOrderSid })
+ },
+ resetState() {
+ this.viewState = 1
+ },
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
diff --git a/anrui-scm/anrui-scm-ui/src/views/purchasingchannels/caigouqudaotobeselected.vue b/anrui-scm/anrui-scm-ui/src/views/purchasingchannels/caigouqudaotobeselected.vue
index 341de65821..92c2f8d546 100644
--- a/anrui-scm/anrui-scm-ui/src/views/purchasingchannels/caigouqudaotobeselected.vue
+++ b/anrui-scm/anrui-scm-ui/src/views/purchasingchannels/caigouqudaotobeselected.vue
@@ -2,7 +2,7 @@
-
+
待选择
@@ -52,14 +52,9 @@
-
-
- 选择
-
-
- {{ scope.row.saleOrderNo }}
+ {{ scope.row.saleOrderNo }}
@@ -111,7 +106,11 @@
+
+
+
+
@@ -125,7 +124,7 @@
-
+
@@ -149,6 +148,7 @@ import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import caigouqudaoselected from './caigouqudaoselected'
+import saleOrder from '@/components/publicPage/saleOrder'
import { getStorage } from '@/utils/auth'
export default {
@@ -157,7 +157,8 @@ export default {
Pagination,
pageye,
ButtonBar,
- caigouqudaoselected
+ caigouqudaoselected,
+ saleOrder
},
data() {
return {
@@ -173,7 +174,7 @@ export default {
size: 'small',
icon: '',
btnKey: 'tobeSelect',
- btnLabel: '批量选择'
+ btnLabel: '选择'
},
{
type: 'info',
@@ -207,7 +208,7 @@ export default {
saleOrderApproEndDate: '',
saleOrderApproStartDate: '',
saleOrderNo: '',
- state: '',
+ state: '1',
useOrgSid: ''
},
current: 1,
@@ -308,6 +309,8 @@ export default {
row.forEach((element) => {
aa.push({
sid: element.sid,
+ userSid: window.sessionStorage.getItem('userSid'),
+ orgSidPath: window.sessionStorage.getItem('defaultOrgPath'),
purchaseOrderTypeKey: '',
purchaseOrderTypeValue: ''
})
@@ -331,19 +334,12 @@ export default {
})
},
tobeSelect() {
- if (this.sids.length === 0) {
- this.$message({ showClose: true, type: 'error', message: '请至少选择一条记录进行批量选择的操作' })
+ if (this.sids.length === 1) {
+ this.dialogVisible = true
+ } else {
+ this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行操作' })
return
}
- this.dialogVisible = true
- },
- handleSelect(row) {
- this.sids.push({
- sid: row.sid,
- purchaseOrderTypeKey: '',
- purchaseOrderTypeValue: ''
- })
- this.dialogVisible = true
},
changePurchaseOrderType(value) {
const choose = this.purchaseOrderType_list.filter((item) => item.dictValue === value)
@@ -368,6 +364,7 @@ export default {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '操作成功' })
this.handleQuXiao()
+ this.getList()
}
})
})
@@ -378,7 +375,6 @@ export default {
purchaseOrderTypeKey: ''
}
this.dialogVisible = false
- this.getList()
},
handleClick() {
this.viewState = 2
@@ -400,7 +396,7 @@ export default {
saleOrderApproEndDate: '',
saleOrderApproStartDate: '',
saleOrderNo: '',
- state: '',
+ state: '1',
useOrgSid: ''
},
current: 1,
@@ -409,6 +405,10 @@ export default {
}
this.init()
},
+ lookSale(row) {
+ this.viewState = 3
+ this.$refs['divSale'].showInfo({ sid: row.saleOrderSid })
+ },
resetState() {
this.viewState = 1
},