feat: 设备管理开发

dev_ksck2.0
chenhc 1 year ago
parent b04eab404b
commit 95dc6614c2

@ -1,181 +1,188 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="filterQuery" class="query-form" size="mini" label-width="100px" v-if="showSearch">
<el-row>
<el-col :span="18">
<el-form-item class="query-form-item" label="扫码查询:">
<el-input v-model="filterQuery.udiCode"
style="width: 97%"
placeholder="请扫描或输入UDI码"
clearable="true"
@keyup.enter.native="keyup_submit($event)"></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- <el-card class="el-card">-->
<!-- <el-form :model="filterQuery" class="query-form" size="mini" label-width="100px" v-if="showSearch">-->
<!-- <el-row>-->
<!-- <el-col :span="18">-->
<!-- <el-form-item class="query-form-item" label="扫码查询:">-->
<!-- <el-input v-model="filterQuery.udiCode"-->
<!-- style="width: 97%"-->
<!-- placeholder="请扫描或输入UDI码"-->
<!-- clearable="true"-->
<!-- @keyup.enter.native="keyup_submit($event)"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="登记部门:">
<el-select v-model="filterQuery.deptCode" placeholder="请选择登记部门" clearable="true"
@change="deptChange"
style="width: 90%"
>
<el-option
v-for="item in deptList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="登记部门:">-->
<!-- <el-select v-model="filterQuery.deptCode" placeholder="请选择登记部门" clearable="true"-->
<!-- @change="deptChange"-->
<!-- style="width: 90%"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in deptList"-->
<!-- :key="item.name"-->
<!-- :label="item.name"-->
<!-- :value="item.code">-->
<!-- <span style="float: left">{{ item.name }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="8">
<el-form-item class="query-form-item" label="负责人:">
<el-input v-model="filterQuery.manager" placeholder="请输入负责人" style="width: 90%"
clearable></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="负责人:">-->
<!-- <el-input v-model="filterQuery.manager" placeholder="请输入负责人" style="width: 90%"-->
<!-- clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="8">
<el-form-item class="query-form-item" label="设备状态:">
<el-select v-model="filterQuery.status"
style="width: 90%"
placeholder="请选择设备状态"
clearable
>
<el-option
v-for="item in statusMap"
:key="item.value"
:value="item.value"
:label="item.label"
>
{{ item.label }}
</el-option>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="设备状态:">-->
<!-- <el-select v-model="filterQuery.status"-->
<!-- style="width: 90%"-->
<!-- placeholder="请选择设备状态"-->
<!-- clearable-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in statusMap"-->
<!-- :key="item.value"-->
<!-- :value="item.value"-->
<!-- :label="item.label"-->
<!-- >-->
<!-- {{ item.label }}-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="DI/物资编码:">
<el-input v-model="filterQuery.nameCode" placeholder="请输入DI/物资编码" style="width: 90%"
clearable></el-input>
</el-form-item>
</el-col>
<!-- </el-row>-->
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="DI/物资编码:">-->
<!-- <el-input v-model="filterQuery.nameCode" placeholder="请输入DI/物资编码" style="width: 90%"-->
<!-- clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="8">
<el-form-item class="query-form-item" label="设备名称:">
<el-input v-model="filterQuery.deviceName" placeholder="请输入设备名称" style="width: 90%"
clearable></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="设备名称:">-->
<!-- <el-input v-model="filterQuery.deviceName" placeholder="请输入设备名称" style="width: 90%"-->
<!-- clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="8">
<el-form-item class="query-form-item" label="规格型号:">
<el-input v-model="filterQuery.ggxh" placeholder="请输入规格型号" style="width: 90%"
clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="规格型号:">-->
<!-- <el-input v-model="filterQuery.ggxh" placeholder="请输入规格型号" style="width: 90%"-->
<!-- clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="生产企业:">
<el-input v-model="filterQuery.manufactory" placeholder="请输入生产企业" style="width: 90%"
clearable></el-input>
</el-form-item>
</el-col>
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="生产企业:">-->
<!-- <el-input v-model="filterQuery.manufactory" placeholder="请输入生产企业" style="width: 90%"-->
<!-- clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="8">
<el-form-item class="query-form-item" label="注册/备案号:">
<el-input v-model="filterQuery.zczbhhzbapzbh" placeholder="请输入注册/备案号" style="width: 90%"
clearable></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="注册/备案号:">-->
<!-- <el-input v-model="filterQuery.zczbhhzbapzbh" placeholder="请输入注册/备案号" style="width: 90%"-->
<!-- clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="8">
<el-form-item class="query-form-item" label="供应商:">
<el-input v-model="filterQuery.supName" placeholder="请输入供应商" style="width: 90%"
clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="资产编码:">
<el-input v-model="filterQuery.code" placeholder="请输入资产编码" style="width: 90%" clearable></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="供应商:">-->
<!-- <el-input v-model="filterQuery.supName" placeholder="请输入供应商" style="width: 90%"-->
<!-- clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="资产编码:">-->
<!-- <el-input v-model="filterQuery.code" placeholder="请输入资产编码" style="width: 90%" clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="8">
<el-form-item class="query-form-item" label="批次号:">
<el-input v-model="filterQuery.batchNo" placeholder="请输入批次号" style="width: 90%"
clearable></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group>
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="onSubmit"></el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row
@row-click="listClick"
border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="登记部门" prop="deptName" width="180"></el-table-column>
<el-table-column label="负责人" prop="managerName" show-overflow-tooltip width="200"></el-table-column>
<el-table-column label="设备名称" prop="deviceName" width="200"></el-table-column>
<el-table-column label="规格型号" prop="ggxh" width="200" show-overflow-tooltip></el-table-column>
<el-table-column label="物资编码" prop="code" width="180"></el-table-column>
<el-table-column label="DI/物资编码" prop="nameCode" width="200" show-overflow-tooltip></el-table-column>
<el-table-column label="批次号" prop="batchNo" width="150"></el-table-column>
<el-table-column label="生产日期" prop="productionDate" width="150"></el-table-column>
<el-table-column label="失效日期" prop="expireDate" width="120"></el-table-column>
<el-table-column label="设备状态" prop="status" width="150">
<template slot-scope="scope">
<el-tag>{{ status[scope.row.status] }}</el-tag>
</template>
</el-table-column>
<el-table-column label="生产企业" prop="manufactory" show-overflow-tooltip width="200"></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh" width="300"></el-table-column>
<el-table-column label="供应商" prop="supName" width="300"></el-table-column>
<el-table-column label="操作" width="120" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="small" @click.native.stop="editOrder(scope.row)">编辑</el-button>
<el-button type="text" size="small" @click.native.stop="printOrder(scope.row)">标签打印</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="getList"
></pagination>
</el-card>
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="批次号:">-->
<!-- <el-input v-model="filterQuery.batchNo" placeholder="请输入批次号" style="width: 90%"-->
<!-- clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- </el-form>-->
<!-- <div class="top-right-btn">-->
<!-- <el-button-group>-->
<!-- <el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>-->
<!-- <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>-->
<!-- <el-button type="primary" icon="el-icon-search" @click="onSubmit"></el-button>-->
<!-- </el-button-group>-->
<!-- </div>-->
<!-- <el-divider style="margin: 15px"></el-divider>-->
<!-- <el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row-->
<!-- @row-click="listClick"-->
<!-- border>-->
<!-- <el-table-column label="序号" type="index"></el-table-column>-->
<!-- <el-table-column label="登记部门" prop="deptName" width="180"></el-table-column>-->
<!-- <el-table-column label="负责人" prop="managerName" show-overflow-tooltip width="200"></el-table-column>-->
<!-- <el-table-column label="设备名称" prop="deviceName" width="200"></el-table-column>-->
<!-- <el-table-column label="规格型号" prop="ggxh" width="200" show-overflow-tooltip></el-table-column>-->
<!-- <el-table-column label="物资编码" prop="code" width="180"></el-table-column>-->
<!-- <el-table-column label="DI/物资编码" prop="nameCode" width="200" show-overflow-tooltip></el-table-column>-->
<!-- <el-table-column label="批次号" prop="batchNo" width="150"></el-table-column>-->
<!-- <el-table-column label="生产日期" prop="productionDate" width="150"></el-table-column>-->
<!-- <el-table-column label="失效日期" prop="expireDate" width="120"></el-table-column>-->
<!-- <el-table-column label="设备状态" prop="status" width="150">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag>{{ status[scope.row.status] }}</el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="生产企业" prop="manufactory" show-overflow-tooltip width="200"></el-table-column>-->
<!-- <el-table-column label="注册/备案号" prop="zczbhhzbapzbh" width="300"></el-table-column>-->
<!-- <el-table-column label="供应商" prop="supName" width="300"></el-table-column>-->
<!-- <el-table-column label="操作" width="120" fixed="right">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button type="text" size="small" @click.native.stop="editOrder(scope.row)">编辑</el-button>-->
<!-- <el-button type="text" size="small" @click.native.stop="printOrder(scope.row)">标签打印</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- <pagination-->
<!-- v-show="total>0"-->
<!-- :total="total"-->
<!-- :limit.sync="filterQuery.limit"-->
<!-- :page.sync="filterQuery.page"-->
<!-- @pagination="getList"-->
<!-- ></pagination>-->
<!-- </el-card>-->
<el-tabs type="border-card" style="margin: 15px">
<el-tab-pane label="基本信息">
<deviceModifyDialog
:rowData="this.rowData"
:editSaveDev="editSaveDev"
>
</deviceModifyDialog>
</el-tab-pane>
<el-tab-pane label="设备资质">
<checkResultPanel
:idQuery="filterQuery"
:rowData="selectedRowData"
:rowData="this.rowData"
></checkResultPanel>
</el-tab-pane>
<el-tab-pane label="技术资料">
<technical
:idQuery="filterQuery"
:rowData="selectedRowData"
:rowData="this.rowData"
></technical>
</el-tab-pane>
@ -225,7 +232,7 @@
v-if="isInformation"
>
<DeviceModelDetail
:rowData="selectedRowData"
:rowData="this.rowData"
:closeDialog="closeInspectSetDialog"
></DeviceModelDetail>
</el-dialog>
@ -234,6 +241,7 @@
</template>
<script>
import deviceModifyDialog from "@/views/dev/devInfoEdit.vue";
import {getInvListByUser} from "@/api/system/invWarehouse";
import {getDeptListByUser} from "@/api/auth/authDept";
import {getDeptDeviceList, deleteDeptDevice, printOrder, verifyTemplateFile} from "@/api/dev/deptDevice";
@ -242,9 +250,19 @@ import DeviceModelDetail from "@/views/dev/DeviceModelDetail.vue";
import inspectSetModifyDialog from "@/views/dev/InspectSetModifyDialog.vue";
import checkResultPanel from "@/views/dev/invDeviceEditDialog.vue";
import technical from "@/views/dev/invTechniclDialog.vue";
import {getBasicUnitMaintains, getCorpList} from "@/api/basic/basicUnitMaintain";
export default {
props: {
rowData: {
type: Object,
required: true
},
editSaveDev: {
type: Function,
required: true
}
},
name: "DeptDeviceDetail",
data() {
return {
@ -260,6 +278,7 @@ export default {
page: 1,
limit: 10,
},
maintainsList: [],
list: [],
total: 0,
deptList: [],
@ -328,6 +347,16 @@ export default {
};
},
methods: {
getBasicUnitMaintainsList() {
getCorpList()
.then((response) => {
this.maintainsList = response.data || [];
})
.catch(() => {
this.maintainsList = [];
});
},
listClick(row) {
this.selectedRowData = row // selectedRow
},
@ -530,10 +559,12 @@ export default {
technical,
deptDeviceModifyDialog,
inspectSetModifyDialog,
DeviceModelDetail
DeviceModelDetail,
deviceModifyDialog
},
created() {
this.getDeptList();
this.getBasicUnitMaintainsList();
},
};
</script>

@ -281,12 +281,12 @@ export default {
};
},
created() {
console.log("第一次this.rowData:")
console.log(this.rowData)
// if (this.rowData.editType == 1) {
// this.getDeviceCertList();
// }
this.getBasicUnitMaintainsList();
// console.log("this.rowData:")
// console.log(this.rowData)
// // if (this.rowData.editType == 1) {
// // this.getDeviceCertList();
// // }
// this.getBasicUnitMaintainsList();
this.headers = {
ADMINID: store.getters.adminId,
ADMINTOKEN: store.getters.token,

@ -1,5 +1,5 @@
<template>
<el-card style="margin: 5px;margin-top: -20px">
<!-- <el-card style="margin: 5px;margin-top: -20px">-->
<el-form :model="formData" ref="dataForm" :rules="rules" label-width="100px" style="margin-bottom: -15px">
<el-button-group style="display: flex;margin: 0px 0 10px 85%; height: 35px">
<el-button
@ -53,9 +53,9 @@
<el-form-item class="query-form-item" prop="originCode" label="设备编码:">
<el-input v-model="formData.deviceCode" placeholder="请输入编码" show-word-limit maxlength="11"
style="width: 90%" clearable></el-input>
<el-button class="ml5" type="text" @click="genCode()">
</el-button>
style="width: 90%" clearable disabled></el-input>
<!-- <el-button class="ml5" type="text" @click="genCode()">-->
<!-- </el-button>-->
</el-form-item>
</el-col>
<el-col :span="10">
@ -162,7 +162,7 @@
</el-col>
</el-row>
</el-form>
</el-card>
<!-- </el-card>-->
</template>
@ -288,6 +288,7 @@ export default {
},
},
created() {
console.log(this.rowData);
this.formData = JSON.parse(JSON.stringify(this.rowData));
console.log(this.formData);
},

@ -200,10 +200,22 @@
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col>
<el-form-item :label="createTitle+'说明:'">
<el-input type="textarea" resize="none" :autosize="{ minRows: 2, maxRows: 4 }" clearable show-word-limit
maxlength="300"
v-model="createData.remark"/>
<!-- <el-form-item :label="createTitle+'说明:'">-->
<!-- <el-input type="textarea" resize="none" :autosize="{ minRows: 2, maxRows: 4 }" clearable show-word-limit-->
<!-- maxlength="300"-->
<!-- v-model="createData.remark"/>-->
<!-- </el-form-item>-->
<el-form-item label="设备来源:">
<el-select v-model="createData.sourceType" style="width: 14%" placeholder="请选择设备来源"
clearable="true" @change="thirdSysChange">
<el-option
v-for="item in dict.type.device_source_type"
:key="item.value"
:label="item.label"
:value="item.value">
<span style="float: left;font-size: 13px">{{ item.label }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
@ -213,7 +225,7 @@
style="margin-top: 10px;">
<div slot="header" class="clearfix">
<div class="fr">
<el-button type="primary" @click="openChoose"></el-button>
<el-button type="primary" @click="openChoose" :disabled="createData.sourceType == null">添加设备</el-button>
<el-switch
class="ml10"
v-model="fullScreenFlag"
@ -222,7 +234,7 @@
</div>
</div>
<div class="mb10">
<el-tag class="ml5 mb5" type="info" color="#00a1ff" v-for="(v,i) in itemMap">{{ v[0] }} * {{ v[1] }}</el-tag>
<el-tag class="ml5 mb5" type="info" color="#00a1ff" v-for="(v,i) in itemMap" :key="v[0]">{{ v[0] }} * {{ v[1] }}</el-tag>
</div>
<el-table :data="itemList" width="100%" :height="fullScreenFlag?'93vh':'40vh'">
<el-table-column label="序号" type="index" width="50"/>
@ -328,6 +340,7 @@
<product style="margin: -30px -10px -10px -10px"
:is-choose="true"
:listType="2"
:attributeType="1"
:chooseFunc="chooseProduct"/>
</el-dialog>
@ -339,11 +352,16 @@
v-if="deviceInfoFlag"
@close="deviceInfoFlag = false"
>
<deviceModifyDialog
:rowData="curDevRow"
<!-- <deviceModifyDialog-->
<!-- :rowData="curDevRow"-->
<!-- :editSaveDev="editSaveDev"-->
<!-- >-->
<!-- </deviceModifyDialog> -->
<deptDeviceDetail
:rowData="this.curDevRow"
:editSaveDev="editSaveDev"
>
</deviceModifyDialog>
</deptDeviceDetail>
</el-dialog>
</div>
</template>

@ -279,12 +279,12 @@ export default {
};
},
created() {
console.log("第一次this.rowData:")
console.log(this.rowData)
// console.log("this.rowData:")
// console.log(this.rowData)
// if (this.rowData.editType == 1) {
// this.getDeviceCertList();
// }
this.getBasicUnitMaintainsList();
// this.getBasicUnitMaintainsList();
this.headers = {
ADMINID: store.getters.adminId,
ADMINTOKEN: store.getters.token,
@ -366,16 +366,6 @@ export default {
// this.getCompanyCertList();
this.getDeviceCertList();
},
getBasicUnitMaintainsList() {
getCorpList()
.then((response) => {
this.maintainsList = response.data || [];
})
.catch(() => {
this.maintainsList = [];
});
},
getDeviceCertList() {

@ -278,12 +278,12 @@ export default {
};
},
created() {
console.log("第一次this.rowData:")
console.log(this.rowData)
// if (this.rowData.editType == 1) {
// this.getDeviceCertList();
// }
this.getBasicUnitMaintainsList();
// console.log("this.rowData:")
// console.log(this.rowData)
// // if (this.rowData.editType == 1) {
// // this.getDeviceCertList();
// // }
// this.getBasicUnitMaintainsList();
this.headers = {
ADMINID: store.getters.adminId,
ADMINTOKEN: store.getters.token,

@ -11,6 +11,7 @@ import deviceInfo from "@/views/dev/deviceInfo.vue";
import product from "@/views/purchase/purApply/purOrderSelectProduct";
import {copyProperties} from "@/utils";
import deviceModifyDialog from "@/views/dev/devInfoEdit.vue";
import deptDeviceDetail from "@/views/dev/DeptDeviceDetail.vue";
import fa from "element-ui/src/locale/lang/fa";
let query = {
@ -55,12 +56,13 @@ let item = {
}
export default {
name: "deviceChangeOrder",
dicts: ['device_source_type'],
props: {
type: {
required: true,
}
},
components: {deviceInfo, product, deviceModifyDialog},
components: {deviceInfo, product, deviceModifyDialog,deptDeviceDetail},
computed: {
deviceChangeStatus() {
return deviceChangeStatus
@ -108,7 +110,7 @@ export default {
chooseDeviceFlag: false,
chooseProductFlag: false,
deviceInfoFlag: false,
createTitle: "设备入库",
createTitle: "设备登记",
curDevRow: null,
//==================================================
@ -122,7 +124,7 @@ export default {
this.locDeptName = this.$store.getters.locDeptName
if (this.type == deviceChangeType.ADD) {
this.createTitle = "设备入库";
this.createTitle = "设备登记";
} else if (this.type == deviceChangeType.CHANGE) {
this.createTitle = "设备变更";
} else if (this.type == deviceChangeType.DESTROY) {
@ -396,6 +398,7 @@ export default {
this.genCode(data)
data.productName = row.cpmctymc
data.productId = row.id
data.sourceType = this.createData.sourceType
this.itemList.push(data)
loading.close()
@ -593,7 +596,7 @@ export default {
changeOrderDetailByUser(this.detailQuery).then(res => {
this.detailLoading = false
if (res.code != 20000) {
this.$message.error(res.message)
// this.$message.error(res.message)
return
}
this.detailList = res.data.list || []

@ -420,7 +420,7 @@ export default {
if(this.editType == 1){
this.getCompanyCertList();
}
this.getBasicUnitMaintainsList();
// this.getBasicUnitMaintainsList();
this.headers = {
ADMINID: store.getters.adminId,
ADMINTOKEN: store.getters.token,

@ -217,6 +217,10 @@ export default {
type: Object,
required: true,
},
attributeType: {
type: Object,
required: true,
},
chooseFunc: {
required: false, type: Function
}
@ -234,6 +238,7 @@ export default {
ylqxzcrbarmc: null,
thrPiId: null,
pinyinInitial: null,
attributeType: null,
page: 1,
limit: 10,
},
@ -529,6 +534,7 @@ export default {
created() {
this.findBasicProductSet();
this.listQuery.attributeType = this.attributeType
if (this.$isNotBlank(this.data)) {
this.ids = [];
if (this.data.stockOrderLists.length > 0) {

@ -360,36 +360,49 @@ export default {
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.dictCode != undefined) {
updateData(this.form).then(response => {
this.$store.dispatch('dict/removeDict', this.queryParams.dictType);
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
if (response.code == 20000) {
this.$store.dispatch('dict/removeDict', this.queryParams.dictType)
this.$modal.msgSuccess('修改成功')
this.open = false
this.getList()
} else {
this.$modal.msgError(response.message)
}
})
} else {
addData(this.form).then(response => {
this.$store.dispatch('dict/removeDict', this.queryParams.dictType);
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
if (response.code == 20000) {
this.$store.dispatch('dict/removeDict', this.queryParams.dictType)
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
} else {
this.$modal.msgError(response.message)
}
})
}
}
});
})
},
/** 删除按钮操作 */
handleDelete(row) {
const dictCodes = row.dictCode || this.ids;
const dictCodes = row.dictCode || this.ids
this.$modal.confirm('是否确认删除字典编码为"' + dictCodes + '"的数据项?').then(function() {
return delData(dictCodes);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
this.$store.dispatch('dict/removeDict', this.queryParams.dictType);
}).catch(() => {});
return delData(dictCodes)
}).then((response) => {
if (response.code == 20000) {
this.getList()
this.$modal.msgSuccess('删除成功')
this.$store.dispatch('dict/removeDict', this.queryParams.dictType)
} else {
this.$modal.msgError(response.message)
}
}).catch(() => {
})
},
/** 导出按钮操作 */
handleExport() {

@ -291,33 +291,47 @@ export default {
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.dictId != undefined) {
updateType(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
if (response.code == 20000) {
this.$modal.msgSuccess('修改成功')
this.open = false
this.getList()
} else {
this.$modal.msgError(response.message)
}
})
} else {
addType(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
if (response.code == 20000) {
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
} else {
this.$modal.msgError(response.message)
}
})
}
}
});
})
},
/** 删除按钮操作 */
handleDelete(row) {
const dictIds = row.dictId || this.ids;
const dictIds = row.dictId || this.ids
this.$modal.confirm('是否确认删除字典编号为"' + dictIds + '"的数据项?').then(function() {
return delType(dictIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
return delType(dictIds)
}).then((response) => {
if (response.code == 20000) {
this.getList()
this.$modal.msgSuccess('删除成功')
} else {
this.$modal.msgError(response.message)
}
}).catch(() => {
})
},
/** 导出按钮操作 */
handleExport() {

Loading…
Cancel
Save