123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- <template>
- <div>
- <basicLayout
- ref="list"
- tableName="storeList"
- :apiId="{query:20230408091703}"
- :autoQuery="false"
- :options="options"
- :isExport="false"
- :hideSearch="true">
- <template #titleRight>
- <el-button type="primary" size="small" @click="onExport" plain>导 出</el-button>
- </template>
- <template #custom>
- <el-form :inline="true" class="demo-form-inline" size="small">
- <!-- <el-form-item label="产品名称">
- <el-input v-model="itemname" placeholder="输入产品名称"></el-input>
- </el-form-item>-->
- <el-form-item label="产品信息">
- <el-input v-model="iteminfo" placeholder="输入产品编号/名称"></el-input>
- </el-form-item>
- <el-form-item label="营销分类">
- <el-cascader
- v-model="itemclassids"
- :options="classOptions"
- :props="{label:'itemclassname',value:'itemclassid',children:'subdep',checkStrictly: true }"
- clearable>
- </el-cascader>
- </el-form-item>
- <el-form-item label="经销商信息">
- <el-input v-model="agentinfo" placeholder="输入经销商信息"></el-input>
- </el-form-item>
- <el-form-item label="是否上架">
- <el-select class="inline-24" v-model="isonsale" placeholder="请选择是否上架" size="small" clearable>
- <el-option
- v-for="item in isOnSaleData"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="onSubmit(false)">查询</el-button>
- <!-- <el-button type="primary" @click="onSubmit(true)">一键查询全部</el-button> -->
- </el-form-item>
- </el-form>
- </template>
- <!-- unsoldqty 未发数量 -->
- <template v-slot:tbList="scope">
- <div v-if="scope.data.column.columnname == 'cansaleqty'">
- {{scope.data.column.data.invbalqty - scope.data.column.data.unsoldqtysum }}
- </div>
- <div v-if="scope.data.column.columnname == 'cansaleqty2'">
- {{scope.data.column.data.invbalqty - scope.data.column.data.unsoldqtysum - scope.data.column.data.undelqtysum }}
- </div>
- <!-- <div v-else-if="scope.data.column.columnname == 'itemclass'">
- {{scope.data.column.data.itemclass.map(e=>e.itemclassname).join(',')}}
- </div> -->
- <div v-else>
- {{scope.data.column.data[[scope.data.column.columnname]]}}
- </div>
- </template>
- <template v-slot:tbOpreation="scope">
- <Detail :agentinfo="agentinfo" :rowData="scope.data.data"/>
- </template>
- </basicLayout>
- </div>
- </template>
- <script>
- import Detail from './modules/detail.vue'
- export default {
- components:{Detail},
- data () {
- return {
- options:[],
- enterpriseList:'',
- accountType:'',
- sys_enterpriseid:'',
- accountTypeList:[],
- itemno:'',
- iteminfo:'',
- agentinfo:'',
- // 90603036
- itemname:'',
- itemclassids:[],
- classOptions:[],
- isonsale:'',
- isOnSaleData:[
- {
- value:1,
- label:'是'
- },
- {
- value:0,
- label:'否'
- },
- ],
- }
- },
- async created () {
- // this.getEnterprise()
- // this.getAccountType()
- },
- methods:{
- async classlist () {
- const res = await this.$api.requested({
- "id": "20220922110403",
- "content": {
- "sa_brandid": 0,
- "where": {
- "istool": 0
- }
- }
- })
- this.classOptions = res.data[0].ttemclass
- },
- onSubmit () {
- let bool = true
- if (this.itemname == '' && this.itemclassids.length == 0 && this.iteminfo == '' && this.agentinfo == '' && this.isonsale == '' && this.isonsale !== 0 ) {
- bool = true
- }
- this.$refs['list'].param.content = {
- "pageNumber":1,
- "pageSize":100,
- "where":{
- 'isonsale':this.isonsale,
- "iteminfo":this.iteminfo,
- "itemclassids":this.itemclassids.length == 0?[]:[this.itemclassids[this.itemclassids.length - 1]],
- "agentinfo":this.agentinfo,
- "all":bool,
- }
- }
- this.$refs['list'].listData()
- },
- async onExport(){
- const res = await this.$api.requested({
- "id":"20230408091703",
- "version":1,
- "content":{
- "isExport":1,
- "where":{
- "all":true,
- 'isonsale':this.isonsale,
- "iteminfo":this.iteminfo,
- "itemclassids":this.itemclassids.length == 0?[]:[this.itemclassids[this.itemclassids.length - 1]],
- "agentinfo":this.agentinfo,
- },
- }
- })
- window.open(res.data[0].url)
- }
- },
- mounted () {
- this.classlist()
- }
- }
- </script>
- <style>
- </style>
|