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

This commit is contained in:
hongchao 2025-02-10 16:46:34 +08:00
commit e80328a159
3 changed files with 71 additions and 62 deletions

View File

@ -84,7 +84,7 @@
v-model="maForm.phone" v-model="maForm.phone"
placeholder="请输入联系电话" placeholder="请输入联系电话"
clearable clearable
maxlength="50" maxlength="11"
style="width: 240px" style="width: 240px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
@ -154,13 +154,14 @@
rows="2" rows="2"
/> />
</el-form-item> </el-form-item>
<el-form-item label="委托书" prop="fileFbs" v-if="isFileFbs"> <el-form-item label="委托书" prop="bmFileInfos" v-if="isFileFbs">
<el-upload <el-upload
action="#" :action="uploadUrl"
:file-list="businessLicenseListTemp" :file-list="maForm.bmFileInfos"
:show-file-list="true" :show-file-list="true"
:auto-upload="false" :auto-upload="true"
:key="uploadKey" :key="uploadKey"
:limit="5"
list-type="picture-card" list-type="picture-card"
accept=".png, .jpg, .jpeg, .pdf" accept=".png, .jpg, .jpeg, .pdf"
:on-change="handleChangeBusinessList" :on-change="handleChangeBusinessList"
@ -234,7 +235,7 @@
<el-input <el-input
v-model.number="scope.row.preNum" v-model.number="scope.row.preNum"
controls-position="right" type="number" controls-position="right" type="number"
style="width: 100%" :disabled="scope.row.alNum&&scope.row.alNum!=0" style="width: 100%" :disabled="scope.row.alNum && scope.row.alNum != 0 ? true : false"
:min="0" @input="(v)=>(scope.row.unitValue==1?scope.row.preNum=Number(v.replace(/[^\d.]/g,'')) : scope.row.preNum=Number(v.replace(/[^\d]/g,'')))" :min="0" @input="(v)=>(scope.row.unitValue==1?scope.row.preNum=Number(v.replace(/[^\d.]/g,'')) : scope.row.preNum=Number(v.replace(/[^\d]/g,'')))"
></el-input> ></el-input>
</template> </template>
@ -374,6 +375,7 @@ export default {
purchaser: "", purchaser: "",
remark: "", remark: "",
purchaseNumber: "", purchaseNumber: "",
bmFileInfos: [],
}, },
// //
form: {}, form: {},
@ -412,7 +414,7 @@ export default {
trigger: "blur", trigger: "blur",
}, },
], ],
fileFbs: [ bmFileInfos: [
{ {
required: false,//() required: false,//()
message: '请上传委托书', message: '请上传委托书',
@ -456,7 +458,6 @@ export default {
// //
isFileFbs:false, isFileFbs:false,
businessLicenseListTemp: [],
urlTemp: '', urlTemp: '',
delBusinessFileIdList: [], delBusinessFileIdList: [],
// //
@ -464,18 +465,19 @@ export default {
dialogVisible: false, dialogVisible: false,
uploadKey: Date.now(), uploadKey: Date.now(),
// //
upload: { // upload: {
// // //
headers: {Authorization: 'Bearer ' + getToken()}, // headers: {Authorization: 'Bearer ' + getToken()},
// // //
url: process.env.VUE_APP_BASE_API + '/file/upload' // url: process.env.VUE_APP_BASE_API + '/file/upload'
}, // },
uploadUrl: process.env.VUE_APP_BASE_API + "/file/upload", //
}; };
}, },
computed: { computed: {
//1 //1
uploadDisabled() { uploadDisabled() {
return this.businessLicenseListTemp.length > 4 return this.maForm.bmFileInfos && this.maForm.bmFileInfos.length == 5
}, },
pickerOptions() { pickerOptions() {
return { return {
@ -521,10 +523,10 @@ export default {
// } // }
if(val.typeKey=='fbs'){ if(val.typeKey=='fbs'){
this.isFileFbs=true; this.isFileFbs=true;
this.rules['fileFbs'][0].required=true; this.rules['bmFileInfos'][0].required=true;
}else{ }else{
this.isFileFbs=false; this.isFileFbs=false;
this.rules['fileFbs'][0].required=false; this.rules['bmFileInfos'][0].required=false;
} }
setTimeout(()=>{ setTimeout(()=>{
getListProject({ unitId: this.maForm.unitId }).then((response) => { getListProject({ unitId: this.maForm.unitId }).then((response) => {
@ -685,6 +687,10 @@ export default {
this.maForm.projectId this.maForm.projectId
); );
this.equipmentList = response.data.leaseApplyDetailsList; this.equipmentList = response.data.leaseApplyDetailsList;
// bmFileInfos
if (this.maForm.bmFileInfos.length > 0) {
this.isFileFbs = true
}
// this.loading = false; // this.loading = false;
}); });
// await this.projectInfoList(); // await this.projectInfoList();
@ -725,10 +731,10 @@ export default {
// console.log(this.equipmentList) // console.log(this.equipmentList)
console.log("maForm", this.maForm); console.log("maForm", this.maForm);
if (this.equipmentList.length > 0) { if (this.equipmentList.length > 0) {
if(this.businessLicenseListTemp.length > 0){ // if(this.bmFileInfos.length > 0){
console.log(33333333333333333333333333333333333) // console.log(33333333333333333333333333333333333)
this.$refs["maForm"].clearValidate('fileFbs'); // this.$refs["maForm"].clearValidate('bmFileInfos');
} // }
this.$refs["maForm"].validate(async (valid) => { this.$refs["maForm"].validate(async (valid) => {
if (valid) { if (valid) {
for(let i = 0;i<this.equipmentList.length;i++){ for(let i = 0;i<this.equipmentList.length;i++){
@ -986,18 +992,21 @@ export default {
} }
}); });
this.businessLicenseListTemp = fileList; this.maForm.bmFileInfos = fileList;
// // businessLicenseListTemp fileFbs console.log('🚀 ~ handleChangeBusinessList ~ this.bmFileInfos:', this.bmFileInfos)
// if (this.businessLicenseListTemp.length > 0) { //
// // this.maForm.fileFbs = fileList.map(item => item.raw); // ; this.$refs.maForm.validateField('bmFileInfos');
// // bmFileInfos bmFileInfos
// if (this.bmFileInfos.length > 0) {
// // this.maForm.bmFileInfos = fileList.map(item => item.raw); // ;
// // // //
// console.log('222222222222222') // console.log('222222222222222')
// this.$refs.maForm.clearValidate('fileFbs'); // this.$refs.maForm.clearValidate('bmFileInfos');
// } else { // } else {
// // maForm.fileFbs = false; // // maForm.bmFileInfos = false;
// console.log('33333333') // console.log('33333333')
// // // //
// this.$refs.maForm.validateField('fileFbs'); // this.$refs.maForm.validateField('bmFileInfos');
// } // }
console.log('4444444444') console.log('4444444444')
@ -1049,12 +1058,12 @@ export default {
//- //-
handleRemoveElectricianImgList(file, fileList) { handleRemoveElectricianImgList(file, fileList) {
let sum = 0 let sum = 0
this.businessLicenseListTemp.forEach((item, index) => { this.maForm.bmFileInfos.forEach((item, index) => {
if (item.uid == file.uid) { if (item.uid == file.uid) {
sum = index sum = index
} }
}) })
this.businessLicenseListTemp.splice(sum, 1) this.maForm.bmFileInfos.splice(sum, 1)
if (file.status == 'success') { if (file.status == 'success') {
this.delBusinessFileIdList.push(file.url); this.delBusinessFileIdList.push(file.url);
} }

View File

@ -17,13 +17,13 @@
placeholder="请输入领料单号" placeholder="请输入领料单号"
clearable clearable
maxlength="50" maxlength="50"
style="width: 240px" style="width: 240px"
disabled disabled
/> />
</el-form-item> </el-form-item>
<el-form-item label="备注:" prop="remark"> <el-form-item label="备注:" prop="remark">
<el-input <el-input
v-model="maForm.remark" v-model="maForm.remark"
clearable clearable
maxlength="200" maxlength="200"
style="width: 240px" style="width: 240px"
@ -61,8 +61,8 @@
<el-table-column label="序号" align="center" type="index" /> <el-table-column label="序号" align="center" type="index" />
<el-table-column label="配件类型" align="center" prop="partType" :show-overflow-tooltip="true"/> <el-table-column label="配件类型" align="center" prop="partType" :show-overflow-tooltip="true"/>
<el-table-column label="配件名称" align="center" prop="partName" :show-overflow-tooltip="true"></el-table-column> <el-table-column label="配件名称" align="center" prop="partName" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="规格型号" align="center" prop="partModel" :show-overflow-tooltip="true"/> <el-table-column label="规格型号" align="center" prop="partModel" :show-overflow-tooltip="true"/>
<el-table-column label="预领数量" align="center" prop="preNum" :show-overflow-tooltip="true"></el-table-column> <el-table-column label="预领数量" align="center" prop="preNum" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="审核状态" align="center" prop="status" :show-overflow-tooltip="true"> <el-table-column label="审核状态" align="center" prop="status" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.status == '0'" style="color: #e6a23c"> <div v-if="scope.row.status == '0'" style="color: #e6a23c">
@ -109,7 +109,7 @@
</div> </div>
</template> </template>
<script> <script>
import { import {
getPartLeaseByTaskIdApi,auditApi getPartLeaseByTaskIdApi,auditApi
} from "@/api/part/partLease"; } from "@/api/part/partLease";
@ -219,7 +219,7 @@ export default {
}); });
}, },
// //
handlePass(row) { handlePass(row) {
let param={ let param={
taskId:this.taskId, taskId:this.taskId,
taskStatus:1, taskStatus:1,

View File

@ -27,7 +27,7 @@
:show-count="true" style="width: 240px" :disable-branch-nodes="true" :show-count="true" style="width: 240px" :disable-branch-nodes="true"
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果" noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果"
placeholder="请选择往来单位" @select="unitChange" placeholder="请选择往来单位" @select="unitChange"
/> />
<!-- <el-cascader v-model="unitId" <!-- <el-cascader v-model="unitId"
:show-all-levels="false" :show-all-levels="false"
:options="unitList" :options="unitList"
@ -103,16 +103,16 @@
size="mini" size="mini"
@click="handleExport" @click="handleExport"
>导出</el-button >导出</el-button
> >
</el-form-item> </el-form-item>
</el-form> </el-form>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
<el-table v-loading="loading" :data="tableList" border> <el-table v-loading="loading" :data="tableList" border>
<el-table-column label="序号" align="center" width="80" type="index"> <el-table-column label="序号" align="center" width="80" type="index">
<template scope="scope"> <template scope="scope">
<span>{{ (queryParams.pageNum - 1) * 10 + scope.$index+1 }}</span> <span>{{ (queryParams.pageNum - 1) * 10 + scope.$index+1 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="协议号" align="center" prop="agreementCode" :show-overflow-tooltip="true"/> <el-table-column label="协议号" align="center" prop="agreementCode" :show-overflow-tooltip="true"/>
<el-table-column label="工程名称" align="center" prop="proName" :show-overflow-tooltip="true"/> <el-table-column label="工程名称" align="center" prop="proName" :show-overflow-tooltip="true"/>
<el-table-column label="往来单位" align="center" prop="unitName" :show-overflow-tooltip="true"/> <el-table-column label="往来单位" align="center" prop="unitName" :show-overflow-tooltip="true"/>
@ -120,14 +120,14 @@
<el-table-column label="合同主体" align="center" prop="contractPart" width="150px" :show-overflow-tooltip="true"/> <el-table-column label="合同主体" align="center" prop="contractPart" width="150px" :show-overflow-tooltip="true"/>
<el-table-column label="物资名称" align="center" prop="typeName" :show-overflow-tooltip="true"/> <el-table-column label="物资名称" align="center" prop="typeName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true"/> <el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true"/>
<el-table-column label="计量单位" align="center" prop="unit" :show-overflow-tooltip="true"/> <el-table-column label="计量单位" align="center" prop="unit" :show-overflow-tooltip="true"/>
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true"/> <el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true"/>
<el-table-column label="领用人员" align="center" prop="leaseMan" :show-overflow-tooltip="true"></el-table-column> <el-table-column label="领用人员" align="center" prop="leaseMan" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="领用时间" align="center" prop="leaseDate" :show-overflow-tooltip="true"></el-table-column> <el-table-column label="领用时间" align="center" prop="leaseDate" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="退料人员" align="center" prop="backMan" :show-overflow-tooltip="true"></el-table-column> <el-table-column label="退料人员" align="center" prop="backMan" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="退料时间" align="center" prop="backDate" :show-overflow-tooltip="true"></el-table-column> <el-table-column label="退料时间" align="center" prop="backDate" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="当前状态" align="center" prop="statusName" :show-overflow-tooltip="true"/> <el-table-column label="当前状态" align="center" prop="statusName" :show-overflow-tooltip="true"/>
</el-table> </el-table>
<pagination <pagination
v-show="total > 0" v-show="total > 0"
:total="total" :total="total"
@ -135,7 +135,7 @@
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
:page-sizes="[5, 10, 15, 20, 30]" :page-sizes="[5, 10, 15, 20, 30]"
@pagination="getList" @pagination="getList"
/> />
</div> </div>
</template> </template>
@ -143,9 +143,9 @@
import { import {
getMachineHistoryRecordListApi getMachineHistoryRecordListApi
} from '@/api/stquery/stquery'; } from '@/api/stquery/stquery';
import { import {
getProjectList, getProjectList,
getUnitList, getUnitList,
} from '@/api/back/index.js' } from '@/api/back/index.js'
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@ -178,11 +178,11 @@ export default {
projectId: null, projectId: null,
unitList: [], unitList: [],
proList: [], proList: [],
statusList:[{id:'在用',name:'在用'},{id:'在退',name:'在退'}], statusList:[{id:'在用',name:'在用'},{id:'已退',name:'已退'}],
// //
total: 0, total: 0,
// //
tableList: [], tableList: [],
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -191,9 +191,9 @@ export default {
unitId: null, unitId: null,
proId: null, proId: null,
keyWord: null, keyWord: null,
typeName: null, // typeName: null, //
statusName: null // statusName: null //
}, },
} }
}, },
created() { created() {
@ -215,7 +215,7 @@ export default {
label: node.name, label: node.name,
children: node.children, children: node.children,
}; };
}, },
// //
async GetUnitData() { async GetUnitData() {
const params = { const params = {
@ -233,8 +233,8 @@ export default {
// this.GetProData() // this.GetProData()
setTimeout(()=>{ setTimeout(()=>{
this.GetProData() this.GetProData()
},500) },500)
}, },
// //
async GetProData() { async GetProData() {
const params = { unitId: this.queryParams.unitId} const params = { unitId: this.queryParams.unitId}
@ -281,15 +281,15 @@ export default {
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1 this.queryParams.pageNum = 1
this.getList() this.getList()
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.queryParams.time=[] this.queryParams.time=[]
this.unitId=[] this.unitId=[]
this.projectId=[] this.projectId=[]
this.resetForm('queryForm') this.resetForm('queryForm')
this.handleQuery() this.handleQuery()
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download( this.download(
@ -299,7 +299,7 @@ export default {
}, },
`综合查询_设备使用追溯_${new Date().getTime()}.xlsx`, `综合查询_设备使用追溯_${new Date().getTime()}.xlsx`,
) )
}, },
}, },
} }