Merge branch 'material-ui' of http://192.168.30.2:3000/bonus/bonus-ui into material-ui

This commit is contained in:
hongchao 2025-11-10 16:22:48 +08:00
commit ebd757e6f9
4 changed files with 85 additions and 36 deletions

View File

@ -33,6 +33,7 @@
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
<el-button type="success" icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button> <el-button type="success" icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -152,18 +153,22 @@
style="width: 100%" style="width: 100%"
/> />
</el-form-item> </el-form-item>
<el-form-item label="领料单号" prop="code"> <el-form-item label="领料单号" prop="codeList">
<el-select <el-select
v-model="form.code" v-model="form.codeList"
placeholder="请选择领料单号" placeholder="请选择领料单号"
style="width: 100%" style="width: 100%"
clearable clearable
filterable filterable
multiple
:filter-method="filterCodeList" :filter-method="filterCodeList"
> >
<el-option v-for="(item, index) in codeList" :key="index" :label="item.code" :value="item.code" /> <el-option v-for="(item, index) in codeList" :key="index" :label="item.code" :value="item.code" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="备注:" prop="remark">
<el-input v-model="form.remark" type="textarea" maxlength="999" placeholder="请输入备注" style="width: 100%" clearable />
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button <el-button
@ -182,11 +187,26 @@ import {getExitPermitList, addExitPermit, getCodeListApi} from '@/api/materialsS
import chapter from "@/utils/chapter"; import chapter from "@/utils/chapter";
import vueEasyPrint from 'vue-easy-print' import vueEasyPrint from 'vue-easy-print'
import printJS from 'print-js' import printJS from 'print-js'
import { formatTime } from '@/utils/bonus'
export default { export default {
components: { vueEasyPrint }, components: { vueEasyPrint },
name: 'IdCardUploadComponent', name: 'IdCardUploadComponent',
data() { data() {
const validateCodeList = (rule, value, callback) => {
if ((!value || value.length === 0) && !this.form.remark) {
callback(new Error('领料单号和备注至少填写一个'))
} else {
callback()
}
}
const validateRemark = (rule, value, callback) => {
if (!value && (!this.form.codeList || this.form.codeList.length === 0)) {
callback(new Error('备注和领料单号至少填写一个'))
} else {
callback()
}
}
return { return {
// //
single: true, single: true,
@ -226,8 +246,10 @@ export default {
name: '', name: '',
material: '', material: '',
carCode: '', carCode: '',
//
addDate: '', addDate: '',
code: '' codeList: '',
remark: '',
}, },
// //
rules: { rules: {
@ -240,9 +262,8 @@ export default {
addDate: [ addDate: [
{ required: true, message: "日期不能为空", trigger: "change" } { required: true, message: "日期不能为空", trigger: "change" }
], ],
code: [ codeList: [{ validator: validateCodeList, trigger: 'change' }],
{ required: true, message: "领料单号不能为空", trigger: "change" } remark: [{ validator: validateRemark, trigger: 'blur' }]
]
}, },
codeList: [], codeList: [],
fullCodeList: [], fullCodeList: [],
@ -273,6 +294,10 @@ export default {
handleAdd() { handleAdd() {
this.resetForm(); this.resetForm();
this.open = true; this.open = true;
this.form.addDate = new Date().toLocaleDateString('zh-CN')
this.$nextTick(() => {
this.$refs.form.clearValidate()
})
this.getCodeList() this.getCodeList()
}, },
@ -297,6 +322,7 @@ export default {
// //
submitForm() { submitForm() {
console.log('🚀 ~ this.form:', this.form)
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
this.isLoading = true; this.isLoading = true;
@ -433,7 +459,16 @@ export default {
.slice(0, 200) .slice(0, 200)
}, 500) }, 500)
} },
handleExport() {
const currentTime = formatTime(new Date())
this.download(
'/material/back_apply_info/exportExitPermitList',
{ ...this.queryParams },
`出门证_${currentTime}.xlsx`
)
},
} }
} }
</script> </script>

View File

@ -91,6 +91,11 @@
<el-table-column label="状态" align="center" prop="taskStatusName" :show-overflow-tooltip="true" width="80"> <el-table-column label="状态" align="center" prop="taskStatusName" :show-overflow-tooltip="true" width="80">
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center" width="100" prop="remark" :show-overflow-tooltip="true"/> <el-table-column label="备注" align="center" width="100" prop="remark" :show-overflow-tooltip="true"/>
<el-table-column label="是否授权" align="center" width="100" prop="remark" :show-overflow-tooltip="true">
<template slot-scope="{ row }">
<span>{{ row.isAuth == '0' ? '已授权' : '-' }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="300" fixed="right"> <el-table-column label="操作" align="center" width="300" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" style="margin-bottom: 10px" type="normal" <el-button size="mini" style="margin-bottom: 10px" type="normal"
@ -104,9 +109,12 @@
v-if="scope.row.taskStatusName == '未完成'" v-if="scope.row.taskStatusName == '未完成'"
@click="handleStop(scope.row)" @click="handleStop(scope.row)"
>终止</el-button> >终止</el-button>
<el-button size="mini" type="warning" <el-button v-if="scope.row.isAuth != '0'" size="mini" type="warning" @click="handleLld(scope.row)">
@click="handleLld(scope.row)" 业务联单
>业务联单</el-button> </el-button>
<el-button v-if="scope.row.isAuth == '0'" size="mini" type="warning" @click="handleAuthorization(scope.row)">
项目部授权委托书
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -515,6 +523,10 @@ export default {
loading.close() loading.close()
} }
}, },
handleAuthorization (row) {
//
window.open(row.fileUrl, '_blank')
},
// 2021-09-01 20210901 // 2021-09-01 20210901
handleTimeFormat(time) { handleTimeFormat(time) {
if (time) { if (time) {

View File

@ -135,7 +135,7 @@
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> --> /> -->
<el-table-column label="协议号" align="center" prop="agreementCode" width="140px" /> <el-table-column label="协议号" align="center" prop="agreementCode" width="140px" />
<el-table-column label="租赁申请单号" align="center" prop="code" width="140px"></el-table-column> <el-table-column label="领料单号" align="center" prop="code" width="140px"></el-table-column>
<el-table-column label="业务联系单号" align="center" prop="businessCode" width="140px"></el-table-column> <el-table-column label="业务联系单号" align="center" prop="businessCode" width="140px"></el-table-column>
<el-table-column label="申请数量" align="center" prop="preCountNum"></el-table-column> <el-table-column label="申请数量" align="center" prop="preCountNum"></el-table-column>

View File

@ -78,7 +78,7 @@
<!-- <el-table-column label="租赁期限(天)" align="center" prop="leaseDay" width="100"/>--> <!-- <el-table-column label="租赁期限(天)" align="center" prop="leaseDay" width="100"/>-->
<el-table-column label="授权人" align="center" prop="authPerson" width="100" /> <el-table-column label="授权人" align="center" prop="authPerson" width="100" />
<el-table-column label="授权人电话" align="center" prop="phone" width="120" /> <el-table-column label="授权人电话" align="center" prop="phone" width="120" />
<el-table-column label="分部工程" align="center" prop="branchProIdsStr" width="150"/> <!-- <el-table-column label="分部工程" align="center" prop="branchProIdsStr" width="150"/>-->
<el-table-column label="租赁单位类型" align="center" width="100"> <el-table-column label="租赁单位类型" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.protocol == '1'">内部单位</span> <span v-if="scope.row.protocol == '1'">内部单位</span>
@ -217,28 +217,26 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <!-- <el-col :span="12">-->
<el-form-item label="分部工程" prop="remark"> <!-- <el-form-item label="分部工程" prop="remark">-->
<el-select <!-- <el-select-->
clearable <!-- clearable-->
multiple <!-- multiple-->
filterable <!-- filterable-->
style="width: 100%" <!-- style="width: 100%"-->
placeholder="请选择分部工程" <!-- placeholder="请选择分部工程"-->
v-model="form.branchProIds" <!-- v-model="form.branchProIds"-->
> <!-- >-->
<el-option <!-- <el-option-->
:key="dict.value" <!-- :key="dict.value"-->
:label="dict.label" <!-- :label="dict.label"-->
:value="dict.value * 1" <!-- :value="dict.value * 1"-->
v-for="dict in dict.type.branch_project" <!-- v-for="dict in dict.type.branch_project"-->
/> <!-- />-->
</el-select> <!-- </el-select>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
</el-row>
<el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="所属项目部" prop="projectUnitId"> <el-form-item label="所属项目部" prop="projectUnitId">
<treeselect <treeselect
@ -258,6 +256,10 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input <el-input
@ -360,9 +362,9 @@
<el-descriptions-item label="租赁单位类型"> <el-descriptions-item label="租赁单位类型">
{{ form.protocol === '1' ? '内部单位' : '外部单位' }} {{ form.protocol === '1' ? '内部单位' : '外部单位' }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="分部工程"> <!-- <el-descriptions-item label="分部工程">-->
{{ form.branchProIdsStr }} <!-- {{ form.branchProIdsStr }}-->
</el-descriptions-item> <!-- </el-descriptions-item>-->
<el-descriptions-item label="备注"> <el-descriptions-item label="备注">
{{ form.remark }} {{ form.remark }}
</el-descriptions-item> </el-descriptions-item>