Bläddra i källkod

bug修改

master
yangpeilai 2 veckor sedan
förälder
incheckning
5f6adb6b97

+ 2
- 2
src/crud/index.vue Visa fil

@@ -790,11 +790,11 @@ const handleInfo = (idx: any, row: any) => {
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) {
dialogInfo.value = true
}
console.log(form.value, 'form数据')
// console.log(form.value, 'form数据')

emit('handleInfo', idx, row)
}

+ 4
- 3
src/views/inventoryControl/newInventory/warehouseManagement/data.js Visa fil

@@ -1,7 +1,7 @@
import { IsPermission } from "@/router/routerUtil";
let formLabelWidth = '150px';
// 表单数据配置(改为函数形式,接收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)
searchShow: true, //是否显示搜索模块(默认false) IsPermission(route, 'QUERY_BASE')
border: true, //是否添加边框(默认false)
@@ -59,7 +59,7 @@ export const getZxqdFindConfig = (route, agencyIdList, branchIdList, upperWareho
field: [
{
prop: "agencyId",
label: "渠道编号",
label: "渠道",
form: {
formLabelWidth: formLabelWidth,
type: 'select',
@@ -69,7 +69,8 @@ export const getZxqdFindConfig = (route, agencyIdList, branchIdList, upperWareho
},
{
prop: "channelId",
label: "网点编号",
label: "网点",
listData: allHallList,
form: {
formLabelWidth: formLabelWidth,
type: 'select',

+ 13
- 4
src/views/inventoryControl/newInventory/warehouseManagement/index.vue Visa fil

@@ -56,13 +56,15 @@ const searchForm = ref({ agencyId: '' })
const agencyIdList = ref([])
const branchIdList = ref([])
const hallList = ref([])
const allHallList = ref([])
const upperWarehouseIdList = ref([])
const info = ref({})
const dialogVisible = ref(false)
const field = ref(getZxqdFindConfig(route, agencyIdList, branchIdList, upperWarehouseIdList,hallList));
const field = ref(getZxqdFindConfig(route, agencyIdList, branchIdList, upperWarehouseIdList,hallList,allHallList));
onMounted(() => {
getList()
getAgenCy()
getAllHallList()
getUpperWarehouseIdList()
})
function getAgenCy() {
@@ -79,6 +81,16 @@ 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) {
if (val) {
searchForm.value.insertTimeStart = val[0];
@@ -199,9 +211,6 @@ function getList() {
crudRef.value.tableLoding = false
//分页总数
field.value.paging.total = bizContent.totalCount
} else {
crudRef.value.tableLoding = false
ElMessage.error(res.message)
}
})
}

+ 87
- 36
src/views/system/agency/index.vue Visa fil

@@ -2,7 +2,7 @@
<div>
<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"
@cancel="cancel" @CurrentChange="handleCurrentChange" @submit="submitClick">
@cancel="cancel" @CurrentChange="handleCurrentChange" @submit="submitClick" @handleInfo="handleInfo">

<template #search>
<el-input maxlength="60" v-trim clearable v-model="searchForm.agencyId" style="width: 200px;"
@@ -16,10 +16,6 @@
</el-button>
</template>
<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 #status="item">
<el-switch :disabled="!IsPermission(route, 'STAET_LIST')" v-model="item.scope.row.status"
@@ -29,17 +25,17 @@
</template>
<template #fieldList>
<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-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 label="协议名称">
<template v-slot="scope">
<div class="input-wrap">
<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>
</div>
</template>
@@ -48,8 +44,8 @@
<template v-slot="scope">
<div class="input-wrap">
<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>
</div>
</template>
@@ -58,29 +54,30 @@
<template v-slot="scope">
<div class="input-wrap">
<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>
</div>
</template>
</el-table-column>
<el-table-column label="协议附件">
<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"
:action="uploadUrl" @success="onSuccess($event, scope.row)">
<el-button type="primary" icon="upload">
<el-button size="small" type="primary" icon="upload">
上传附件
</el-button>
</el-upload>
<el-link v-else v-for="item in scope.row.fileList" :herf="item.url" type="primary">{{item.name}}</el-link>
</template>
</el-table-column>
<el-table-column label="对公账户">
<template v-slot="scope">
<div class="input-wrap">
<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>
</div>
</template>
@@ -89,8 +86,8 @@
<template v-slot="scope">
<div class="input-wrap">
<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>
</div>
</template>
@@ -99,15 +96,15 @@
<template v-slot="scope">
<div class="input-wrap">
<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>
</div>
</template>
</el-table-column>
<el-table-column label="操作" width="70" v-if="typeOption=='add'||typeOption=='edit'">
<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>
</template>
@@ -492,18 +489,6 @@ const field = ref({
slotSet: true,
slotSetName: "status",
},
{
hide: true,
prop: "agencyModels",
form: {
width: '95%',
slotSetEdit: true,
slotSetNameEdit: 'fieldList',
formLabelWidth: '40px',
slotSetInfo: true,
slotSetNameInfo: 'fieldList',
}
},
{
prop: "insertTime",
label: "创建时间",
@@ -528,6 +513,19 @@ const field = ref({
rows: 5
}
},
{
hide: true,
prop: "agencyModels",
span: 2,
form: {
width: '95%',
slotSetEdit: true,
slotSetNameEdit: 'fieldList',
formLabelWidth: '40px',
slotSetInfo: true,
slotSetNameInfo: 'fieldList',
}
},
]
});
// 搜索按钮
@@ -586,9 +584,62 @@ function add() {
}
})
}
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) {
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);

typeOption.value = "edit";
@@ -747,7 +798,7 @@ const handleExceed: UploadProps['onExceed'] = (files) => {
function onSuccess(response: any, row: any) {
// import.meta.env.VITE_APP_UPLOAD_URL +
// row.agreementAnnex = response.data.ossFilePath
row.agreementAnnex = response.data.originalFileName
row.agreementAnnex = response.data.ossFilePath
}

onMounted(() => {

Laddar…
Avbryt
Spara