|
@@ -1,118 +1,114 @@
|
|
|
<template>
|
|
|
<div class="my-container">
|
|
|
- <transition-group name="fade" style="position: relative;width: 100%;display: flex;">
|
|
|
- <div class="bill-left" v-show="isShow==='home'" key="item">
|
|
|
- <div class="bill-tab">
|
|
|
- <div class="bill-title">导航</div>
|
|
|
- <side-tree :propConfig="treeConfig" @onChange="onChangeTree" ref="sideTree" />
|
|
|
- </div>
|
|
|
+ <div class="bill-left" v-show="isShow==='home'" key="item">
|
|
|
+ <div class="bill-tab">
|
|
|
+ <div class="bill-title">导航</div>
|
|
|
+ <side-tree :propConfig="treeConfig" @onChange="onChangeTree" ref="sideTree" />
|
|
|
</div>
|
|
|
- <div class="bill-main" v-show="isShow==='home'" key="item2">
|
|
|
- <module-view :propConfig="config" ref="moduleView" @pagination="getDataList" @search="getDataList"
|
|
|
- @resert="onRefresh" @clickHandle="clickHandle" @detail="getDetail" @onRefresh="onRefresh" />
|
|
|
- </div>
|
|
|
- <!-- 新增/编辑 -->
|
|
|
- <div class="detil" v-show="isShow==='add'" key="item3">
|
|
|
- <by-tool :propConfig="toolConfig" @clickHandle="insideTools" ref="byTool" />
|
|
|
- <div class="box-shadow">
|
|
|
- <by-form :propConfig="formConfig" ref="form">
|
|
|
- <template v-slot:description>
|
|
|
- <el-input type="textarea" :rows="5" placeholder="请输入内容" v-model="textarea">
|
|
|
- </el-input>
|
|
|
- </template>
|
|
|
- <template v-slot:tags>
|
|
|
- <el-tag style="margin-right: 16px;" :disable-transitions="true" v-for="(item,index) of tagsData"
|
|
|
- :key="index" closable @close="handleClose2(index)">
|
|
|
- {{item}}
|
|
|
- </el-tag>
|
|
|
- <by-input class="input-new-tag" ref="tagsValue" style="width: 150px;"></by-input>
|
|
|
- <el-button class="button-new-tag" @click="getTagsValue">添加</el-button>
|
|
|
- </template>
|
|
|
- <template v-slot:status>
|
|
|
- <el-radio v-model="status" :label="0">启用</el-radio>
|
|
|
- <el-radio v-model="status" :label="1">备用</el-radio>
|
|
|
- <el-radio v-model="status" :label="2">禁用</el-radio>
|
|
|
- </template>
|
|
|
- <template v-slot:ismakeup>
|
|
|
- <el-radio v-model="ismakeup" :label="0">是</el-radio>
|
|
|
- <el-radio v-model="ismakeup" :label="1">否</el-radio>
|
|
|
- <el-button v-show="ismakeup===0" @click="openMakeup">选择商品</el-button>
|
|
|
- </template>
|
|
|
- <template v-slot:makeupTable>
|
|
|
- <div v-if="ismakeup===0">
|
|
|
- <by-table :propConfig="makeupTable" ref="makeupTable"></by-table>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <template v-slot:issued>
|
|
|
- <el-radio v-model="issued" :label="0">是</el-radio>
|
|
|
- <el-radio v-model="issued" :label="1">否</el-radio>
|
|
|
- </template>
|
|
|
- <template v-slot:materialSpec>
|
|
|
- <el-radio v-model="materialSpec" :label="0" @input="changeSingle">单规格</el-radio>
|
|
|
- <el-radio v-model="materialSpec" :label="1" @input="changeSingle">多规格</el-radio>
|
|
|
- </template>
|
|
|
- <template v-slot:attributeName>
|
|
|
- <div v-if="isSingle" key="item4">
|
|
|
- <by-table :propConfig="singleTable" @onChangeRow="getInputValue" ref="singeTable">
|
|
|
- <template v-slot:stock="{row}">
|
|
|
- <vxe-input v-if="!isEdit" v-model="row.stock" size="mini" type="integer"></vxe-input>
|
|
|
- <span v-else>{{ row.stock }}</span>
|
|
|
- </template>
|
|
|
- </by-table>
|
|
|
- </div>
|
|
|
- <div v-if="!isSingle" key="item5">
|
|
|
- <el-select :value="selectValue" clearable placeholder="请选择" style="width: 19.5%;"
|
|
|
- @input="getSelectValue">
|
|
|
- <el-option v-for="item in selectList" :key="item.value" :label="item.name" :value="item.id">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- <div class="by-tab" key="item6">
|
|
|
- <div v-for="(item,index) of attributeList" :key="index">
|
|
|
- <div class="tab-title">{{item.title}} <i class="el-icon-circle-close"
|
|
|
- @click="closeGroup(index)"></i>
|
|
|
- </div>
|
|
|
- <el-tag class="item-tab" :disable-transitions="true" :key="i" v-for="(tag,i) of item.list" closable
|
|
|
- @close="handleClose(tag,index)">
|
|
|
- {{tag}}
|
|
|
- </el-tag>
|
|
|
- <by-input class="input-new-tag" :ref="'getValue_'+index"></by-input>
|
|
|
- <el-button class="button-new-tag" @click="showInput(index)">添加</el-button>
|
|
|
+ </div>
|
|
|
+ <div class="bill-main" v-show="isShow==='home'" key="item2">
|
|
|
+ <module-view :propConfig="config" ref="moduleView" @pagination="getDataList" @search="getDataList"
|
|
|
+ @resert="onRefresh" @clickHandle="clickHandle" @detail="getDetail" @onRefresh="onRefresh" />
|
|
|
+ </div>
|
|
|
+ <!-- 新增/编辑 -->
|
|
|
+ <div class="detil" v-show="isShow==='add'" key="item3">
|
|
|
+ <by-tool :propConfig="toolConfig" @clickHandle="insideTools" ref="byTool" />
|
|
|
+ <div class="box-shadow">
|
|
|
+ <by-form :propConfig="formConfig" ref="form">
|
|
|
+ <template v-slot:description>
|
|
|
+ <el-input type="textarea" :rows="5" placeholder="请输入内容" v-model="textarea">
|
|
|
+ </el-input>
|
|
|
+ </template>
|
|
|
+ <template v-slot:tags>
|
|
|
+ <el-tag style="margin-right: 16px;" :disable-transitions="true" v-for="(item,index) of tagsData"
|
|
|
+ :key="index" closable @close="handleClose2(index)">
|
|
|
+ {{item}}
|
|
|
+ </el-tag>
|
|
|
+ <by-input class="input-new-tag" ref="tagsValue" style="width: 150px;"></by-input>
|
|
|
+ <el-button class="button-new-tag" @click="getTagsValue">添加</el-button>
|
|
|
+ </template>
|
|
|
+ <template v-slot:status>
|
|
|
+ <el-radio v-model="status" :label="0">启用</el-radio>
|
|
|
+ <el-radio v-model="status" :label="1">备用</el-radio>
|
|
|
+ <el-radio v-model="status" :label="2">禁用</el-radio>
|
|
|
+ </template>
|
|
|
+ <template v-slot:ismakeup>
|
|
|
+ <el-radio v-model="ismakeup" :label="0">是</el-radio>
|
|
|
+ <el-radio v-model="ismakeup" :label="1">否</el-radio>
|
|
|
+ <el-button v-show="ismakeup===0" @click="openMakeup">选择商品</el-button>
|
|
|
+ </template>
|
|
|
+ <template v-slot:makeupTable>
|
|
|
+ <div v-if="ismakeup===0">
|
|
|
+ <by-table :propConfig="makeupTable" ref="makeupTable"></by-table>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template v-slot:issued>
|
|
|
+ <el-radio v-model="issued" :label="0">是</el-radio>
|
|
|
+ <el-radio v-model="issued" :label="1">否</el-radio>
|
|
|
+ </template>
|
|
|
+ <template v-slot:materialSpec>
|
|
|
+ <el-radio v-model="materialSpec" :label="0" @input="changeSingle">单规格</el-radio>
|
|
|
+ <el-radio v-model="materialSpec" :label="1" @input="changeSingle">多规格</el-radio>
|
|
|
+ </template>
|
|
|
+ <template v-slot:attributeName>
|
|
|
+ <div v-if="isSingle" key="item4">
|
|
|
+ <by-table :propConfig="singleTable" @onChangeRow="getInputValue" ref="singeTable">
|
|
|
+ <template v-slot:stock="{row}">
|
|
|
+ <vxe-input v-if="!isEdit" v-model="row.stock" size="mini" type="integer"></vxe-input>
|
|
|
+ <span v-else>{{ row.stock }}</span>
|
|
|
+ </template>
|
|
|
+ </by-table>
|
|
|
+ </div>
|
|
|
+ <div v-if="!isSingle" key="item5">
|
|
|
+ <el-select :value="selectValue" clearable placeholder="请选择" style="width: 19.5%;" @input="getSelectValue">
|
|
|
+ <el-option v-for="item in selectList" :key="item.value" :label="item.name" :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <div class="by-tab" key="item6">
|
|
|
+ <div v-for="(item,index) of attributeList" :key="index">
|
|
|
+ <div class="tab-title">{{item.title}} <i class="el-icon-circle-close" @click="closeGroup(index)"></i>
|
|
|
</div>
|
|
|
+ <el-tag class="item-tab" :disable-transitions="true" :key="i" v-for="(tag,i) of item.list" closable
|
|
|
+ @close="handleClose(tag,index)">
|
|
|
+ {{tag}}
|
|
|
+ </el-tag>
|
|
|
+ <by-input class="input-new-tag" :ref="'getValue_'+index"></by-input>
|
|
|
+ <el-button class="button-new-tag" @click="showInput(index)">添加</el-button>
|
|
|
+ </div>
|
|
|
|
|
|
- <div style="margin: 20px 0;" v-if="!isAdd" key="item7">
|
|
|
- <div class="el-button mr15 el-button--primary el-button--small" @click="isAdd=true">添加新规格</div>
|
|
|
- </div>
|
|
|
- <div style="display: flex;margin: 20px 0;" v-else key='item8'>
|
|
|
- <div class="flex-item">
|
|
|
- <label>规格:</label>
|
|
|
- <div class="el-input el-input--small" style="width: 250px;margin-right: 16px;">
|
|
|
- <input type="text" v-model="norms" placeholder="请输入规格" class="el-input__inner">
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="flex-item">
|
|
|
- <label>规格值:</label>
|
|
|
- <div class="el-input el-input--small" style="width: 250px;margin-right: 16px;">
|
|
|
- <input type="text" v-model="normsValue" placeholder="请输入规格值" class="el-input__inner">
|
|
|
- </div>
|
|
|
+ <div style="margin: 20px 0;" v-if="!isAdd" key="item7">
|
|
|
+ <div class="el-button mr15 el-button--primary el-button--small" @click="isAdd=true">添加新规格</div>
|
|
|
+ </div>
|
|
|
+ <div style="display: flex;margin: 20px 0;" v-else key='item8'>
|
|
|
+ <div class="flex-item">
|
|
|
+ <label>规格:</label>
|
|
|
+ <div class="el-input el-input--small" style="width: 250px;margin-right: 16px;">
|
|
|
+ <input type="text" v-model="norms" placeholder="请输入规格" class="el-input__inner">
|
|
|
</div>
|
|
|
- <div @click="doComfirm" class="el-button el-button--primary el-button--small">确定</div>
|
|
|
- <div @click="isAdd=false" class="el-button el-button--danger el-button--small">取消</div>
|
|
|
</div>
|
|
|
- <div>
|
|
|
- <by-table :propConfig="tableConfig" @onChangeRow="getInputValue" ref="table">
|
|
|
- <template v-slot:stock="{row}">
|
|
|
- <vxe-input v-if="!isEdit" v-model="row.stock" size="mini" type="integer"></vxe-input>
|
|
|
- <span v-else>{{ row.stock }}</span>
|
|
|
- </template>
|
|
|
- </by-table>
|
|
|
+ <div class="flex-item">
|
|
|
+ <label>规格值:</label>
|
|
|
+ <div class="el-input el-input--small" style="width: 250px;margin-right: 16px;">
|
|
|
+ <input type="text" v-model="normsValue" placeholder="请输入规格值" class="el-input__inner">
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ <div @click="doComfirm" class="el-button el-button--primary el-button--small">确定</div>
|
|
|
+ <div @click="isAdd=false" class="el-button el-button--danger el-button--small">取消</div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <by-table :propConfig="tableConfig" @onChangeRow="getInputValue" ref="table">
|
|
|
+ <template v-slot:stock="{row}">
|
|
|
+ <vxe-input v-if="!isEdit" v-model="row.stock" size="mini" type="integer"></vxe-input>
|
|
|
+ <span v-else>{{ row.stock }}</span>
|
|
|
+ </template>
|
|
|
+ </by-table>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </template>
|
|
|
- </by-form>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </by-form>
|
|
|
</div>
|
|
|
- </transition-group>
|
|
|
+ </div>
|
|
|
<!-- 选择物料 -->
|
|
|
<productModal ref="product" :mulit="true" @confirm="confirmProduct" />
|
|
|
<!-- <productDialog ref="product" :mulit="true" @confirm="confirmProduct" /> -->
|
|
@@ -1729,11 +1725,5 @@
|
|
|
margin-top: 20px;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- @media screen and (min-width: 1700px) {
|
|
|
- .bill-main {
|
|
|
- min-width: 1450px;
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
</style>
|