表格尝试修改

jg-waiwang-pro
mhsnet 7 months ago
parent c8047f9db8
commit 2821d6d84a

@ -33,10 +33,10 @@
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">
<el-button type="text" icon="el-icon-arrow-down" @click="showAll = true" v-if="!showAll">
展开
</el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll = false" v-else>
收起
</el-button>
</el-form-item>
@ -59,51 +59,70 @@
</el-tooltip>
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' :span-method="arraySpanMethod">
<el-table-column prop="name" label="商品名称" align="left">
</el-table-column>
<el-table-column prop="code" label="商品编码" align="left">
<JNPF-table v-loading="listLoading" :border="true" :data="list" @sort-change='sortChange'
:span-method="arraySpanMethod">
<el-table-column align="left" width="230" fixed="left">
<template slot-scope="scope" v-if="!scope.row.top">
<el-row>
<el-col :span="8">
<div class="demo-image__preview">
<el-image style="width: 50px; height: 50px" :src="fnGetPhotoSrc(scope.row.photo)"
:preview-src-list="[]">
</el-image>
</div>
</el-col>
<el-col :span="16">
<el-row>
<el-col :span="24">{{ scope.row.name }}</el-col>
</el-row>
<el-row>
<el-col :span="24">{{ scope.row.code }}</el-col>
</el-row>
</el-col>
</el-row>
</template>
</el-table-column>
<el-table-column prop="productTypeId" label="商品类型" align="left">
<el-table-column prop="productTypeId" label="商品类型" align="left" width="130">
</el-table-column>
<el-table-column prop="shortName" label="商品简称" align="left">
<el-table-column prop="shortName" label="商品简称" align="left" width="130">
</el-table-column>
<el-table-column prop="spec" label="商品规格" align="left">
<el-table-column prop="spec" label="商品规格" align="left" width="130">
</el-table-column>
<el-table-column prop="barCode" label="商品条码" align="left">
<el-table-column prop="barCode" label="商品条码" align="left" width="190">
</el-table-column>
<el-table-column prop="inventoryType" label="存货类型" align="left">
<el-table-column prop="inventoryType" label="存货类型" align="left" width="130">
</el-table-column>
<el-table-column prop="brandId" label="品牌" align="left">
<el-table-column prop="brandId" label="品牌" align="left" width="130">
</el-table-column>
<el-table-column prop="productCategoryId" label="商品分类" align="left">
<el-table-column prop="productCategoryId" label="商品分类" align="left" width="130">
</el-table-column>
<el-table-column prop="area" label="产地" align="left">
<el-table-column prop="area" label="产地" align="left" width="190">
</el-table-column>
<el-table-column prop="firstSupplierId" label="首选供应商" align="left">
<el-table-column prop="firstSupplierId" label="首选供应商" align="left" width="130">
</el-table-column>
<el-table-column prop="deliveryType" label="配送方式" align="left">
<el-table-column prop="deliveryType" label="配送方式" align="left" width="130">
</el-table-column>
<el-table-column prop="flowState" label="状态" width="100">
<template slot-scope="scope" v-if="!scope.row.top">
<el-tag v-if="scope.row.flowState==1"></el-tag>
<el-tag type="success" v-else-if="scope.row.flowState==2">审核通过</el-tag>
<el-tag type="danger" v-else-if="scope.row.flowState==3">审核驳回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState==4">流程撤回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState==5">审核终止</el-tag>
<el-tag v-if="scope.row.flowState == 1"></el-tag>
<el-tag type="success" v-else-if="scope.row.flowState == 2">审核通过</el-tag>
<el-tag type="danger" v-else-if="scope.row.flowState == 3">审核驳回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState == 4">流程撤回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState == 5">审核终止</el-tag>
<el-tag type="warning" v-else></el-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-button type="text" :disabled="[1,2,4,5].indexOf(scope.row.flowState)>-1"
<el-button type="text" :disabled="[1, 2, 4, 5].indexOf(scope.row.flowState) > -1"
@click="updateHandle(scope.row)" v-has="'btn_edit'">编辑
</el-button>
<el-button type="text" class="JNPF-table-delBtn" :disabled="[1,2,3,5].indexOf(scope.row.flowState)>-1"
v-has="'btn_remove'" @click="handleDel(scope.row.id)">删除
<el-button type="text" class="JNPF-table-delBtn"
:disabled="[1, 2, 3, 5].indexOf(scope.row.flowState) > -1" v-has="'btn_remove'"
@click="handleDel(scope.row.id)">删除
</el-button>
<el-button size="mini" type="text" :disabled="!scope.row.flowState"
@click="updateHandle(scope.row,scope.row.flowState)">详情</el-button>
@click="updateHandle(scope.row, scope.row.flowState)">详情</el-button>
</template>
</el-table-column>
</JNPF-table>
@ -120,55 +139,57 @@
<el-dialog title="请选择流程" :close-on-click-modal="false" append-to-body :visible.sync="flowListVisible"
class="JNPF-dialog template-dialog JNPF-dialog_center" lock-scroll width="400px">
<el-scrollbar class="template-list">
<div class="template-item" v-for="item in flowList" :key="item.id" @click="selectFlow(item)">{{item.fullName}}
<div class="template-item" v-for=" item in flowList " :key="item.id" @click="selectFlow(item)">{{
item.fullName
}}
</div>
</el-scrollbar>
</el-dialog>
<ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible = false" />
<ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail" @close="toFormDetailVisible = false" />
<SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson" @superQuery="superQuery" />
<SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson" @superQuery="superQuery " />
</div>
</template>
<script>
import request from '@/utils/request'
import {
import request from '@/utils/request'
import {
mapGetters
} from "vuex";
import {
} from "vuex";
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
import {
} from '@/api/systemData/dictionary'
import {
getFormById
} from '@/api/workFlow/FormDesign'
import {
} from '@/api/workFlow/FormDesign'
import {
getFlowList
} from '@/api/workFlow/FlowEngine'
import FlowBox from '@/views/workFlow/components/FlowBox'
import ExportBox from '@/components/ExportBox'
import ToFormDetail from '@/views/basic/dynamicModel/list/detail'
import {
} from '@/api/workFlow/FlowEngine'
import FlowBox from '@/views/workFlow/components/FlowBox'
import ExportBox from '@/components/ExportBox'
import ToFormDetail from '@/views/basic/dynamicModel/list/detail'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import {
} from '@/api/systemData/dataInterface'
import {
getConfigData
} from '@/api/onlineDev/visualDev'
import {
} from '@/api/onlineDev/visualDev'
import {
getDefaultCurrentValueUserIdAsync
} from '@/api/permission/user'
import {
} from '@/api/permission/user'
import {
getDefaultCurrentValueDepartmentIdAsync
} from '@/api/permission/organize'
import columnList from './columnList'
import {
} from '@/api/permission/organize'
import columnList from './columnList'
import {
thousandsFormat
} from "@/components/Generator/utils/index"
import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
} from "@/components/Generator/utils/index"
import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
export default {
components: {
FlowBox,
ExportBox,
@ -373,6 +394,15 @@
})
},
methods: {
fnGetPhotoSrc(photo) {
let resUrl = ''
if (photo) {
if (photo.length > 0) {
resUrl = this.define.APIURl + photo[0]['url']
}
}
return resUrl
},
toDetail(defaultValue, modelId) {
if (!defaultValue) return
getConfigData(modelId).then(res => {
@ -552,7 +582,7 @@
this.initData()
},
//
async initSearchData() {},
async initSearchData() { },
initData() {
this.listLoading = true;
let _query = {
@ -594,7 +624,7 @@
}
});
})
}).catch(() => {});
}).catch(() => { });
},
handelUpload() {
this.uploadBoxVisible = true
@ -715,5 +745,5 @@
if (isrRefresh) this.reset()
},
}
}
}
</script>

Loading…
Cancel
Save