Merge branch 'material-ui' of http://192.168.0.75:3000/bonus/bonus-ui into material-ui
This commit is contained in:
commit
e80328a159
|
|
@ -84,7 +84,7 @@
|
|||
v-model="maForm.phone"
|
||||
placeholder="请输入联系电话"
|
||||
clearable
|
||||
maxlength="50"
|
||||
maxlength="11"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
|
@ -154,13 +154,14 @@
|
|||
rows="2"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="委托书" prop="fileFbs" v-if="isFileFbs">
|
||||
<el-form-item label="委托书" prop="bmFileInfos" v-if="isFileFbs">
|
||||
<el-upload
|
||||
action="#"
|
||||
:file-list="businessLicenseListTemp"
|
||||
:action="uploadUrl"
|
||||
:file-list="maForm.bmFileInfos"
|
||||
:show-file-list="true"
|
||||
:auto-upload="false"
|
||||
:auto-upload="true"
|
||||
:key="uploadKey"
|
||||
:limit="5"
|
||||
list-type="picture-card"
|
||||
accept=".png, .jpg, .jpeg, .pdf"
|
||||
:on-change="handleChangeBusinessList"
|
||||
|
|
@ -234,7 +235,7 @@
|
|||
<el-input
|
||||
v-model.number="scope.row.preNum"
|
||||
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,'')))"
|
||||
></el-input>
|
||||
</template>
|
||||
|
|
@ -374,6 +375,7 @@ export default {
|
|||
purchaser: "",
|
||||
remark: "",
|
||||
purchaseNumber: "",
|
||||
bmFileInfos: [],
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
@ -412,7 +414,7 @@ export default {
|
|||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
fileFbs: [
|
||||
bmFileInfos: [
|
||||
{
|
||||
required: false,//是否分包商(是:合同编号必填)
|
||||
message: '请上传委托书',
|
||||
|
|
@ -456,7 +458,6 @@ export default {
|
|||
|
||||
//是否是分包商
|
||||
isFileFbs:false,
|
||||
businessLicenseListTemp: [],
|
||||
urlTemp: '',
|
||||
delBusinessFileIdList: [],
|
||||
//图片查看弹窗
|
||||
|
|
@ -464,18 +465,19 @@ export default {
|
|||
dialogVisible: false,
|
||||
uploadKey: Date.now(),
|
||||
//上传
|
||||
upload: {
|
||||
// 设置上传的请求头部
|
||||
headers: {Authorization: 'Bearer ' + getToken()},
|
||||
// 上传的地址
|
||||
url: process.env.VUE_APP_BASE_API + '/file/upload'
|
||||
},
|
||||
// upload: {
|
||||
// // 设置上传的请求头部
|
||||
// headers: {Authorization: 'Bearer ' + getToken()},
|
||||
// // 上传的地址
|
||||
// url: process.env.VUE_APP_BASE_API + '/file/upload'
|
||||
// },
|
||||
uploadUrl: process.env.VUE_APP_BASE_API + "/file/upload", // 上传的图片服务器地址
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
//图片上传1张后,隐藏上传框
|
||||
uploadDisabled() {
|
||||
return this.businessLicenseListTemp.length > 4
|
||||
return this.maForm.bmFileInfos && this.maForm.bmFileInfos.length == 5
|
||||
},
|
||||
pickerOptions() {
|
||||
return {
|
||||
|
|
@ -521,10 +523,10 @@ export default {
|
|||
// }
|
||||
if(val.typeKey=='fbs'){
|
||||
this.isFileFbs=true;
|
||||
this.rules['fileFbs'][0].required=true;
|
||||
this.rules['bmFileInfos'][0].required=true;
|
||||
}else{
|
||||
this.isFileFbs=false;
|
||||
this.rules['fileFbs'][0].required=false;
|
||||
this.rules['bmFileInfos'][0].required=false;
|
||||
}
|
||||
setTimeout(()=>{
|
||||
getListProject({ unitId: this.maForm.unitId }).then((response) => {
|
||||
|
|
@ -685,6 +687,10 @@ export default {
|
|||
this.maForm.projectId
|
||||
);
|
||||
this.equipmentList = response.data.leaseApplyDetailsList;
|
||||
// 如果 bmFileInfos有值
|
||||
if (this.maForm.bmFileInfos.length > 0) {
|
||||
this.isFileFbs = true
|
||||
}
|
||||
// this.loading = false;
|
||||
});
|
||||
// await this.projectInfoList();
|
||||
|
|
@ -725,10 +731,10 @@ export default {
|
|||
// console.log(this.equipmentList)
|
||||
console.log("maForm", this.maForm);
|
||||
if (this.equipmentList.length > 0) {
|
||||
if(this.businessLicenseListTemp.length > 0){
|
||||
console.log(33333333333333333333333333333333333)
|
||||
this.$refs["maForm"].clearValidate('fileFbs');
|
||||
}
|
||||
// if(this.bmFileInfos.length > 0){
|
||||
// console.log(33333333333333333333333333333333333)
|
||||
// this.$refs["maForm"].clearValidate('bmFileInfos');
|
||||
// }
|
||||
this.$refs["maForm"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
for(let i = 0;i<this.equipmentList.length;i++){
|
||||
|
|
@ -986,18 +992,21 @@ export default {
|
|||
|
||||
}
|
||||
});
|
||||
this.businessLicenseListTemp = fileList;
|
||||
// // 根据 businessLicenseListTemp 是否有值来控制 fileFbs 的验证
|
||||
// if (this.businessLicenseListTemp.length > 0) {
|
||||
// // this.maForm.fileFbs = fileList.map(item => item.raw); // 假设需要上传文件对象;
|
||||
this.maForm.bmFileInfos = fileList;
|
||||
console.log('🚀 ~ handleChangeBusinessList ~ this.bmFileInfos:', this.bmFileInfos)
|
||||
// 手动触发表单验证
|
||||
this.$refs.maForm.validateField('bmFileInfos');
|
||||
// // 根据 bmFileInfos 是否有值来控制 bmFileInfos 的验证
|
||||
// if (this.bmFileInfos.length > 0) {
|
||||
// // this.maForm.bmFileInfos = fileList.map(item => item.raw); // 假设需要上传文件对象;
|
||||
// // 有值,手动标记验证通过
|
||||
// console.log('222222222222222')
|
||||
// this.$refs.maForm.clearValidate('fileFbs');
|
||||
// this.$refs.maForm.clearValidate('bmFileInfos');
|
||||
// } else {
|
||||
// // maForm.fileFbs = false;
|
||||
// // maForm.bmFileInfos = false;
|
||||
// console.log('33333333')
|
||||
// // 无值,手动触发验证失败
|
||||
// this.$refs.maForm.validateField('fileFbs');
|
||||
// this.$refs.maForm.validateField('bmFileInfos');
|
||||
// }
|
||||
|
||||
console.log('4444444444')
|
||||
|
|
@ -1049,12 +1058,12 @@ export default {
|
|||
//上传组件-图片删除
|
||||
handleRemoveElectricianImgList(file, fileList) {
|
||||
let sum = 0
|
||||
this.businessLicenseListTemp.forEach((item, index) => {
|
||||
this.maForm.bmFileInfos.forEach((item, index) => {
|
||||
if (item.uid == file.uid) {
|
||||
sum = index
|
||||
}
|
||||
})
|
||||
this.businessLicenseListTemp.splice(sum, 1)
|
||||
this.maForm.bmFileInfos.splice(sum, 1)
|
||||
if (file.status == 'success') {
|
||||
this.delBusinessFileIdList.push(file.url);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,13 +17,13 @@
|
|||
placeholder="请输入领料单号"
|
||||
clearable
|
||||
maxlength="50"
|
||||
style="width: 240px"
|
||||
style="width: 240px"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注:" prop="remark">
|
||||
<el-input
|
||||
v-model="maForm.remark"
|
||||
v-model="maForm.remark"
|
||||
clearable
|
||||
maxlength="200"
|
||||
style="width: 240px"
|
||||
|
|
@ -61,8 +61,8 @@
|
|||
<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="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="preNum" :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="preNum" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="审核状态" align="center" prop="status" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.status == '0'" style="color: #e6a23c">
|
||||
|
|
@ -109,7 +109,7 @@
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<script>
|
||||
import {
|
||||
getPartLeaseByTaskIdApi,auditApi
|
||||
} from "@/api/part/partLease";
|
||||
|
|
@ -219,7 +219,7 @@ export default {
|
|||
});
|
||||
},
|
||||
//单个通过
|
||||
handlePass(row) {
|
||||
handlePass(row) {
|
||||
let param={
|
||||
taskId:this.taskId,
|
||||
taskStatus:1,
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
:show-count="true" style="width: 240px" :disable-branch-nodes="true"
|
||||
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果"
|
||||
placeholder="请选择往来单位" @select="unitChange"
|
||||
/>
|
||||
/>
|
||||
<!-- <el-cascader v-model="unitId"
|
||||
:show-all-levels="false"
|
||||
:options="unitList"
|
||||
|
|
@ -103,16 +103,16 @@
|
|||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出</el-button
|
||||
>
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
<el-table v-loading="loading" :data="tableList" border>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
<el-table v-loading="loading" :data="tableList" border>
|
||||
<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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="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="typeName" :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="maCode" :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="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="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="statusName" :show-overflow-tooltip="true"/>
|
||||
</el-table>
|
||||
<el-table-column label="当前状态" align="center" prop="statusName" :show-overflow-tooltip="true"/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
|
|
@ -135,7 +135,7 @@
|
|||
:limit.sync="queryParams.pageSize"
|
||||
:page-sizes="[5, 10, 15, 20, 30]"
|
||||
@pagination="getList"
|
||||
/>
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -143,9 +143,9 @@
|
|||
import {
|
||||
getMachineHistoryRecordListApi
|
||||
} from '@/api/stquery/stquery';
|
||||
import {
|
||||
import {
|
||||
getProjectList,
|
||||
getUnitList,
|
||||
getUnitList,
|
||||
} from '@/api/back/index.js'
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
|
@ -178,11 +178,11 @@ export default {
|
|||
projectId: null,
|
||||
unitList: [],
|
||||
proList: [],
|
||||
statusList:[{id:'在用',name:'在用'},{id:'在退',name:'在退'}],
|
||||
statusList:[{id:'在用',name:'在用'},{id:'已退',name:'已退'}],
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 主表格数据
|
||||
tableList: [],
|
||||
tableList: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
|
|
@ -191,9 +191,9 @@ export default {
|
|||
unitId: null,
|
||||
proId: null,
|
||||
keyWord: null,
|
||||
typeName: null, //物资名称
|
||||
typeName: null, //物资名称
|
||||
statusName: null //状态
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
@ -215,7 +215,7 @@ export default {
|
|||
label: node.name,
|
||||
children: node.children,
|
||||
};
|
||||
},
|
||||
},
|
||||
// 获取 来往单位 列表数据
|
||||
async GetUnitData() {
|
||||
const params = {
|
||||
|
|
@ -233,8 +233,8 @@ export default {
|
|||
// this.GetProData()
|
||||
setTimeout(()=>{
|
||||
this.GetProData()
|
||||
},500)
|
||||
},
|
||||
},500)
|
||||
},
|
||||
// 获取 工程名称 列表数据
|
||||
async GetProData() {
|
||||
const params = { unitId: this.queryParams.unitId}
|
||||
|
|
@ -281,15 +281,15 @@ export default {
|
|||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
resetQuery() {
|
||||
this.queryParams.time=[]
|
||||
this.unitId=[]
|
||||
this.projectId=[]
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
|
|
@ -299,7 +299,7 @@ export default {
|
|||
},
|
||||
`综合查询_设备使用追溯_${new Date().getTime()}.xlsx`,
|
||||
)
|
||||
},
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue