|
|
@ -45,15 +45,21 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="listtop"> |
|
|
|
<div class="tit">待选择列表</div> |
|
|
|
<div class="tit">已选择列表</div> |
|
|
|
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="init"/> |
|
|
|
</div> |
|
|
|
<div class=""> |
|
|
|
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;"> |
|
|
|
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange"> |
|
|
|
<el-table-column fixed width="50" type="selection" align="center"/> |
|
|
|
<el-table-column width="60" label="序号" type="index" :index="indexMethod" align="center"/> |
|
|
|
<el-table-column label="采购渠道" align="center" width="100"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.purchaseOrderTypeValue }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="销售订单编号" align="center" width="150"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.saleOrderNo }}</span> |
|
|
|
<span class="bluezi" @click="lookSale(scope.row)">{{ scope.row.saleOrderNo }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="销售订单审批日期" align="center" width="150"> |
|
|
@ -96,6 +102,16 @@ |
|
|
|
<span @click="flowRecord(scope.row)" class="bluezi">查看</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="选择日期" align="center" width="100"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.choiceDate }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作人" align="center" width="100"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.operateName }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<div class="pages"> |
|
|
@ -105,6 +121,33 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- End 列表页面 --> |
|
|
|
<!-- 查看销售订单 --> |
|
|
|
<saleOrder v-show="viewState == 2" ref="divSale" @doback="resetState"/> |
|
|
|
<!-- 选择采购渠道 --> |
|
|
|
<el-dialog :visible.sync="dialogVisible" width="50%"> |
|
|
|
<el-form ref="form_obj" :model="formobj" class="formadd"> |
|
|
|
<el-row style="border-top: 1px solid #E0E3EB"> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item> |
|
|
|
<span>选择采购渠道</span> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item> |
|
|
|
<el-select v-model="formobj.purchaseOrderTypeValue" placeholder="请选择" filterable clearable @change="changePurchaseOrderType"> |
|
|
|
<el-option v-for="item in purchaseOrderType_list" :disabled="item.dictValue == '挂车'" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="primary" @click="handleConfirm">确定</el-button> |
|
|
|
<el-button @click="handleQuXiao">取消</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
<el-dialog title="" :visible.sync="centerDialogVisible" width="78%" height="1%" :before-close="closeIt" center> |
|
|
|
<iframe frameborder="0" id="iframe" style="width:100%;" scrolling="no" :src="this.centerDialogVisible === true ? url :''"></iframe> |
|
|
|
</el-dialog> |
|
|
@ -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) |
|
|
|