前端修改

This commit is contained in:
zhouzy062 2024-04-10 17:19:06 +08:00
parent eff89495bd
commit c69a2e9f5e
2 changed files with 5 additions and 344 deletions

View File

@ -721,7 +721,7 @@
this.dateRange = []
// this.resetForm("queryForm");
this.$refs.queryForm.resetFields()
this.initSelectData()45
this.initSelectData()
this.handleQuery()
},

View File

@ -196,152 +196,7 @@
:priKey="priKey"
></dialogForm>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="typeList">
<el-table-column
label="序号"
sortable
align="center"
type="index"
/>
<el-table-column
label="退料单号"
align="center"
prop="code"
:show-overflow-tooltip="true"
/>
<el-table-column
label="退料单位"
align="center"
prop="unitName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="退料工程"
align="center"
prop="lotName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="退料机具"
align="center"
prop="typeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="退料人员"
align="center"
prop="backPerson"
:show-overflow-tooltip="true"
/>
<el-table-column
label="联系电话"
align="center"
prop="phone"
:show-overflow-tooltip="true"
/>
<el-table-column
label="申请时间"
align="center"
prop="backTime"
:show-overflow-tooltip="true"
/>
<el-table-column
label="协议号"
align="center"
prop="agreementCode"
:show-overflow-tooltip="true"
/>
<el-table-column
label="退料状态"
align="center"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
<!-- 状态 37-待审核 38-已审核 -->
<el-button type="text" v-if="scope.row.taskStatus == '37'">
待审核
</el-button>
<el-button
type="text"
style="color: #67c23a"
v-if="scope.row.taskStatus == '38'"
>
已审核
</el-button>
<el-button type="text" v-if="scope.row.taskStatus == '39'">
退料核查
</el-button>
<el-button
type="text"
style="color: #67c23a"
v-if="scope.row.taskStatus == '40'"
>
退料完成
</el-button>
<el-button
type="text"
style="color: #67c23a"
v-if="scope.row.taskStatus == '101'"
>
退料驳回
</el-button>
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="250"
>
<template slot-scope="scope">
<el-button
size="mini"
plain
icon="el-icon-zoom-in"
@click="handleSee(scope.row, 'see')"
>
查看
</el-button>
<el-button
size="mini"
type="warning"
@click="handleReturn(scope.row, 'see')"
>
退料
</el-button>
<el-button
size="mini"
type="primary"
@click="handlePrint(scope.row)"
>
退料单
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 退料单 -->
<dialogForm
:dialogTitle="title"
:isShowFlag.sync="isShowOneFlag"
:rowObj="rowObj"
:priKey="priKey"
></dialogForm>
</div>
</template>
@ -539,202 +394,8 @@
}, `退料接收_${new Date().getTime()}.xlsx`)
},
<script>
import {
getBackAuditList,
getViewByExamine,
ApiBackApplyAudit,
ApiBackApplyRefuse,
getBackReceiveList,
} from '@/api/claimAndRefund/return.js'
import { getInfo } from '@/api/login'
import {
getUnitData,
getProData,
getAgreementInfoById,
} from '@/api/claimAndRefund/receive.js'
import dialogForm from './dialogFormExame.vue'
export default {
// name: "ReturnExamine",
components: { dialogForm },
data() {
return {
type: '',
isShowOneFlag: false, //退
priKey: '',
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
typeList: [],
//
title: '',
//
open: false,
//
dateRange: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
keyWord: '', //
unitId: '', //id
lotId: '', //id
taskStatus: '', //
typeId: '', //
time: '',
agreementCode: '', //
startTime: '',
endTime: '',
},
companyId: '',
deptOptions: [],
unitList: [],
proList: [],
taskStatusList: [
{
name: '待审核',
id: '37',
},
{
name: '已审核',
id: '38',
},
],
rowObj: {},
}
},
created() {
this.initSelectData()
this.InitIGetInfo()
},
methods: {
InitIGetInfo() {
getInfo().then((res) => {
this.companyId = res.user.companyId
this.getList()
})
},
//
handleNodeClick(ev) {},
//
initSelectData() {
this.GetUnitData()
this.GetProData()
},
//
async GetUnitData() {
const params = {}
const res = await getUnitData(params)
this.unitList = res.data
console.log('GetUnitData ======================', res)
},
//
async GetProData() {
const params = {
id: this.queryParams.unitId,
}
const res = await getProData(params)
this.proList = res.data
console.log('GetProData ======================', res)
},
//
async InitGetAgreementInfoById() {
const { unitId, proId } = this.queryParams
if (!unitId || !proId) {
return
}
const params = {
unitId: unitId,
projectId: proId,
}
const res = await getAgreementInfoById(params)
// this.proList = res.data
console.log('getAgreementInfoById ======================', res)
this.queryParams.agreementCode = res.data.agreementCode
},
getAgreementByProId() {
this.InitGetAgreementInfoById()
},
getAgreementByUnit() {
this.GetProData()
},
/** 查询列表 startTime,结束日期endTime */
async getList() {
// this.loading = true;
this.queryParams.startTime = this.dateRange[0]
this.queryParams.endTime = this.dateRange[1]
try {
let params = {
flag: 1,
companyId: this.companyId,
...this.queryParams,
}
console.log('paramsparamsparams', params)
const res = await getBackReceiveList(params)
this.typeList = res.data.rows
this.total = res.data.total
this.loading = false
} catch (error) {}
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = []
// this.resetForm("queryForm");
this.$refs.queryForm.resetFields()
this.initSelectData()
this.handleQuery()
},
//退
handlePrint(row) {
// this.title = "退";
this.isShowOneFlag = true
this.rowObj = row
},
//
handleSee(row) {
this.$tab.closeOpenPage({
path: '/claimAndRefund/returnInDetail',
query: {
Id: row.id,
isView: true,
},
})
},
//退
handleReturn(row) {
this.$tab.closeOpenPage({
path: '/claimAndRefund/returnInDetail',
query: {
Id: row.id,
taskId: row.taskId,
},
})
},
/** 导出按钮操作 */
handleExport() {
// this.download('material/backApply/exportExamine', {
// ...this.queryParams
// }, `退_${new Date().getTime()}.xlsx`)
},
},
}
}}
</script>
<style lang="scss" scoped>
.submit_box {