|
@@ -35,139 +35,144 @@
|
|
|
<!-- <el-button type="primary" size="mini" @click="importExcel" v-db-click>导入Excel</el-button> -->
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
-
|
|
|
<div style="margin-bottom: 15px" v-if="selectStatus"></div>
|
|
|
- <el-table
|
|
|
- v-loading="loadingTable"
|
|
|
- :data="productList"
|
|
|
- size="small"
|
|
|
- :row-style="{ height: '35px' }"
|
|
|
- :cell-style="{ padding: '0' }"
|
|
|
- header-row-class-name="tableHeader"
|
|
|
- :default-expand-all="selectStatus"
|
|
|
- >
|
|
|
- <el-table-column label="" type="expand" width="50">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div style="padding: 0px 20px; box-sizing: border-box">
|
|
|
- <div
|
|
|
- v-for="(color, index) in scope.row.colors"
|
|
|
- :key="color.id"
|
|
|
- style="display: flex; padding: 3px 10px; align-items: center; box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1); margin-bottom: 8px"
|
|
|
- >
|
|
|
- <div style="width: 80px">
|
|
|
- <div v-if="color.colorAccessory">
|
|
|
- <img
|
|
|
- v-if="!color.colorAccessory.includes('https')"
|
|
|
- style="width: 40px; height: 40px; object-fit: contain; vertical-align: middle; border: none; cursor: pointer"
|
|
|
- :src="pathPrefix + color.colorAccessory"
|
|
|
- @click="openFile(pathPrefix + color.colorAccessory)"
|
|
|
- />
|
|
|
- <img
|
|
|
+
|
|
|
+ <div style="width: 100%; position: relative">
|
|
|
+ <div style="position: absolute; right: 0; top: -34px; width: 120px; text-align: center">
|
|
|
+ <el-button type="primary" size="mini" @click="openOperationLog = true" v-db-click>操作日志</el-button>
|
|
|
+ </div>
|
|
|
+ <el-table
|
|
|
+ v-loading="loadingTable"
|
|
|
+ :data="productList"
|
|
|
+ size="small"
|
|
|
+ :row-style="{ height: '35px' }"
|
|
|
+ :cell-style="{ padding: '0' }"
|
|
|
+ header-row-class-name="tableHeader"
|
|
|
+ :default-expand-all="selectStatus"
|
|
|
+ >
|
|
|
+ <el-table-column label="" type="expand" width="50">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div style="padding: 0px 20px; box-sizing: border-box">
|
|
|
+ <div
|
|
|
+ v-for="(color, index) in scope.row.colors"
|
|
|
+ :key="color.id"
|
|
|
+ style="display: flex; padding: 3px 10px; align-items: center; box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1); margin-bottom: 8px"
|
|
|
+ >
|
|
|
+ <div style="width: 80px">
|
|
|
+ <div v-if="color.colorAccessory">
|
|
|
+ <img
|
|
|
+ v-if="!color.colorAccessory.includes('https')"
|
|
|
+ style="width: 40px; height: 40px; object-fit: contain; vertical-align: middle; border: none; cursor: pointer"
|
|
|
+ :src="pathPrefix + color.colorAccessory"
|
|
|
+ @click="openFile(pathPrefix + color.colorAccessory)"
|
|
|
+ />
|
|
|
+ <img
|
|
|
+ v-else
|
|
|
+ style="width: 40px; height: 40px; object-fit: contain; vertical-align: middle; border: none; cursor: pointer"
|
|
|
+ :src="color.colorAccessory"
|
|
|
+ @click="openFile(color.colorAccessory)"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
v-else
|
|
|
- style="width: 40px; height: 40px; object-fit: contain; vertical-align: middle; border: none; cursor: pointer"
|
|
|
- :src="color.colorAccessory"
|
|
|
- @click="openFile(color.colorAccessory)"
|
|
|
- />
|
|
|
+ class="el-icon-picture-outline"
|
|
|
+ style="width: 40px; height: 40px; font-size: 36px; line-height: 40px; text-align: center; color: rgb(229 228 228)"
|
|
|
+ ></div>
|
|
|
</div>
|
|
|
- <div
|
|
|
- v-else
|
|
|
- class="el-icon-picture-outline"
|
|
|
- style="width: 40px; height: 40px; font-size: 36px; line-height: 40px; text-align: center; color: rgb(229 228 228)"
|
|
|
- ></div>
|
|
|
- </div>
|
|
|
- <div style="width: 80px" v-if="userInfo.subsidiaryId">
|
|
|
- <div v-if="color.designSketch">
|
|
|
- <img
|
|
|
- v-if="!color.designSketch.includes('https')"
|
|
|
- style="width: 40px; height: 40px; object-fit: contain; vertical-align: middle; border: none; cursor: pointer"
|
|
|
- :src="pathPrefix + color.designSketch"
|
|
|
- @click="openFile(pathPrefix + color.designSketch)"
|
|
|
- />
|
|
|
- <img
|
|
|
+ <div style="width: 80px" v-if="userInfo.subsidiaryId">
|
|
|
+ <div v-if="color.designSketch">
|
|
|
+ <img
|
|
|
+ v-if="!color.designSketch.includes('https')"
|
|
|
+ style="width: 40px; height: 40px; object-fit: contain; vertical-align: middle; border: none; cursor: pointer"
|
|
|
+ :src="pathPrefix + color.designSketch"
|
|
|
+ @click="openFile(pathPrefix + color.designSketch)"
|
|
|
+ />
|
|
|
+ <img
|
|
|
+ v-else
|
|
|
+ style="width: 40px; height: 40px; object-fit: contain; vertical-align: middle; border: none; cursor: pointer"
|
|
|
+ :src="color.designSketch"
|
|
|
+ @click="openFile(color.designSketch)"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
v-else
|
|
|
- style="width: 40px; height: 40px; object-fit: contain; vertical-align: middle; border: none; cursor: pointer"
|
|
|
- :src="color.designSketch"
|
|
|
- @click="openFile(color.designSketch)"
|
|
|
- />
|
|
|
+ class="el-icon-picture-outline"
|
|
|
+ style="width: 40px; height: 40px; font-size: 36px; line-height: 40px; text-align: center; color: rgb(229 228 228)"
|
|
|
+ ></div>
|
|
|
+ </div>
|
|
|
+ <div style="width: 140px">
|
|
|
+ {{ color.specCode }}
|
|
|
+ </div>
|
|
|
+ <div style="flex: 1">
|
|
|
+ {{ color.nameChinese }}
|
|
|
+ </div>
|
|
|
+ <div style="width: 160px">
|
|
|
+ {{ `${color.length} * ${color.width} * ${color.height}(cm³)` }}
|
|
|
+ </div>
|
|
|
+ <div style="width: 60px; text-align: center" v-if="selectStatus">
|
|
|
+ <el-button type="text" @click="handleSelect(scope.row, index)" v-db-click>选择</el-button>
|
|
|
</div>
|
|
|
- <div
|
|
|
- v-else
|
|
|
- class="el-icon-picture-outline"
|
|
|
- style="width: 40px; height: 40px; font-size: 36px; line-height: 40px; text-align: center; color: rgb(229 228 228)"
|
|
|
- ></div>
|
|
|
- </div>
|
|
|
- <div style="width: 140px">
|
|
|
- {{ color.specCode }}
|
|
|
- </div>
|
|
|
- <div style="flex: 1">
|
|
|
- {{ color.nameChinese }}
|
|
|
- </div>
|
|
|
- <div style="width: 160px">
|
|
|
- {{ `${color.length} * ${color.width} * ${color.height}(cm³)` }}
|
|
|
- </div>
|
|
|
- <div style="width: 60px; text-align: center" v-if="selectStatus">
|
|
|
- <el-button type="text" @click="handleSelect(scope.row, index)" v-db-click>选择</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <!-- <el-table-column label="图片" width="80">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div v-if="scope.row.pic">
|
|
|
- <img
|
|
|
- v-if="!scope.row.pic.includes('https')"
|
|
|
- style="width: 50px; height: 50px; object-fit: contain; vertical-align: middle; border: none; padding: 8px 0; cursor: pointer"
|
|
|
- :src="pathPrefix + scope.row.pic"
|
|
|
- @click="openFile(pathPrefix + scope.row.pic)"
|
|
|
- />
|
|
|
- <img
|
|
|
- v-else
|
|
|
- style="width: 50px; height: 50px; object-fit: contain; vertical-align: middle; border: none; padding: 8px 0; cursor: pointer"
|
|
|
- :src="scope.row.pic"
|
|
|
- @click="openFile(scope.row.pic)"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column> -->
|
|
|
- <el-table-column label="归属单位" prop="subsidiaryName" width="120" v-if="userInfo.subsidiaryId">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span v-if="scope.row.subsidiaryName">{{ scope.row.subsidiaryName }}</span>
|
|
|
- <span v-else>胜德集团</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="群组品号" prop="code" width="120"> </el-table-column>
|
|
|
- <el-table-column label="群组品名" min-width="220">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div>
|
|
|
- <a style="color: #409eff; cursor: pointer" @click="clickProductName(scope.row)">{{ scope.row.nameChinese }}</a>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="产品来源" width="100" v-if="!selectStatus">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span v-if="scope.row.dataResource == 0">MES</span>
|
|
|
- <span v-else>万里牛</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="品牌" prop="brandName" width="100" />
|
|
|
- <el-table-column label="型号" prop="productModelChinese" min-width="150" />
|
|
|
- <el-table-column label="材质" prop="materialChinese" min-width="150" />
|
|
|
- <el-table-column label="操作" align="center" width="120" fixed="right" v-if="!selectStatus">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div>
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- v-if="!userInfo.subsidiaryId || (userInfo.subsidiaryId && userInfo.subsidiaryId === scope.row.subsidiaryId)"
|
|
|
- @click="handleUpdate(scope.row)"
|
|
|
- v-db-click
|
|
|
- >编辑</el-button
|
|
|
- >
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!-- <el-table-column label="图片" width="80">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-if="scope.row.pic">
|
|
|
+ <img
|
|
|
+ v-if="!scope.row.pic.includes('https')"
|
|
|
+ style="width: 50px; height: 50px; object-fit: contain; vertical-align: middle; border: none; padding: 8px 0; cursor: pointer"
|
|
|
+ :src="pathPrefix + scope.row.pic"
|
|
|
+ @click="openFile(pathPrefix + scope.row.pic)"
|
|
|
+ />
|
|
|
+ <img
|
|
|
+ v-else
|
|
|
+ style="width: 50px; height: 50px; object-fit: contain; vertical-align: middle; border: none; padding: 8px 0; cursor: pointer"
|
|
|
+ :src="scope.row.pic"
|
|
|
+ @click="openFile(scope.row.pic)"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column> -->
|
|
|
+ <el-table-column label="归属单位" prop="subsidiaryName" width="120" v-if="userInfo.subsidiaryId">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.subsidiaryName">{{ scope.row.subsidiaryName }}</span>
|
|
|
+ <span v-else>胜德集团</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="群组品号" prop="code" width="120"> </el-table-column>
|
|
|
+ <el-table-column label="群组品名" min-width="220">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ <a style="color: #409eff; cursor: pointer" @click="clickProductName(scope.row)">{{ scope.row.nameChinese }}</a>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="产品来源" width="100" v-if="!selectStatus">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.dataResource == 0">MES</span>
|
|
|
+ <span v-else>万里牛</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="品牌" prop="brandName" width="100" />
|
|
|
+ <el-table-column label="型号" prop="productModelChinese" min-width="150" />
|
|
|
+ <el-table-column label="材质" prop="materialChinese" min-width="150" />
|
|
|
+ <el-table-column label="操作" align="center" width="120" fixed="right" v-if="!selectStatus">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ v-if="!userInfo.subsidiaryId || (userInfo.subsidiaryId && userInfo.subsidiaryId === scope.row.subsidiaryId)"
|
|
|
+ @click="handleUpdate(scope.row)"
|
|
|
+ v-db-click
|
|
|
+ >编辑</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
|
|
+ </div>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -245,6 +250,13 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog title="操作日志" v-if="openOperationLog" :visible.sync="openOperationLog" width="50%" append-to-body>
|
|
|
+ <OperationLog :operationLogKey="operationLogKey"></OperationLog>
|
|
|
+ <div style="text-align: center; margin-top: 20px">
|
|
|
+ <el-button @click="openOperationLog = false" v-db-click>关 闭</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -256,10 +268,11 @@ import Product from '@/views/AddOrModifiedProduct/Product'
|
|
|
import ProductOne from '@/views/AddOrModifiedProduct/ProductOne'
|
|
|
import ProductDetails from '@/views/shengde/product/management/details'
|
|
|
import { getDetail } from '@/api/shengde/group/subcompany/subcompanyManagement/index.js'
|
|
|
+import OperationLog from '@/components/shengde/operationLog/index'
|
|
|
|
|
|
export default {
|
|
|
name: 'ProductManagement',
|
|
|
- components: { Product, ProductOne, ProductDetails },
|
|
|
+ components: { Product, ProductOne, ProductDetails, OperationLog },
|
|
|
props: {
|
|
|
selectStatus: {
|
|
|
type: Boolean,
|
|
@@ -331,6 +344,8 @@ export default {
|
|
|
errMsg: '',
|
|
|
openImportExcel: false,
|
|
|
actionProduct: process.env.VUE_APP_ACTION_PRODUCT_URL,
|
|
|
+ openOperationLog: false,
|
|
|
+ operationLogKey: 20,
|
|
|
}
|
|
|
},
|
|
|
created() {
|