|
|
@@ -1,184 +1,236 @@
|
|
|
<template>
|
|
|
<basicLayout
|
|
|
- ref="basicLayout"
|
|
|
- :oldFormPath="{
|
|
|
- add:'optionSystem/itemManage/modules'
|
|
|
- }"
|
|
|
- tableName="itemTable"
|
|
|
- idName="itemid"
|
|
|
- ownertable="plm_item"
|
|
|
- :apiId="{query:2024060309533402,del:2024060309421602}"
|
|
|
- :detailPath="{
|
|
|
- path:'/itemDetail'
|
|
|
- }"
|
|
|
- :isExport="false"
|
|
|
+ ref="basicLayout"
|
|
|
+ :oldFormPath="{
|
|
|
+ add: 'optionSystem/itemManage/modules',
|
|
|
+ }"
|
|
|
+ tableName="itemTable"
|
|
|
+ idName="itemid"
|
|
|
+ ownertable="plm_item"
|
|
|
+ :apiId="{ query: 2024060309533402, del: 2024060309421602 }"
|
|
|
+ :detailPath="{
|
|
|
+ path: '/itemDetail',
|
|
|
+ }"
|
|
|
+ :isExport="false"
|
|
|
+ >
|
|
|
+ <template #titleRight>
|
|
|
+ <ImportFile
|
|
|
+ :templateParam="{ id: 20240617141002, content: {} }"
|
|
|
+ title="主阀"
|
|
|
+ @onSuccess="bindImport"
|
|
|
+ :errorUrl="errorUrl"
|
|
|
+ @clearUrl="errorUrl = null"
|
|
|
+ v-if="tool.checkAuth($route.name,'importFile')"
|
|
|
+ ></ImportFile>
|
|
|
+ </template>
|
|
|
+ <template #custom>
|
|
|
+ <div class="mt-10">
|
|
|
+ <label class="search__label">创建时间:</label>
|
|
|
+ <el-date-picker
|
|
|
+ style="margin-right: 24px !important"
|
|
|
+ size="small"
|
|
|
+ @change="selectTimeChange"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ v-model="dateSelect"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </div>
|
|
|
+ <div class="mt-10">
|
|
|
+ <label class="search__label">阀门类型:</label>
|
|
|
+ <el-select
|
|
|
+ class="inline-24"
|
|
|
+ v-model="selectParam.valvetype"
|
|
|
+ placeholder="请选择阀门类型"
|
|
|
+ @change="selecttypeChange"
|
|
|
+ size="small"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ :label="item.remarks"
|
|
|
+ :value="item.value"
|
|
|
+ v-for="item in typeList"
|
|
|
+ :key="item.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div class="mt-10">
|
|
|
+ <label class="search__label">状态:</label>
|
|
|
+ <el-select
|
|
|
+ class="inline-24"
|
|
|
+ v-model="selectParam.status"
|
|
|
+ placeholder="请选择状态"
|
|
|
+ @change="selectStatusChange"
|
|
|
+ size="small"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option label="新建" value="新建"></el-option>
|
|
|
+ <el-option label="审核" value="审核"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template v-slot:tbList="scope">
|
|
|
+ <div
|
|
|
+ :style="
|
|
|
+ scope.data.column.data.status === '审核'
|
|
|
+ ? 'color:#52C41A'
|
|
|
+ : 'color:000000'
|
|
|
+ "
|
|
|
+ v-if="scope.data.column.columnname === 'status'"
|
|
|
>
|
|
|
- <template #titleRight>
|
|
|
- </template>
|
|
|
- <template #custom>
|
|
|
- <div class="mt-10">
|
|
|
- <label class="search__label" >创建时间:</label>
|
|
|
- <el-date-picker
|
|
|
- style="margin-right: 24px !important;"
|
|
|
- size="small"
|
|
|
- @change="selectTimeChange"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- v-model="dateSelect"
|
|
|
- type="daterange"
|
|
|
- range-separator="至"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期"
|
|
|
- clearable>
|
|
|
- </el-date-picker>
|
|
|
- </div>
|
|
|
- <div class="mt-10">
|
|
|
- <label class="search__label" >阀门类型:</label>
|
|
|
- <el-select class="inline-24" v-model="selectParam.valvetype" placeholder="请选择阀门类型" @change="selecttypeChange" size="small" clearable>
|
|
|
- <el-option :label="item.remarks" :value="item.value" v-for="item in typeList" :key="item.value"></el-option>
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- <div class="mt-10">
|
|
|
- <label class="search__label" >状态:</label>
|
|
|
- <el-select class="inline-24" v-model="selectParam.status" placeholder="请选择状态" @change="selectStatusChange" size="small" clearable>
|
|
|
- <el-option label="新建" value="新建"></el-option>
|
|
|
- <el-option label="审核" value="审核"></el-option>
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
-
|
|
|
- </template>
|
|
|
- <template v-slot:tbList="scope">
|
|
|
- <div :style="scope.data.column.data.status === '审核'?'color:#52C41A':'color:000000'" v-if="scope.data.column.columnname === 'status'">
|
|
|
- {{ scope.data.column.data.status }}
|
|
|
- </div>
|
|
|
- <div v-else-if="scope.data.column.columnname === 'marketprice'">
|
|
|
- {{ tool.formatAmount(scope.data.column.data.marketprice,2) }}
|
|
|
- </div>
|
|
|
- <p v-else> {{scope.data.column.data[[scope.data.column.columnname]]}}</p>
|
|
|
- </template>
|
|
|
- <!-- <template v-slot:tbOpreation="scope">
|
|
|
+ {{ scope.data.column.data.status }}
|
|
|
+ </div>
|
|
|
+ <div v-else-if="scope.data.column.columnname === 'marketprice'">
|
|
|
+ {{ tool.formatAmount(scope.data.column.data.marketprice, 2) }}
|
|
|
+ </div>
|
|
|
+ <p v-else>{{ scope.data.column.data[[scope.data.column.columnname]] }}</p>
|
|
|
+ </template>
|
|
|
+ <!-- <template v-slot:tbOpreation="scope">
|
|
|
<editTemp :data="scope.data.data"></editTemp>
|
|
|
</template> -->
|
|
|
- </basicLayout>
|
|
|
+ </basicLayout>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import ImportFile from "../modules/importFile.vue";
|
|
|
export default {
|
|
|
- data () {
|
|
|
- return {
|
|
|
- selectParam: {
|
|
|
- status:''
|
|
|
- },
|
|
|
- dateSelect:'',
|
|
|
- typeList:[],
|
|
|
- caliber:[],
|
|
|
- pressure:[],
|
|
|
- connection:[],
|
|
|
- bodymaterial:[],
|
|
|
- valveplatematerial:[],
|
|
|
- stemmaterial:[],
|
|
|
- plinthmaterial:[],
|
|
|
- }
|
|
|
- },
|
|
|
- provide () {
|
|
|
- return {
|
|
|
- itemTypeList: () => {
|
|
|
- return this.typeList
|
|
|
- },
|
|
|
- caliber: () => {
|
|
|
- return this.caliber
|
|
|
- },
|
|
|
- pressure: () => {
|
|
|
- return this.pressure
|
|
|
- },
|
|
|
- connection: () => {
|
|
|
- return this.connection
|
|
|
- },
|
|
|
- bodymaterial: () => {
|
|
|
- return this.bodymaterial
|
|
|
- },
|
|
|
- valveplatematerial: () => {
|
|
|
- return this.valveplatematerial
|
|
|
- },
|
|
|
- stemmaterial: () => {
|
|
|
- return this.stemmaterial
|
|
|
- },
|
|
|
- plinthmaterial: () => {
|
|
|
- return this.plinthmaterial
|
|
|
- },
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- selectStatusChange () {
|
|
|
- this.$refs['basicLayout'].param.content.where = this.selectParam
|
|
|
- this.$refs['basicLayout'].param.content.pageNumber = 1
|
|
|
- this.$refs['basicLayout'].listData()
|
|
|
+ components: { ImportFile },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ selectParam: {
|
|
|
+ status: "",
|
|
|
},
|
|
|
- selecttypeChange () {
|
|
|
- this.$refs['basicLayout'].param.content.where = this.selectParam
|
|
|
- this.$refs['basicLayout'].param.content.pageNumber = 1
|
|
|
- this.$refs['basicLayout'].listData()
|
|
|
+ dateSelect: "",
|
|
|
+ typeList: [],
|
|
|
+ caliber: [],
|
|
|
+ pressure: [],
|
|
|
+ connection: [],
|
|
|
+ bodymaterial: [],
|
|
|
+ valveplatematerial: [],
|
|
|
+ stemmaterial: [],
|
|
|
+ plinthmaterial: [],
|
|
|
+ errorUrl:null,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ provide() {
|
|
|
+ return {
|
|
|
+ itemTypeList: () => {
|
|
|
+ return this.typeList;
|
|
|
},
|
|
|
- selectTimeChange(){
|
|
|
- if (this.dateSelect !== '' && this.dateSelect !== null){
|
|
|
- this.selectParam.begindate = this.dateSelect[0]
|
|
|
- this.selectParam.enddate = this.dateSelect[1]
|
|
|
- }else {
|
|
|
- this.selectParam.begindate = ''
|
|
|
- this.selectParam.enddate = ''
|
|
|
- }
|
|
|
- this.$refs.basicLayout.param.content.pageNumber = 1
|
|
|
- this.$refs.basicLayout.param.content.where = this.selectParam
|
|
|
- this.$refs.basicLayout.listData()
|
|
|
+ caliber: () => {
|
|
|
+ return this.caliber;
|
|
|
},
|
|
|
- optionList () {
|
|
|
- this.$store.dispatch('optiontypeselect','famentype').then(res => {
|
|
|
- this.typeList = res.data
|
|
|
- console.log(this.typeList,'阀门类型');
|
|
|
- })
|
|
|
- this.$store.dispatch('optiontypeselect','caliber').then(res => {
|
|
|
- this.caliber = res.data
|
|
|
- console.log(this.caliber,'公称通径');
|
|
|
- })
|
|
|
-
|
|
|
- this.$store.dispatch('optiontypeselect','pressure').then(res => {
|
|
|
- this.pressure = res.data
|
|
|
- console.log(this.pressure,'公称压力');
|
|
|
- })
|
|
|
-
|
|
|
- this.$store.dispatch('optiontypeselect','connection').then(res => {
|
|
|
- this.connection = res.data
|
|
|
- console.log(this.connection,'连接方式');
|
|
|
+ pressure: () => {
|
|
|
+ return this.pressure;
|
|
|
+ },
|
|
|
+ connection: () => {
|
|
|
+ return this.connection;
|
|
|
+ },
|
|
|
+ bodymaterial: () => {
|
|
|
+ return this.bodymaterial;
|
|
|
+ },
|
|
|
+ valveplatematerial: () => {
|
|
|
+ return this.valveplatematerial;
|
|
|
+ },
|
|
|
+ stemmaterial: () => {
|
|
|
+ return this.stemmaterial;
|
|
|
+ },
|
|
|
+ plinthmaterial: () => {
|
|
|
+ return this.plinthmaterial;
|
|
|
+ },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ async bindImport (id) {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": 20240617142502,
|
|
|
+ "content": {
|
|
|
+ "attachmentid":id[0]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (res.data !== '成功') {
|
|
|
+ this.errorUrl = res.data
|
|
|
+ } else {
|
|
|
+ this.tool.showMessage(res,() => {
|
|
|
+ this.$refs.basicLayout.listData()
|
|
|
})
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ selectStatusChange() {
|
|
|
+ this.$refs["basicLayout"].param.content.where = this.selectParam;
|
|
|
+ this.$refs["basicLayout"].param.content.pageNumber = 1;
|
|
|
+ this.$refs["basicLayout"].listData();
|
|
|
+ },
|
|
|
+ selecttypeChange() {
|
|
|
+ this.$refs["basicLayout"].param.content.where = this.selectParam;
|
|
|
+ this.$refs["basicLayout"].param.content.pageNumber = 1;
|
|
|
+ this.$refs["basicLayout"].listData();
|
|
|
+ },
|
|
|
+ selectTimeChange() {
|
|
|
+ if (this.dateSelect !== "" && this.dateSelect !== null) {
|
|
|
+ this.selectParam.begindate = this.dateSelect[0];
|
|
|
+ this.selectParam.enddate = this.dateSelect[1];
|
|
|
+ } else {
|
|
|
+ this.selectParam.begindate = "";
|
|
|
+ this.selectParam.enddate = "";
|
|
|
+ }
|
|
|
+ this.$refs.basicLayout.param.content.pageNumber = 1;
|
|
|
+ this.$refs.basicLayout.param.content.where = this.selectParam;
|
|
|
+ this.$refs.basicLayout.listData();
|
|
|
+ },
|
|
|
+ optionList() {
|
|
|
+ this.$store.dispatch("optiontypeselect", "famentype").then((res) => {
|
|
|
+ this.typeList = res.data;
|
|
|
+ console.log(this.typeList, "阀门类型");
|
|
|
+ });
|
|
|
+ this.$store.dispatch("optiontypeselect", "caliber").then((res) => {
|
|
|
+ this.caliber = res.data;
|
|
|
+ console.log(this.caliber, "公称通径");
|
|
|
+ });
|
|
|
|
|
|
- this.$store.dispatch('optiontypeselect','bodymaterial').then(res => {
|
|
|
- this.bodymaterial = res.data
|
|
|
- console.log(this.bodymaterial,'阀体材质');
|
|
|
- })
|
|
|
+ this.$store.dispatch("optiontypeselect", "pressure").then((res) => {
|
|
|
+ this.pressure = res.data;
|
|
|
+ console.log(this.pressure, "公称压力");
|
|
|
+ });
|
|
|
|
|
|
- this.$store.dispatch('optiontypeselect','valveplatematerial').then(res => {
|
|
|
- this.valveplatematerial = res.data
|
|
|
- console.log(this.valveplatematerial,'阀板材质');
|
|
|
- })
|
|
|
+ this.$store.dispatch("optiontypeselect", "connection").then((res) => {
|
|
|
+ this.connection = res.data;
|
|
|
+ console.log(this.connection, "连接方式");
|
|
|
+ });
|
|
|
|
|
|
- this.$store.dispatch('optiontypeselect','stemmaterial').then(res => {
|
|
|
- this.stemmaterial = res.data
|
|
|
- console.log(this.stemmaterial,'阀杆材质');
|
|
|
- })
|
|
|
+ this.$store.dispatch("optiontypeselect", "bodymaterial").then((res) => {
|
|
|
+ this.bodymaterial = res.data;
|
|
|
+ console.log(this.bodymaterial, "阀体材质");
|
|
|
+ });
|
|
|
|
|
|
- this.$store.dispatch('optiontypeselect','plinthmaterial').then(res => {
|
|
|
- this.plinthmaterial = res.data
|
|
|
- console.log(this.plinthmaterial,'阀座材质');
|
|
|
- })
|
|
|
+ this.$store
|
|
|
+ .dispatch("optiontypeselect", "valveplatematerial")
|
|
|
+ .then((res) => {
|
|
|
+ this.valveplatematerial = res.data;
|
|
|
+ console.log(this.valveplatematerial, "阀板材质");
|
|
|
+ });
|
|
|
|
|
|
+ this.$store.dispatch("optiontypeselect", "stemmaterial").then((res) => {
|
|
|
+ this.stemmaterial = res.data;
|
|
|
+ console.log(this.stemmaterial, "阀杆材质");
|
|
|
+ });
|
|
|
|
|
|
- }
|
|
|
+ this.$store.dispatch("optiontypeselect", "plinthmaterial").then((res) => {
|
|
|
+ this.plinthmaterial = res.data;
|
|
|
+ console.log(this.plinthmaterial, "阀座材质");
|
|
|
+ });
|
|
|
},
|
|
|
- created () {
|
|
|
- this.optionList()
|
|
|
- }
|
|
|
-}
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.optionList();
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
-
|
|
|
</style>
|