Przeglądaj źródła

bug修改

master
yangpeilai 2 tygodni temu
rodzic
commit
5f6adb6b97

+ 2
- 2
src/crud/index.vue Wyświetl plik

form.value[key] = form.value[key].map((item) => item.toString()) form.value[key] = form.value[key].map((item) => item.toString())
} }
} }
console.log(form.value, 'form数据',props.homeData)
// console.log(form.value, 'form数据',props.homeData)
if (!props.homeData.automationDialog) { if (!props.homeData.automationDialog) {
dialogInfo.value = true dialogInfo.value = true
} }
console.log(form.value, 'form数据')
// console.log(form.value, 'form数据')


emit('handleInfo', idx, row) emit('handleInfo', idx, row)
} }

+ 4
- 3
src/views/inventoryControl/newInventory/warehouseManagement/data.js Wyświetl plik

import { IsPermission } from "@/router/routerUtil"; import { IsPermission } from "@/router/routerUtil";
let formLabelWidth = '150px'; let formLabelWidth = '150px';
// 表单数据配置(改为函数形式,接收route参数) // 表单数据配置(改为函数形式,接收route参数)
export const getZxqdFindConfig = (route, agencyIdList, branchIdList, upperWarehouseIdList,hallList) => ({
export const getZxqdFindConfig = (route, agencyIdList, branchIdList, upperWarehouseIdList,hallList,allHallList) => ({
tabSize: "small", //Table 的尺寸 large / default /small (默认default) tabSize: "small", //Table 的尺寸 large / default /small (默认default)
searchShow: true, //是否显示搜索模块(默认false) IsPermission(route, 'QUERY_BASE') searchShow: true, //是否显示搜索模块(默认false) IsPermission(route, 'QUERY_BASE')
border: true, //是否添加边框(默认false) border: true, //是否添加边框(默认false)
field: [ field: [
{ {
prop: "agencyId", prop: "agencyId",
label: "渠道编号",
label: "渠道",
form: { form: {
formLabelWidth: formLabelWidth, formLabelWidth: formLabelWidth,
type: 'select', type: 'select',
}, },
{ {
prop: "channelId", prop: "channelId",
label: "网点编号",
label: "网点",
listData: allHallList,
form: { form: {
formLabelWidth: formLabelWidth, formLabelWidth: formLabelWidth,
type: 'select', type: 'select',

+ 13
- 4
src/views/inventoryControl/newInventory/warehouseManagement/index.vue Wyświetl plik

const agencyIdList = ref([]) const agencyIdList = ref([])
const branchIdList = ref([]) const branchIdList = ref([])
const hallList = ref([]) const hallList = ref([])
const allHallList = ref([])
const upperWarehouseIdList = ref([]) const upperWarehouseIdList = ref([])
const info = ref({}) const info = ref({})
const dialogVisible = ref(false) const dialogVisible = ref(false)
const field = ref(getZxqdFindConfig(route, agencyIdList, branchIdList, upperWarehouseIdList,hallList));
const field = ref(getZxqdFindConfig(route, agencyIdList, branchIdList, upperWarehouseIdList,hallList,allHallList));
onMounted(() => { onMounted(() => {
getList() getList()
getAgenCy() getAgenCy()
getAllHallList()
getUpperWarehouseIdList() getUpperWarehouseIdList()
}) })
function getAgenCy() { function getAgenCy() {
} }
}) })
} }
function getAllHallList() {
BaseService.postN('/userw/serviceHall/serviceHallSonSelect').then((res: any) => {
if (res && res.code === 0) {
let data = res.data || {}
allHallList.value = data.map((item) => {
return { label: item.servicehallName, value: item.servicehallId }
})
}
})
}
function dateChangeHandle(val: any) { function dateChangeHandle(val: any) {
if (val) { if (val) {
searchForm.value.insertTimeStart = val[0]; searchForm.value.insertTimeStart = val[0];
crudRef.value.tableLoding = false crudRef.value.tableLoding = false
//分页总数 //分页总数
field.value.paging.total = bizContent.totalCount field.value.paging.total = bizContent.totalCount
} else {
crudRef.value.tableLoding = false
ElMessage.error(res.message)
} }
}) })
} }

+ 87
- 36
src/views/system/agency/index.vue Wyświetl plik

<div> <div>
<crud-template v-if="itemStart" class="as-weight" :ref="(el) => (crudRef = el)" :home-data="field" <crud-template v-if="itemStart" class="as-weight" :ref="(el) => (crudRef = el)" :home-data="field"
@btnSearch="btnSearch" @refreshLeft="refreshLeft" :tableData="tableData" @add="add" @handleEdit="handleEdit" @btnSearch="btnSearch" @refreshLeft="refreshLeft" :tableData="tableData" @add="add" @handleEdit="handleEdit"
@cancel="cancel" @CurrentChange="handleCurrentChange" @submit="submitClick">
@cancel="cancel" @CurrentChange="handleCurrentChange" @submit="submitClick" @handleInfo="handleInfo">


<template #search> <template #search>
<el-input maxlength="60" v-trim clearable v-model="searchForm.agencyId" style="width: 200px;" <el-input maxlength="60" v-trim clearable v-model="searchForm.agencyId" style="width: 200px;"
</el-button> </el-button>
</template> </template>
<template #operation="{ scope }"> <template #operation="{ scope }">
<el-button v-if="scope.row.status === '停用' && IsPermission(route, 'STAET_LIST')" type="primary"
@click="isOpenHandle(scope.row, 1)" size="small">启用</el-button>
<el-button v-if="scope.row.status === '启用' && IsPermission(route, 'STAET_LIST')" type="danger"
@click="isOpenHandle(scope.row, 2)" size="small">停用</el-button>
</template> </template>
<template #status="item"> <template #status="item">
<el-switch :disabled="!IsPermission(route, 'STAET_LIST')" v-model="item.scope.row.status" <el-switch :disabled="!IsPermission(route, 'STAET_LIST')" v-model="item.scope.row.status"
</template> </template>
<template #fieldList> <template #fieldList>
<div style="padding: 0 0 30px 0;text-align: right;"> <div style="padding: 0 0 30px 0;text-align: right;">
<el-button type="success" icon="Plus" @click="addBtn" style="margin-bottom: 10px;" v-show="typeOption=='add'||typeOption=='edit'">
<el-button type="success" icon="Plus" @click="addBtn" style="margin-bottom: 10px;" v-show="typeOption==='edit' || typeOption === 'add'">
添加 添加
</el-button> </el-button>
<el-table :data="dataForm.configSetInfos" :border="true">
<el-table :data="dataForm.configSetInfos" :border="true" size="small">
<!-- <el-table-column type="index" header-align="center" align="center" width="50"></el-table-column> --> <!-- <el-table-column type="index" header-align="center" align="center" width="50"></el-table-column> -->
<el-table-column label="协议名称"> <el-table-column label="协议名称">
<template v-slot="scope"> <template v-slot="scope">
<div class="input-wrap"> <div class="input-wrap">
<el-form-item prop="agreementName"> <el-form-item prop="agreementName">
<el-input maxlength="60" v-trim clearable v-model="scope.row.agreementName"
placeholder="协议名称"></el-input>
<el-input size="small" maxlength="60" v-trim clearable v-model="scope.row.agreementName"
placeholder="协议名称" :disabled="typeOption==='info'" ></el-input>
</el-form-item> </el-form-item>
</div> </div>
</template> </template>
<template v-slot="scope"> <template v-slot="scope">
<div class="input-wrap"> <div class="input-wrap">
<el-form-item prop="agreementId"> <el-form-item prop="agreementId">
<el-input maxlength="60" v-trim clearable v-model="scope.row.agreementId"
placeholder="协议编号"></el-input>
<el-input size="small" maxlength="60" v-trim clearable v-model="scope.row.agreementId"
placeholder="协议编号" :disabled="typeOption==='info'"></el-input>
</el-form-item> </el-form-item>
</div> </div>
</template> </template>
<template v-slot="scope"> <template v-slot="scope">
<div class="input-wrap"> <div class="input-wrap">
<el-form-item prop="termOfValidity"> <el-form-item prop="termOfValidity">
<el-date-picker maxlength="60" v-trim clearable v-model="scope.row.termOfValidity"
placeholder="有效期" value-format="YYYY-MM-DD"></el-date-picker>
<el-date-picker size="small" maxlength="60" v-trim clearable v-model="scope.row.termOfValidity"
placeholder="有效期" value-format="YYYY-MM-DD" :disabled="typeOption==='info'"></el-date-picker>
</el-form-item> </el-form-item>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="协议附件"> <el-table-column label="协议附件">
<template v-slot="scope"> <template v-slot="scope">
<el-upload ref="upload" :file-list="scope.row.fileList" style="padding-top: 9px;"
<el-upload v-if="typeOption!=='info'" ref="upload" :file-list="scope.row.fileList" style="padding-top: 9px;"
:limit="1" :on-exceed="handleExceed" class="upload-demo" :data="data" :limit="1" :on-exceed="handleExceed" class="upload-demo" :data="data"
:action="uploadUrl" @success="onSuccess($event, scope.row)"> :action="uploadUrl" @success="onSuccess($event, scope.row)">
<el-button type="primary" icon="upload">
<el-button size="small" type="primary" icon="upload">
上传附件 上传附件
</el-button> </el-button>
</el-upload> </el-upload>
<el-link v-else v-for="item in scope.row.fileList" :herf="item.url" type="primary">{{item.name}}</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="对公账户"> <el-table-column label="对公账户">
<template v-slot="scope"> <template v-slot="scope">
<div class="input-wrap"> <div class="input-wrap">
<el-form-item prop="corporateAccount"> <el-form-item prop="corporateAccount">
<el-input maxlength="60" v-trim clearable v-model="scope.row.corporateAccount"
placeholder="对公账户"></el-input>
<el-input size="small" maxlength="60" v-trim clearable v-model="scope.row.corporateAccount"
placeholder="对公账户" :disabled="typeOption==='info'"></el-input>
</el-form-item> </el-form-item>
</div> </div>
</template> </template>
<template v-slot="scope"> <template v-slot="scope">
<div class="input-wrap"> <div class="input-wrap">
<el-form-item prop="merchantId"> <el-form-item prop="merchantId">
<el-input maxlength="60" v-trim clearable v-model="scope.row.merchantId"
placeholder="商户号"></el-input>
<el-input size="small" maxlength="60" v-trim clearable v-model="scope.row.merchantId"
placeholder="商户号" :disabled="typeOption==='info'"></el-input>
</el-form-item> </el-form-item>
</div> </div>
</template> </template>
<template v-slot="scope"> <template v-slot="scope">
<div class="input-wrap"> <div class="input-wrap">
<el-form-item prop="openingBank"> <el-form-item prop="openingBank">
<el-input maxlength="60" v-trim clearable v-model="scope.row.openingBank"
placeholder="开户行"></el-input>
<el-input size="small" maxlength="60" v-trim clearable v-model="scope.row.openingBank"
placeholder="开户行" :disabled="typeOption==='info'"></el-input>
</el-form-item> </el-form-item>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="70" v-if="typeOption=='add'||typeOption=='edit'"> <el-table-column label="操作" width="70" v-if="typeOption=='add'||typeOption=='edit'">
<template v-slot="scope"> <template v-slot="scope">
<el-button class="op-btn" type="danger" @click="deleteHandle(scope.row, scope.$index)">
<el-button size="small" class="op-btn" type="danger" @click="deleteHandle(scope.row, scope.$index)">
删除 删除
</el-button> </el-button>
</template> </template>
slotSet: true, slotSet: true,
slotSetName: "status", slotSetName: "status",
}, },
{
hide: true,
prop: "agencyModels",
form: {
width: '95%',
slotSetEdit: true,
slotSetNameEdit: 'fieldList',
formLabelWidth: '40px',
slotSetInfo: true,
slotSetNameInfo: 'fieldList',
}
},
{ {
prop: "insertTime", prop: "insertTime",
label: "创建时间", label: "创建时间",
rows: 5 rows: 5
} }
}, },
{
hide: true,
prop: "agencyModels",
span: 2,
form: {
width: '95%',
slotSetEdit: true,
slotSetNameEdit: 'fieldList',
formLabelWidth: '40px',
slotSetInfo: true,
slotSetNameInfo: 'fieldList',
}
},
] ]
}); });
// 搜索按钮 // 搜索按钮
} }
}) })
} }
function handleInfo(idx: any, row: any){
let agencyModel: any = {}
let agencyBkModels: any = []
BaseService.postN('/userw/agency/details', {id: row.id,}).then((res: any) => {
if (res && res.code === 0) {
agencyModel = res.data.agencyModel
agencyBkModels = res.data.agencyBkModels
dataForm.value.configSetInfos = agencyBkModels ?? []
if (agencyBkModels?.length > 0) {
dataForm.value.configSetInfos.forEach((item: any, index: number) => {
dataForm.value.configSetInfos[index].fileList = [{
url: item.agreementAnnex,
name: `附件${index + 1}`
}
];
});
}
}
typeOption.value = "info";
});
}

//表单编辑按钮 //表单编辑按钮
function handleEdit(idx: any, row: any) { function handleEdit(idx: any, row: any) {
dataForm.value.configSetInfos = row.models ?? []

let agencyModel: any = {}
let agencyBkModels: any = []
BaseService.postN('/userw/agency/details', {id: row.id,}).then((res: any) => {
if (res && res.code === 0) {
agencyModel = res.data.agencyModel
agencyBkModels = res.data.agencyBkModels
dataForm.value.configSetInfos = agencyBkModels ?? []
if (agencyBkModels?.length > 0) {
dataForm.value.configSetInfos.forEach((item: any, index: number) => {
dataForm.value.configSetInfos[index].fileList = [{
url: item.agreementAnnex,
name: `附件${index + 1}`
}
];
});
}
}
const data = toRaw(row);

typeOption.value = "edit";
addForm.value = {
...data
}
crudRef.value.title = "修改";
crudRef.value.dialogFormVisible = true;

});

// console.log("agencyModel",dataForm.value.configSetInfos)

// dataForm.value.configSetInfos = row.models ?? []
const data = toRaw(row); const data = toRaw(row);


typeOption.value = "edit"; typeOption.value = "edit";
function onSuccess(response: any, row: any) { function onSuccess(response: any, row: any) {
// import.meta.env.VITE_APP_UPLOAD_URL + // import.meta.env.VITE_APP_UPLOAD_URL +
// row.agreementAnnex = response.data.ossFilePath // row.agreementAnnex = response.data.ossFilePath
row.agreementAnnex = response.data.originalFileName
row.agreementAnnex = response.data.ossFilePath
} }


onMounted(() => { onMounted(() => {

Ładowanie…
Anuluj
Zapisz