|
@@ -9,25 +9,8 @@
|
|
|
:show-close="false"
|
|
|
append-to-body
|
|
|
@close="onClose">
|
|
|
- <div class="drawer__panel">
|
|
|
+ <div class="drawer__panel" style="padding-bottom: 36px;">
|
|
|
<div class="flex-between">
|
|
|
- <el-select v-model="sa_brandid" placeholder="选择品牌" size="small" clearable class="inline-24" @change="brandChange" :disabled="querySa_brandid > 0">
|
|
|
- <el-option
|
|
|
- v-for="item in options.brands"
|
|
|
- :key="item.sa_brandid"
|
|
|
- :label="item.brandname"
|
|
|
- :value="item.sa_brandid">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- <el-cascader
|
|
|
- placeholder="选择分类" size="small"
|
|
|
- v-model="itemclassid"
|
|
|
- :options="options.itemclass"
|
|
|
- :props="{ checkStrictly: true,children:'subdep',label:'itemclassname',value:'itemclassid' }"
|
|
|
- clearable @change="classChange"></el-cascader>
|
|
|
- <slot name="optionSystem"></slot>
|
|
|
- </div>
|
|
|
- <div class="top-margin">
|
|
|
<uploadAllData
|
|
|
class="inline-16"
|
|
|
:total="total"
|
|
@@ -38,31 +21,14 @@
|
|
|
<el-button :disabled="items.length === 0" :type="items.length > 0?'primary':''" size="small" class="inline-24 bottom-margin" @click="batchAdd">添加选中商品</el-button>
|
|
|
<el-input style="width:200px;" placeholder="商品名称/编码/品号" :suffix-icon="params.content.where.condition?params.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="params.content.where.condition" @keyup.native.enter="listData(params.content.pageNumber = 1)" @clear="listData(params.content.pageNumber = 1)" size="small" class="input-with-select inline-24 layout_search__panel bottom-margin" clearable>
|
|
|
</el-input>
|
|
|
- <el-select v-model="itemstandard" placeholder="选择标准" size="small" clearable class="inline-24 bottom-margin" @change="queryChange">
|
|
|
- <el-option
|
|
|
- v-for="item in options.itemstandards"
|
|
|
- :key="item.value"
|
|
|
- :label="item.value"
|
|
|
- :value="item.value">
|
|
|
- <span style="float: left">{{ item.value }}</span>
|
|
|
- <span style="float: right; color: #8492a6; font-size: 12px">{{ item.remarks?item.remarks:'暂无描述' }}</span>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- <el-select v-model="itemmaterial" placeholder="选择材质" size="small" clearable class="inline-24 bottom-margin" @change="queryChange">
|
|
|
- <el-option
|
|
|
- v-for="item in options.itemmaterials"
|
|
|
- :key="item.value"
|
|
|
- :label="item.value"
|
|
|
- :value="item.value">
|
|
|
- <span style="float: left">{{ item.value }}</span>
|
|
|
- <span style="float: right; color: #8492a6; font-size: 12px">{{ item.remarks?item.remarks:'暂无描述' }}</span>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
<el-input style="width:200px;" placeholder="型号" :suffix-icon="params.content.where.model?params.content.where.model.length > 0?'':'':'el-icon-search'" v-model="params.content.where.model" @keyup.native.enter="listData(params.content.pageNumber = 1)" @clear="listData(params.content.pageNumber = 1)" size="small" class="bottom-margin input-with-select inline-24 layout_search__panel" clearable>
|
|
|
</el-input>
|
|
|
<el-input style="width:200px;" placeholder="规格" :suffix-icon="params.content.where.spec?params.content.where.spec.length > 0?'':'':'el-icon-search'" v-model="params.content.where.spec" @keyup.native.enter="listData(params.content.pageNumber = 1)" @clear="listData(params.content.pageNumber = 1)" size="small" class="bottom-margin input-with-select inline-24 layout_search__panel" clearable>
|
|
|
</el-input>
|
|
|
+ <slot name="optionSystem"></slot>
|
|
|
</div>
|
|
|
+ <selectClass ref="class" @clickAreaBase="clickAreaBase" @brandChange="brandChange" @onClassChange="onClassChange" @Search="Search" @clearSearch="clearSearch" @clickField="clickField" :default="true"></selectClass>
|
|
|
+ <div style="width: 100%;border-bottom: 1px solid #ebeef5;margin-bottom: 10px;"></div>
|
|
|
<div >
|
|
|
<tableTemp ref="tableTemp" :data="list" :layout="tablecolsAdd" :opwidth="200" :custom="true" height="calc(100vh - 370px)" @checkboxCallBack="checkboxCallBack" fixedName="operation">
|
|
|
<template v-slot:customcol="scope">
|
|
@@ -97,10 +63,16 @@
|
|
|
import tableTemp from './table'
|
|
|
import uploadAllData from '@/components/uploadAllData/index'
|
|
|
import previewImage from '@/components/previewImage/index'
|
|
|
+import selectClass from '@/SDrpManagement/ProductGroup/modules/Select2.vue'
|
|
|
export default {
|
|
|
name: "index",
|
|
|
props:["data","tradefield","discountrate","params","title","tablecolsAdd","sa_projectid","querySa_brandid","typeName"],
|
|
|
- components:{tableTemp,uploadAllData,previewImage},
|
|
|
+ components:{tableTemp,uploadAllData,previewImage,selectClass},
|
|
|
+ provide () {
|
|
|
+ return {
|
|
|
+ sys_enterpriseid:() => ''
|
|
|
+ }
|
|
|
+ },
|
|
|
data(){
|
|
|
return {
|
|
|
dialogFormVisible:false,
|
|
@@ -157,6 +129,8 @@ export default {
|
|
|
if (this.typeName === '居间'){
|
|
|
this.params.id = 20221124093602
|
|
|
}
|
|
|
+ console.log(this.params.id);
|
|
|
+
|
|
|
this.params.content.where.tradefield = this.tradefield
|
|
|
const res = await this.$api.requested(this.params)
|
|
|
this.list = res.data
|
|
@@ -179,11 +153,6 @@ export default {
|
|
|
this.sa_brandid = res.data[0].sa_brandid
|
|
|
this.queryClass()
|
|
|
},
|
|
|
- brandChange(){
|
|
|
- this.params.content.where.sa_brandid = this.sa_brandid
|
|
|
- this.listData(this.params.content.pageNumber = 1)
|
|
|
- this.queryClass()
|
|
|
- },
|
|
|
/*获取分类*/
|
|
|
async queryClass () {
|
|
|
const res = await this.$api.requested({
|
|
@@ -239,6 +208,33 @@ export default {
|
|
|
this.options.itemclass = arr
|
|
|
return arr
|
|
|
},
|
|
|
+ brandChange(id){
|
|
|
+ this.params.content.where.sa_brandid = this.params.id == 20221021171802 ?id[0]:id
|
|
|
+ this.$refs.class.clickClass(false)
|
|
|
+ this.listData(this.params.content.pageNumber = 1)
|
|
|
+ },
|
|
|
+ onClassChange (n) {
|
|
|
+ this.params.content.where.itemclassid = n.itemclassid
|
|
|
+ this.listData(this.params.content.pageNumber = 1)
|
|
|
+ },
|
|
|
+ clickField (item) {
|
|
|
+ this.params.content.where.tradefield = item.tradefield
|
|
|
+ this.listData(this.params.content.pageNumber = 1)
|
|
|
+ },
|
|
|
+ clickAreaBase (item) {
|
|
|
+ this.params.content.where.standards = item
|
|
|
+ this.listData(this.params.content.pageNumber = 1)
|
|
|
+ },
|
|
|
+ Search(data) {
|
|
|
+ this.params.content.where.condition = data
|
|
|
+ this.params.content.pageNumber = 1
|
|
|
+ this.listData(this.params.content.pageNumber = 1)
|
|
|
+ },
|
|
|
+ clearSearch() {
|
|
|
+ this.params.content.where.condition = ''
|
|
|
+ this.params.content.pageNumber = 1
|
|
|
+ this.listData(this.params.content.pageNumber = 1)
|
|
|
+ },
|
|
|
classChange(){
|
|
|
this.params.content.where.itemclassid = this.itemclassid[this.itemclassid.length -1]
|
|
|
this.listData(this.params.content.pageNumber = 1)
|
|
@@ -314,7 +310,7 @@ export default {
|
|
|
margin-top: 20px;
|
|
|
}
|
|
|
.bottom-margin{
|
|
|
- margin-bottom: 20px;
|
|
|
+ margin-bottom: 10px;
|
|
|
}
|
|
|
/deep/ input::-webkit-input-placeholder {
|
|
|
color: #58585d;
|