|
@@ -2,56 +2,92 @@
|
|
|
<div class="app-container">
|
|
|
<!-- 筛选条件 -->
|
|
|
<div>
|
|
|
- <el-form label-width="70px" size="small" label-position="left">
|
|
|
+ <el-form
|
|
|
+ ref="screenForm"
|
|
|
+ :model="screenForm"
|
|
|
+ label-width="70px"
|
|
|
+ size="small"
|
|
|
+ label-position="left"
|
|
|
+ >
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
|
- <el-form-item label="产品名称" prop="account">
|
|
|
- <el-input placeholder="请输入产品名称"></el-input>
|
|
|
+ <el-form-item label="产品名称" prop="name">
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入产品名称"
|
|
|
+ v-model="screenForm.name"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
|
- <el-form-item label="产品型号" prop="nickname">
|
|
|
- <el-input placeholder="请输入产品型号"></el-input>
|
|
|
+ <el-form-item label="产品型号" prop="type">
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入产品型号"
|
|
|
+ v-model="screenForm.type"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
|
- <el-form-item label="套机编码" prop="account">
|
|
|
- <el-input placeholder="请输入套机编码"></el-input>
|
|
|
+ <el-form-item label="套机编码" prop="number">
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入套机编码"
|
|
|
+ v-model="screenForm.number"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
|
- <el-form-item label="产品体积" prop="nickname">
|
|
|
- <el-input placeholder="请输入产品体积"></el-input>
|
|
|
+ <el-form-item label="产品体积" prop="volume">
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入产品体积"
|
|
|
+ v-model="screenForm.volume"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
|
- <el-form-item label="外机名称" prop="nickname">
|
|
|
- <el-input placeholder="请输入外机名称"></el-input>
|
|
|
+ <el-form-item label="外机名称" prop="outsideName">
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入外机名称"
|
|
|
+ v-model="screenForm.outsideName"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
|
<el-form-item label="外机型号" prop="nickname">
|
|
|
- <el-input placeholder="请输入外机型号"></el-input>
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入外机型号"
|
|
|
+ v-model="screenForm.outsideType"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
|
- <el-form-item label="外机编码" prop="nickname">
|
|
|
- <el-input placeholder="请输入内机编码"></el-input>
|
|
|
+ <el-form-item label="外机编码" prop="outsideNumber">
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入内机编码"
|
|
|
+ v-model="screenForm.outsideNumber"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
|
- <el-form-item label="内机名称" prop="nickname">
|
|
|
- <el-input placeholder="请输入内机名称"></el-input>
|
|
|
+ <el-form-item label="内机名称" prop="innerName">
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入内机名称"
|
|
|
+ v-model="screenForm.innerName"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
|
- <el-form-item label="内机型号" prop="nickname">
|
|
|
- <el-input placeholder="请输入内机型号"></el-input>
|
|
|
+ <el-form-item label="内机型号" prop="innerType">
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入内机型号"
|
|
|
+ v-model="screenForm.innerType"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
|
- <el-form-item label="内机编码" prop="nickname">
|
|
|
- <el-input placeholder="请输入内机编码"></el-input>
|
|
|
+ <el-form-item label="内机编码" prop="innerNumber">
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入内机编码"
|
|
|
+ v-model="screenForm.innerNumber"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
@@ -69,14 +105,38 @@
|
|
|
<!-- 按钮 -->
|
|
|
<div class="btn-group clearfix">
|
|
|
<div class="fl">
|
|
|
- <el-button type="primary" size="small">新增</el-button>
|
|
|
- <el-button type="primary" size="small">编辑</el-button>
|
|
|
- <el-button type="primary" size="small">删除</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ @click="(showDialogForm = true), (type = 1)"
|
|
|
+ >新增</el-button
|
|
|
+ >
|
|
|
+
|
|
|
+ <el-popconfirm
|
|
|
+ confirm-button-text="好的"
|
|
|
+ cancel-button-text="不用了"
|
|
|
+ icon="el-icon-info"
|
|
|
+ icon-color="red"
|
|
|
+ title="内容确定删除吗?"
|
|
|
+ @onConfirm="hanleDelete"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ slot="reference"
|
|
|
+ class="el-popover-left"
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
+ </el-popconfirm>
|
|
|
</div>
|
|
|
<div class="fr">
|
|
|
<el-button type="primary" size="small">导入</el-button>
|
|
|
- <el-button type="primary" size="small">导出</el-button>
|
|
|
- <el-button type="primary" size="small">打印</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="handleExport"
|
|
|
+ >导出</el-button
|
|
|
+ >
|
|
|
+ <el-button type="primary" @click="hanlePrint" size="small"
|
|
|
+ >打印</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="mymain-container">
|
|
@@ -89,6 +149,8 @@
|
|
|
border
|
|
|
fit
|
|
|
highlight-current-row
|
|
|
+ @select-all="hanleSelectAll"
|
|
|
+ @select="hanleSelectAll"
|
|
|
stripe
|
|
|
>
|
|
|
<el-table-column type="selection" align="center"></el-table-column>
|
|
@@ -102,48 +164,48 @@
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
label="产品型号"
|
|
|
- prop="number"
|
|
|
+ prop="productModel"
|
|
|
min-width="160"
|
|
|
show-overflow-tooltip
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
label="套机编码"
|
|
|
- prop="code"
|
|
|
+ prop="composeNumber"
|
|
|
min-width="160"
|
|
|
show-overflow-tooltip
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
label="体积"
|
|
|
- prop="volume"
|
|
|
+ prop="productVolume"
|
|
|
min-width="160"
|
|
|
show-overflow-tooltip
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
label="内机编码"
|
|
|
- prop="inCode"
|
|
|
+ prop="innerMachineNumber"
|
|
|
min-width="160"
|
|
|
show-overflow-tooltip
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
label="外机编码"
|
|
|
- prop="outCode"
|
|
|
+ prop="outsideMachineNumber"
|
|
|
min-width="160"
|
|
|
show-overflow-tooltip
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
label="配件1"
|
|
|
- prop="partsOne"
|
|
|
+ prop="parts1"
|
|
|
min-width="160"
|
|
|
show-overflow-tooltip
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
- label="配件2"
|
|
|
+ label="parts2"
|
|
|
prop="partsTwo"
|
|
|
min-width="160"
|
|
|
show-overflow-tooltip
|
|
@@ -151,14 +213,14 @@
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
label="创建人"
|
|
|
- prop="create"
|
|
|
+ prop="createBy"
|
|
|
min-width="160"
|
|
|
show-overflow-tooltip
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
label="创建时间"
|
|
|
- prop="createDate"
|
|
|
+ prop="createTime"
|
|
|
min-width="160"
|
|
|
show-overflow-tooltip
|
|
|
></el-table-column>
|
|
@@ -166,14 +228,14 @@
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
label="更新人"
|
|
|
- prop="update"
|
|
|
+ prop="updateBy"
|
|
|
min-width="160"
|
|
|
show-overflow-tooltip
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
label="更新时间"
|
|
|
- prop="updateDate"
|
|
|
+ prop="updateTime"
|
|
|
min-width="160"
|
|
|
show-overflow-tooltip
|
|
|
></el-table-column>
|
|
@@ -184,16 +246,37 @@
|
|
|
min-width="160"
|
|
|
show-overflow-tooltip
|
|
|
>
|
|
|
- <el-button type="text" class="textColor" @click="editFn"
|
|
|
- >编辑</el-button
|
|
|
- >
|
|
|
- <el-button type="text" class="textColor">删除</el-button>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ class="textColor"
|
|
|
+ @click="editFn(scope.row.id, scope.row)"
|
|
|
+ >编辑</el-button
|
|
|
+ >
|
|
|
+ <el-popconfirm
|
|
|
+ confirm-button-text="好的"
|
|
|
+ cancel-button-text="不用了"
|
|
|
+ icon="el-icon-info"
|
|
|
+ icon-color="red"
|
|
|
+ title="内容确定删除吗?"
|
|
|
+ @onConfirm="hanleDelete(scope.row.id)"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ slot="reference"
|
|
|
+ type="text"
|
|
|
+ class="textColor el-popover-left"
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
+ </el-popconfirm>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
<!-- 分页 -->
|
|
|
<div class="fr">
|
|
|
<el-pagination
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
:current-page="currentPage"
|
|
|
:page-sizes="[10, 20, 30, 50]"
|
|
|
:page-size="10"
|
|
@@ -214,7 +297,7 @@
|
|
|
>
|
|
|
<el-form ref="form" :model="diaLogForm" label-width="100px">
|
|
|
<el-form-item label="产品名称">
|
|
|
- <el-select
|
|
|
+ <!-- <el-select
|
|
|
v-model="diaLogForm.positionName"
|
|
|
multiple
|
|
|
placeholder="请选择"
|
|
@@ -226,16 +309,17 @@
|
|
|
:value="item.value"
|
|
|
>
|
|
|
</el-option>
|
|
|
- </el-select>
|
|
|
+ </el-select> -->
|
|
|
+ <el-input v-model="diaLogForm.storeName"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="产品型号">
|
|
|
- <el-input v-model="diaLogForm.storeName"></el-input>
|
|
|
+ <el-input v-model="diaLogForm.productModel"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="套机棉麻">
|
|
|
- <el-input v-model="diaLogForm.alert"></el-input>
|
|
|
+ <!-- <el-input v-model="diaLogForm.alert"></el-input> -->
|
|
|
</el-form-item>
|
|
|
<el-form-item label="产品体积">
|
|
|
- <el-input v-model="diaLogForm.alert"></el-input>
|
|
|
+ <el-input v-model="diaLogForm.productVolume"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="内机编码">
|
|
|
<el-select
|
|
@@ -300,16 +384,25 @@
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click="showDialogForm = false">取 消</el-button>
|
|
|
- <el-button type="primary" @click="showDialogForm = false"
|
|
|
- >确 定</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" @click="hanleInfo">确 定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
-
|
|
|
+<!-- /product-compose/export -->
|
|
|
<script>
|
|
|
+import Mixin from "@/mixin/index";
|
|
|
+import { downloadFiles, handleImport } from "@/utils/util";
|
|
|
+
|
|
|
+import {
|
|
|
+ getProductList,
|
|
|
+ getProductEdit,
|
|
|
+ getProductDetail,
|
|
|
+ getProductDel,
|
|
|
+ getProductAdd,
|
|
|
+} from "@/api/basic_data/material";
|
|
|
export default {
|
|
|
+ mixins: [Mixin],
|
|
|
data() {
|
|
|
return {
|
|
|
currentPage: 1, // 当前页码
|
|
@@ -338,10 +431,16 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
diaLogForm: {
|
|
|
- storeName: "",
|
|
|
- positionName: [],
|
|
|
- alert: "",
|
|
|
- text: "",
|
|
|
+ id: null,
|
|
|
+ composeNumber: "5464",
|
|
|
+ items: [
|
|
|
+ { id: "1", innerOutsideMachineId: "dfsf", parentId: "dsfs" },
|
|
|
+ { id: "2", innerOutsideMachineId: "dfsf", parentId: "sdfdsf" },
|
|
|
+ ],
|
|
|
+ materialId: "454",
|
|
|
+ orgNumber: 454,
|
|
|
+ productModel: "5454545",
|
|
|
+ productVolume: 2,
|
|
|
},
|
|
|
showDialogForm: false,
|
|
|
dataList: [
|
|
@@ -403,15 +502,127 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
searchForm: {
|
|
|
- positionName: "",
|
|
|
- storeName: "",
|
|
|
+ innerName: "",
|
|
|
+ innerNumber: "",
|
|
|
+ innerType: "",
|
|
|
+ name: "",
|
|
|
+ number: "",
|
|
|
+ outsideName: "",
|
|
|
+ outsideNumber: "",
|
|
|
+ outsideType: "",
|
|
|
+ type: "",
|
|
|
+ volume: "",
|
|
|
},
|
|
|
+ type: null,
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- editFn() {
|
|
|
+ getList() {
|
|
|
+ this.listLoading = true;
|
|
|
+ let params = {
|
|
|
+ pageNum: this.currentPage,
|
|
|
+ pageSize: this.pageSize,
|
|
|
+ innerName: this.searchForm.innerName,
|
|
|
+ innerNumber: this.searchForm.innerNumber,
|
|
|
+ innerType: this.searchForm.innerType,
|
|
|
+ name: this.searchForm.name,
|
|
|
+ number: this.searchForm.number,
|
|
|
+ outsideName: this.searchForm.outsideName,
|
|
|
+ outsideNumber: this.searchForm.outsideNumber,
|
|
|
+ outsideType: this.searchForm.outsideType,
|
|
|
+ type: this.searchForm.type,
|
|
|
+ volume: this.searchForm.volume,
|
|
|
+ };
|
|
|
+ getProductList(params).then((res) => {
|
|
|
+ this.dataList = res.data.records;
|
|
|
+ this.listTotal = res.data.total;
|
|
|
+ this.listLoading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ editFn(id, row) {
|
|
|
+ this.type = 2;
|
|
|
+ this.diaLogForm = {
|
|
|
+ id,
|
|
|
+ composeNumber: row.composeNumber,
|
|
|
+ items:
|
|
|
+ row.items === undefined
|
|
|
+ ? [
|
|
|
+ { id: "1", innerOutsideMachineId: "df", parentId: "dsf" },
|
|
|
+ { id: "2", innerOutsideMachineId: "ew", parentId: "wew" },
|
|
|
+ ]
|
|
|
+ : row.items,
|
|
|
+ materialId: row.materialId,
|
|
|
+ orgNumber: row.orgNumber,
|
|
|
+ productModel: row.productModel,
|
|
|
+ productVolume: row.productVolume,
|
|
|
+ positionName: row.positionName,
|
|
|
+ };
|
|
|
+
|
|
|
this.showDialogForm = true;
|
|
|
},
|
|
|
+ hanleInfo() {
|
|
|
+ if (this.type === 1) {
|
|
|
+
|
|
|
+ // {
|
|
|
+
|
|
|
+ // }
|
|
|
+ getProductAdd(this.diaLogForm).then((res) => {
|
|
|
+ this.$successMsg("保存成功");
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ } else if (this.type === 2) {
|
|
|
+ const params = {
|
|
|
+ composeNumber: this.diaLogForm.composeNumber,
|
|
|
+ id: this.diaLogForm.id,
|
|
|
+ items: [
|
|
|
+ {
|
|
|
+ id: "445",
|
|
|
+ innerOutsideMachineId: "4545",
|
|
|
+ parentId: "4554",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ materialId: this.diaLogForm.materialId,
|
|
|
+ orgNumber: this.diaLogForm.orgNumber,
|
|
|
+ productModel: this.diaLogForm.productModel,
|
|
|
+ productVolume: this.diaLogForm.productVolume,
|
|
|
+ };
|
|
|
+ getProductEdit(params).then((res) => {
|
|
|
+ this.$successMsg("编辑成功");
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ this.diaLogForm.id = null;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.showDialogForm = false;
|
|
|
+ },
|
|
|
+ hanleDelete(id) {
|
|
|
+ this.hanleDeleteAllPromise(id).then((ids) => {
|
|
|
+ getProductDel({ ids: ids.join(",") }).then((res) => {
|
|
|
+ this.$successMsg("删除成功");
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleExport() {
|
|
|
+ let screenData = {
|
|
|
+ customerName: this.screenForm.customerName,
|
|
|
+ freeDay: this.screenForm.freeDay,
|
|
|
+ toll: this.screenForm.toll,
|
|
|
+ };
|
|
|
+ downloadFiles("/product-compose/export", screenData);
|
|
|
+ },
|
|
|
+ resetInfo() {
|
|
|
+ this.diaLogForm = {
|
|
|
+ id: null,
|
|
|
+ composeNumber: "",
|
|
|
+ id: "",
|
|
|
+ items: [],
|
|
|
+ materialId: "",
|
|
|
+ orgNumber: 0,
|
|
|
+ productModel: "",
|
|
|
+ productVolume: "",
|
|
|
+ };
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -420,4 +631,4 @@ export default {
|
|
|
::v-deep .el-select {
|
|
|
width: 100%;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|