Merge remote-tracking branch 'origin/material-ui' into material-ui

This commit is contained in:
syruan 2025-01-08 15:53:20 +08:00
commit 4f3eff18c7
2 changed files with 80 additions and 67 deletions

View File

@ -139,7 +139,7 @@
:options="uniteList" :normalizer="normalizer"
:show-count="true" style="width: 100%;" :disable-branch-nodes="true"
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果"
placeholder="请选择租赁单位"
placeholder="请选择租赁单位" @select="unitSelect"
/>
<!-- <el-cascader
v-model="unitId"
@ -193,7 +193,7 @@
></el-cascader> -->
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系电话" prop="phone">
@ -219,6 +219,18 @@
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开始日期" prop="planStartTime">
<el-date-picker
style="width: 100%"
v-model="form.planStartTime"
value-format="yyyy-MM-dd"
type="date"
placeholder="请选择开始日期"
:disabled="isEdits"
></el-date-picker>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item label="租赁期限(天)" prop="leaseDay">
@ -233,22 +245,16 @@
/>
</el-form-item>
</el-col>-->
</el-row>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="开始日期" prop="planStartTime">
<el-date-picker
style="width: 100%"
v-model="form.planStartTime"
value-format="yyyy-MM-dd"
type="date"
placeholder="请选择开始日期"
:disabled="isEdits"
></el-date-picker>
<el-form-item label="租赁单位类型">
<el-select style="width: 100%;" v-model="form.protocol" placeholder="请选择租赁单位类型" clearable :disabled="isEdits">
<el-option label="内部单位" value="1"></el-option>
<el-option label="外部单位" value="2"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-col>
<el-col :span="12">
<el-form-item label="备注" prop="remark">
<el-input
@ -260,19 +266,7 @@
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="租赁单位类型">
<el-select style="width: 100%;" v-model="form.protocol" placeholder="请选择租赁单位类型" clearable :disabled="isEdits">
<el-option label="内部单位" value="1"></el-option>
<el-option label="外部单位" value="2"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-row>
<el-form-item label="营业执照">
<el-upload
class="upload-demo"
@ -484,33 +478,23 @@ export default {
return {
uploadKey: Date.now(),
//
loading: false,
loadingTwo: false,
loading: false,
loadingTwo: false,
// Id
showName: false,
showName: false,
//
showWarn: false,
showWarn: false,
//
single: true,
//
multiple: true,
multiple: true,
//
dateRange: [],
dateRange: [],
//
showSearch: true,
showHouse: false,
showSee: false,
showAllImg: false,
showAllImg: false,
//
total: 0,
totalTwo: 0,
@ -530,8 +514,7 @@ export default {
maForm: {
unitId: undefined,
projectId: undefined
},
},
//
projectList: [],
//
@ -566,7 +549,8 @@ export default {
form: {
unitId:null,
projectId:null,
},
protocol:'1'
},
//
rules: {
unitId: [
@ -583,7 +567,13 @@ export default {
trigger: "blur",
},
],
contractCode: [
{
required: false,//()
message: '请填写合同编号',
trigger: 'change'
}
],
authPerson: [
{
required: true,
@ -807,7 +797,14 @@ export default {
this.projectList = response.data;
});
},
unitSelect(e){
console.log(e)
if(e.typeKey=='fbs'){
this.rules['contractCode'][0].required=true;
}else{
this.rules['contractCode'][0].required=false;
}
},
uniteChange(val) {
if (val && val.length > 0) {
this.maForm.unitId = this.unitId[this.unitId.length - 1];
@ -964,7 +961,16 @@ export default {
//
reset() {
this.form = {};
this.form = {
unitId:null,
projectId:null,
authPerson:"",
phone:'',
contractCode:'',
planStartTime:'',
protocol:"1",
remark:'',
};
this.unitId = null;
this.projectId = null;
this.maForm = {
@ -1006,15 +1012,14 @@ export default {
await this.editAgreementTemp(this.form);
await this.deleteFile();
}
} else {
console.log(1)
if (this.businessLicenseListTemp.length != 0) {
console.log(2)
// console.log(2)
await this.getImaUpload(),
await this.addAgreementTemp(this.form);
} else {
console.log(3)
// console.log(3)
await this.addAgreementTemp(this.form);
}

View File

@ -176,13 +176,7 @@
v-model.number="scope.row.purchaseNum"
controls-position="right" type="number"
style="width: 100%" :disabled="scope.row.status!=1&&scope.row.status!=12"
:min="0"
@input="
v =>
scope.row.unitValue == 1
? (scope.row.purchaseNum = Number(v.replace(/[^\d.]/g, '')))
: (scope.row.purchaseNum = Number(v.replace(/[^\d]/g, '')))
"
:min="0" @input="v =>scope.row.unitValue == 1? (scope.row.purchaseNum = Number(v.replace(/[^\d.]/g, ''))): (scope.row.purchaseNum = Number(v.replace(/[^\d]/g, '')))"
></el-input>
</template>
</el-table-column>
@ -623,8 +617,7 @@ export default {
},
//
processTypeData(data) {
const result = []
const result = []
const traverse = (node, parents = []) => {
const path = [...parents, node.typeName]
@ -638,7 +631,8 @@ export default {
maTypeName: parents[parents.length - 1] || '',
specificationType: node.typeName,
unitName: node.unitName,
unitValue: node.unitValue
unitValue: node.unitValue,
rentPrice: node.rentPrice,
})
}
@ -664,8 +658,7 @@ export default {
},
//
handleTypeChange(val) {
if (!val || val.length === 0) return
if (!val || val.length === 0) return
//
const lastSelected = val[val.length - 1]
const typeData = this.flattenTypeOptions.find(item => item.typeId === lastSelected)
@ -681,10 +674,25 @@ export default {
this.$message.error('所选物资规格类型暂时无库存,无法申请!')
this.tempDeviceType = this.tempDeviceType.filter(id => id !== lastSelected)
} else {
console.log(typeData,"typeData")
if(typeData.rentPrice>0){//;;
typeData.rentPriceDisabled=true
}else{
typeData.rentPriceDisabled=false
}
//
this.equipmentList.unshift({
...typeData,
preNum: 0
preNum: 0,
createTime: null,
productionTime: this.maForm.productionTime,
purchaseTaxPrice: 0,
purchaseTaxPrice: 0,
purchaseNum : 1,
fixCode: '0',
status:1,
bmFileInfos:[]
})
this.deviceType.push(lastSelected)
this.$message({