|
@@ -42,12 +42,13 @@
|
|
|
<a-spin :spinning="confirmLoading">
|
|
|
<a-table
|
|
|
bordered
|
|
|
- :row-key="record => record.id"
|
|
|
+ :row-key="record => record.ivouchRowNo"
|
|
|
:columns="subcontractOrderColumns"
|
|
|
:data-source="subcontractOrderData"
|
|
|
- :loading="loading"
|
|
|
+ :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
|
|
:scroll="{x: 1500,y:300 }"
|
|
|
- :pagination="false"
|
|
|
+ :pagination="pagination"
|
|
|
+ @change="handleTableChange"
|
|
|
>
|
|
|
<span slot="operationSlot" slot-scope="text, record,index">
|
|
|
<a @click="handleExportXls(record)" style="color:green;">关联委外</a>
|
|
@@ -107,14 +108,14 @@
|
|
|
{
|
|
|
title: '委外订单号',
|
|
|
width: 120,
|
|
|
- dataIndex: 'CCode',
|
|
|
+ dataIndex: 'ccode',
|
|
|
className: 'replacecolor',
|
|
|
ellipsis: true
|
|
|
},
|
|
|
{
|
|
|
title: '委外订单行号',
|
|
|
width: 140,
|
|
|
- dataIndex: 'IVouchRowNo',
|
|
|
+ dataIndex: 'ivouchRowNo',
|
|
|
className: 'replacecolor',
|
|
|
ellipsis: true
|
|
|
},
|
|
@@ -146,15 +147,11 @@
|
|
|
className: 'replacecolor',
|
|
|
ellipsis: true
|
|
|
},
|
|
|
- {
|
|
|
- title: '操作',
|
|
|
- width: 120,
|
|
|
- dataIndex: 'operation',
|
|
|
- scopedSlots: { customRender: 'operationSlot' },
|
|
|
- className: 'replacecolor',
|
|
|
- ellipsis: true
|
|
|
- },
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ selectedRowKeys:[],
|
|
|
+ selectedRows:[],
|
|
|
+ fatherList:'',
|
|
|
+ pagination:{}
|
|
|
}
|
|
|
},
|
|
|
// 接收父组件 方法
|
|
@@ -167,16 +164,12 @@
|
|
|
//获取数据
|
|
|
getData(){
|
|
|
var that = this;
|
|
|
- // that.spinIsShow = true;
|
|
|
- this.loading = true
|
|
|
+ this.confirmLoading = true
|
|
|
this.$nextTick(() => {
|
|
|
subcontractOrder(this.queryParam).then(res => {
|
|
|
- debugger
|
|
|
- // that.spinIsShow = false;
|
|
|
- this.loading = false
|
|
|
+ this.confirmLoading = false
|
|
|
if (res.success) {
|
|
|
- debugger
|
|
|
- that.manualData = res.result.records;
|
|
|
+ that.subcontractOrderData = res.result.records;
|
|
|
that.pagination = {
|
|
|
total: res.result.total,
|
|
|
current: res.result.current,
|
|
@@ -192,32 +185,48 @@
|
|
|
//查询
|
|
|
searchQuery(){
|
|
|
if(this.queryParam.CCode == '' || !this.queryParam.CCode){
|
|
|
- debugger
|
|
|
this.$message.error('请选择委外订单号')
|
|
|
}else{
|
|
|
- debugger
|
|
|
this.getData()
|
|
|
}
|
|
|
},
|
|
|
//重置
|
|
|
searchReset(){
|
|
|
+ this.subcontractOrderData = []
|
|
|
+ this.queryParam={}
|
|
|
},
|
|
|
//返回
|
|
|
handleCancel(){
|
|
|
-
|
|
|
+ this.close
|
|
|
},
|
|
|
//保存
|
|
|
addSave(){
|
|
|
-
|
|
|
- },
|
|
|
- //删行
|
|
|
- handleDelete(record,index){
|
|
|
-
|
|
|
+ if(this.selectedRowKeys.length == 0){
|
|
|
+ this.$message.error('请勾选数据')
|
|
|
+ }else if(this.selectedRowKeys.length >1){
|
|
|
+ this.$message.error('只可选择一行数据')
|
|
|
+ }else{
|
|
|
+ this.close()
|
|
|
+ this.$emit('close',this.fatherList,this.selectedRows[0])
|
|
|
+ }
|
|
|
},
|
|
|
//关闭弹窗
|
|
|
close(){
|
|
|
-
|
|
|
- }
|
|
|
+ this.subcontractOrderModVis = false
|
|
|
+ this.subcontractOrderData = []
|
|
|
+ this.queryParam={}
|
|
|
+ },
|
|
|
+ //选中行
|
|
|
+ onSelectChange(keys,rows){
|
|
|
+ this.selectedRowKeys = keys;
|
|
|
+ this.selectedRows = rows;
|
|
|
+ },
|
|
|
+ // 分页变化时触发
|
|
|
+ handleTableChange(pagination, filters, sorter) {
|
|
|
+ this.queryParam.pageNo = pagination.current
|
|
|
+ debugger
|
|
|
+ this.getData()
|
|
|
+ },
|
|
|
},
|
|
|
|
|
|
computed: {}
|