master
lion 6 months ago
parent 5499c166ff
commit 7d2cc2cd36

@ -2,9 +2,9 @@
ENV='development'
# base api
VUE_APP_BASE_API = https://saifen.ali251.langye.net
VUE_APP_UPLOAD_API = https://saifen.ali251.langye.net/api/admin/upload-file
VUE_APP_PREVIEW_API=http://view.ali251.langye.net:8012/onlinePreview
#VUE_APP_BASE_API = https://saifen.ali251.langye.net
#VUE_APP_UPLOAD_API = https://saifen.ali251.langye.net/api/admin/upload-file
#VUE_APP_PREVIEW_API=http://view.ali251.langye.net:8012/onlinePreview
#VUE_APP_BASE_API = https://sepax-pdm-test.langye.net
#VUE_APP_UPLOAD_API = https://sepax-pdm-test.langye.net/api/admin/upload-file
VUE_APP_BASE_API = https://sepax-pdm-test.langye.net
VUE_APP_UPLOAD_API = https://sepax-pdm-test.langye.net/api/admin/upload-file

@ -22,7 +22,8 @@ export default{
let number = ['separation_mode','brand']
getparameter({
number: number,
type:1
type:1,
status:1
}).then(res => {
//获取数据字典插入到 select中
res.map(item => {
@ -39,7 +40,8 @@ export default{
let number = ['topic','equipment','tag']
getparameter({
number: number,
type:2
type:2,
status:1
}).then(res => {
//获取数据字典插入到 select中
res.map(item => {

@ -32,7 +32,8 @@ export default {
})
const pro = await getparameter({
number:number,
type:1
type:1,
status:1
})
pro.map(p=>{
for (var k in this.productDetailsKeyList) {
@ -51,7 +52,8 @@ export default {
// let number = ['separation_mode', 'brand', 'bead_type']
getparameter({
number: number,
type: 1
type: 1,
status:1
}).then(res => {
//获取数据字典插入到 select中
res.map(item => {

@ -24,7 +24,8 @@ export default{
let number = ['separation_mode','brand']
getparameter({
number: number,
type:1
type:1,
status:1
}).then(res => {
//获取数据字典插入到 select中
res.map(item => {
@ -41,7 +42,8 @@ export default{
let number = ['catalogTypeList']
getparameter({
number: number,
type:3
type:3,
status:1
}).then(res => {
//获取数据字典插入到 select中
res.map(item => {

@ -56,7 +56,9 @@
select: {
name: '',
page: 1,
page_size: 10,
page_size: 10,
sort_name:'sort',
sort_type:'ASC'
},
total: 0,
list: [],

@ -90,7 +90,7 @@
<template v-slot:phase>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Reversed phase
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Reversed Phase
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" multiple filterable collapse-tags v-model="form.phase"
@ -114,6 +114,20 @@
</el-select>
</div>
</div>
</template>
<template v-slot:mixed_mode>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Mixed Mode
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" multiple filterable collapse-tags v-model="form.mixed_mode"
placeholder="Please Select">
<el-option v-for="item in productPhaseList" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:webinar_ids>
<div class="xy-table-item">
@ -213,7 +227,8 @@
size: [],
lon: [],
phase: [],
interaction: [],
interaction: [],
mixed_mode:[],
webinar_ids: [],
icon_id:'',
icon_active_id:''
@ -338,6 +353,8 @@
this.form.phase = res.phase ? res.phase : []
this.form.interaction = res.interaction ? res.interaction : []
this.form.webinar_ids = res.webinar_ids ? res.webinar_ids : []
this.form.mixed_mode = res.mixed_mode ? res.mixed_mode : []
if(res.icon){
this.iconList.push({
name: res.icon.original_name,
@ -376,7 +393,8 @@
size: [],
lon: [],
phase: [],
interaction: [],
interaction: [],
mixed_mode:[],
webinar_ids: []
}
this.$refs['dialog'].reset()

@ -2,7 +2,7 @@
<div>
<div class="statistics">
<panel-group :totaldata="list" />
<!-- <panel-group :totaldata="list" /> -->
</div>
@ -33,11 +33,11 @@
}
},
watch: {
chartData(val, newval) {
if (newval){
this.init();
}
}
// chartData(val, newval) {
// if (newval){
// this.init();
// }
// }
},
methods: {
async loadData() {
@ -178,10 +178,10 @@
//this.init()
window.onresize = () => {
this.col.resize()
this.line.resize()
}
// window.onresize = () => {
// this.col.resize()
// this.line.resize()
// }
},
destroyed() {

@ -45,7 +45,6 @@
<el-tooltip class="item" effect="dark" :content="item.product.name" placement="top">
<div class="product-item">{{item.product.name}}</div>
</el-tooltip>
</template>
</template>
</template>
@ -71,14 +70,163 @@
</el-table-column>
</el-table-column>
</template>
<template v-slot:card>
<el-table-column align='left' label="Card" width="240" header-align="center">
<template slot-scope="scope">
<div style="color:blue;cursor: pointer;text-decoration: underline;" @click="toDecode(scope.row.card)">{{scope.row.card}}</div>
</template>
</el-table-column>
</template>
<!-- shipping address -->
<template v-slot:shipping>
<el-table-column align='left' label="Shipping Address" minWidth="360" header-align="center">
<el-table-column align='left' label="Attention" width="180" header-align="center">
<template slot-scope="scope">
{{scope.row.shipping_attention}}
</template>
</el-table-column>
<el-table-column align='left' label="Address" width="180" header-align="center">
<template slot-scope="scope">
{{scope.row.shipping_address}}
</template>
</el-table-column>
<el-table-column align='left' label="City" width="180" header-align="center">
<template slot-scope="scope">
{{scope.row.shipping_city}}
</template>
</el-table-column>
<el-table-column align='left' label="States/Province" width="180" header-align="center">
<template slot-scope="scope">
{{scope.row.shipping_region}}
</template>
</el-table-column>
<el-table-column align='left' label="Zip/Postal Code" width="180" header-align="center">
<template slot-scope="scope">
{{scope.row.shipping_zip_code}}
</template>
</el-table-column>
<el-table-column align='left' label="Country/Region" width="180" header-align="center">
<template slot-scope="scope">
{{scope.row.shipping_country}}
</template>
</el-table-column>
<el-table-column align='left' label="Phone" width="180" header-align="center">
<template slot-scope="scope">
{{scope.row.shipping_mobile}}
</template>
</el-table-column>
<el-table-column align='left' label="Exempt From Sales Tax" width="180" header-align="center">
<template slot-scope="scope">
<div v-if="scope.row.not_tax">
Yes
</div>
<div v-else>
No
</div>
</template>
</el-table-column>
<el-table-column align='left' label="Account" width="180" header-align="center">
<template slot-scope="scope">
{{scope.row.shipping_account}}
</template>
</el-table-column>
<el-table-column align='left' label="Courier" width="180" header-align="center">
<template slot-scope="scope">
{{scope.row.shipping_courier}}
</template>
</el-table-column>
<el-table-column align='left' label="Service" width="180" header-align="center">
<template slot-scope="scope">
{{scope.row.shipping_service}}
</template>
</el-table-column>
</el-table-column>
</template>
<!-- billing address -->
<template v-slot:billing>
<el-table-column align='left' label="Billing Address" minWidth="360" header-align="center">
<el-table-column align='left' label="Attention" width="180" header-align="center">
<template slot-scope="scope">
{{scope.row.billing_attention}}
</template>
</el-table-column>
<el-table-column align='left' label="Address" width="180" header-align="center">
<template slot-scope="scope">
{{scope.row.billing_address}}
</template>
</el-table-column>
<el-table-column align='left' label="City" width="180" header-align="center">
<template slot-scope="scope">
{{scope.row.billing_city}}
</template>
</el-table-column>
<el-table-column align='left' label="States/Province" width="180" header-align="center">
<template slot-scope="scope">
{{scope.row.billing_region}}
</template>
</el-table-column>
<el-table-column align='left' label="Zip/Postal Code" width="180" header-align="center">
<template slot-scope="scope">
{{scope.row.billing_zip_code}}
</template>
</el-table-column>
<el-table-column align='left' label="Country/Region" width="180" header-align="center">
<template slot-scope="scope">
{{scope.row.billing_country}}
</template>
</el-table-column>
<el-table-column align='left' label="Phone" width="180" header-align="center">
<template slot-scope="scope">
{{scope.row.billing_mobile}}
</template>
</el-table-column>
</el-table-column>
</template>
<!-- Credit Card Information -->
<!-- <template v-slot:credit>
<el-table-column align='left' label="Credit Card Information" minWidth="360" header-align="center">
<el-table-column align='left' label="Cardholder Name" width="180" header-align="center">
<template slot-scope="scope">
{{scope.row.card_name}}
</template>
</el-table-column>
<el-table-column align='left' label="Card Number" width="180" header-align="center">
<template slot-scope="scope">
{{scope.row.card_number}}
</template>
</el-table-column>
<el-table-column align='left' label="Expiration Date MM/DD" width="180" header-align="center">
<template slot-scope="scope">
{{scope.row.card_expire}}
</template>
</el-table-column>
<el-table-column align='left' label="CVV" width="180" header-align="center">
<template slot-scope="scope">
{{scope.row.card_cvv}}
</template>
</el-table-column>
<el-table-column align='left' label="" width="180" header-align="center">
<template slot-scope="scope">
{{scope.row.card}}
</template>
</el-table-column>
</el-table-column>
</template> -->
<template v-slot:card>
<el-table-column align='left' label="Card" width="240" header-align="center">
<template slot-scope="scope">
<div style="color:blue;cursor: pointer;text-decoration: underline;">{{scope.row.card}}</div>
</template>
</el-table-column>
</template>
<template v-slot:file_id>
<el-table-column align='left' label="PO File" width="240" header-align="center">
<template slot-scope="scope">
<a v-if="scope.row.file" :href="scope.row.file.url" target="_blank" style="color:blue;cursor: pointer;text-decoration: underline;">{{scope.row.file.original_name}}</a>
</template>
</el-table-column>
</template>
<template v-slot:btns>
<el-table-column align='center' fixed="right" label="Operate" width="120" header-align="center">
<template slot-scope="scope">
@ -116,61 +264,143 @@
total: 0,
list: [],
table_item: [{
prop: 'index',
type: 'index',
width: 50,
fixed: 'left'
}, {
prop: 'number',
label: 'Order Number',
align: 'left',
width: 240
}, {
prop: 'order_product',
label: 'Product',
align: 'left',
minWidth: 360,
// multiHd:[{
// prop: 'name',
// label: 'Name',
// align: 'left',
// },{
// prop: 'number',
// label: 'Number',
// align: 'left',
// }]
}, {
prop: 'user.email',
label: 'Email',
align: 'left',
width: 180
}, {
prop: 'index',
type: 'index',
width: 50,
fixed: 'left'
},
{
prop: 'user.email',
label: 'User Email',
align: 'left',
width: 180
}, {
prop: 'number',
label: 'Order Number',
align: 'left',
width: 240
}, {
prop: 'order_product',
label: 'Product',
align: 'left',
minWidth: 360,
},
{
prop: 'shipping',
label: 'Shipping Address',
align: 'left',
minWidth: 360,
},
{
prop: 'requirements',
label: 'Special Requirements/Notes',
align: 'left',
width: 180
},
{
prop: 'reference_number',
label: 'Reference Number',
align: 'left',
width: 180
},
{
prop: 'quote_number',
label: 'Quote Number',
align: 'left',
width: 180
},
{
prop: 'estimated_shipping',
label: 'Estimated Shipping',
align: 'left',
width: 180
},
{
prop: 'subtotal',
label: 'Subtotal',
align: 'left',
width: 180
},
{
prop: 'tax',
label: 'Tax',
align: 'left',
width: 180
},
{
prop: 'total',
label: 'Total',
align: 'left',
width: 180
},
{
prop: 'billing',
label: 'Billing Address',
align: 'left',
minWidth: 360,
},
{
prop: 'card',
label: 'Card',
align: 'left',
minWidth: 360,
},
{
prop: 'file_id',
label: 'PO File',
align: 'left',
minWidth: 360,
},
{
prop: 'p0_number',
label: 'PO Number',
align: 'left',
width: 180,
}, {
prop: 'created_at',
label: 'Order Time',
align: 'left',
width: 240
}
],
export_item: {
"user.email": 'User Email',
"number": 'Order Number',
"order_product": "Product",
"shipping_attention": "Shipping Attention",
"shipping_address": "Shipping Address",
"shipping_city": "Shipping City",
"shipping_region": "Shipping States/Province",
"shipping_zip_code": "Shipping Zip/Postal Code",
"shipping_country": "Shipping Country/Region",
"shipping_mobile": "Shipping Phone",
"not_tax_text": "Exempt From Sales Tax",
"shipping_account": "Shipping Account",
"shipping_courier": "Shipping Courier",
"shipping_service": "Shipping Service",
prop: 'mobile',
label: 'Mobile',
align: 'left',
width: 180
}, {
prop: 'user.country',
label: 'Country',
align: 'left',
width: 180
}, {
prop: 'user.shipping_address',
label: 'Address',
align: 'left',
width: 360
}, {
prop: 'card',
label: 'Card',
align: 'left',
width: 240
}, {
prop: 'created_at',
label: 'Created At',
align: 'left',
width: 240
}]
"requirements": "Special Requirements/Notes",
"reference_number": "Reference Number",
"quote_number": "Quote Number",
"estimated_shipping": "Estimated Shipping",
"subtotal": "Subtotal",
"tax": "Tax",
"total": "Total",
"billing_attention": "Billing Attention",
"billing_address": "Billing Address",
"billing_city": "Billing City",
"billing_region": "Billing States/Province",
"billing_zip_code": "Billing Zip/Postal Code",
"billing_country": "Billing Country/Region",
"billing_mobile": "Billing Phone",
"card": "Card",
'file.url':'PO File',
'p0_number':'PO Number',
'created_at':'Order Time'
}
}
},
created() {
@ -194,19 +424,19 @@
this.getList()
},
exportExcel() {
let _export = {}
this.table_item.map(item => {
if (item.prop === 'index') {
let _export = this.export_item
// this.table_item.map(item => {
// if (item.prop === 'index') {
} else {
_export[item.prop] = item.label
}
})
// } else {
// _export[item.prop] = item.label
// }
// })
download(
'/api/admin/order/index',
'get', {
export_fields: _export,
show_relation: ['orderProducts.product', 'user'],
show_relation: ['orderProducts.product', 'user','file'],
email: this.select.email,
filter: [{
key: 'number',
@ -226,7 +456,7 @@
async getList() {
const res = await index({
...this.select,
show_relation: ['orderProducts.product', 'user'],
show_relation: ['orderProducts.product', 'user','file'],
email: this.select.email,
filter: [{
key: 'number',
@ -252,9 +482,14 @@
console.log(error)
reject(error)
})
},
toDecode(code){
this.$router.push({ path: '/order/decode', query: { code: code } })
},
toDecode(code) {
this.$router.push({
path: '/order/decode',
query: {
code: code
}
})
}
}
}

@ -8,6 +8,13 @@
<div class="searchwrap" style="display: flex;align-items: center;">
<div>
<el-input v-model="select.title" placeholder="Title"></el-input>
</div>
<div>
<el-select clearable style="width:100%" filterable v-model="select.category_ids"
placeholder="Product Phase">
<el-option v-for="(item,index) in categoryList" :key="index" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-button type="primary" size="small" @click="select.page=1,getList()">search</el-button>
@ -46,7 +53,10 @@
import {
index,
destroy
} from "@/api/system/baseForm.js"
} from "@/api/system/baseForm.js"
import {
index as getCategory
} from "@/api/product/category.js"
export default {
components: {
addCatalog
@ -55,12 +65,16 @@
return {
select: {
title: '',
table_name:'catalogs',
table_name:'catalogs',
category_ids:'',
page: 1,
page_size: 10,
sort_name:"date",
sort_type:"DESC",
},
sort_name:"is_top",
sort_type:"DESC",
sort_name2:"date",
sort_type2:"DESC",
},
categoryList: [],
total: 0,
list: [],
table_item: [{
@ -76,6 +90,14 @@
prop: 'title',
label: 'Title',
align: 'left',
},{
prop: 'is_top',
label: 'Top',
align: 'left',
width:180,
formatter: (cell, data, value) => {
return value == 1 ? 'Yes' : 'No'
}
},{
prop: 'date',
label: 'Release Time',
@ -92,13 +114,25 @@
}
},
created() {
this.getList()
this.getList()
this.getCategoryList()
},
methods: {
methods: {
async getCategoryList() {
const res = await getCategory({
page_size: 999,
page: 1,
sort_type: 'ASC',
sort_name: 'sort',
type: 2
})
this.categoryList = res.data
},
editCatalog(type, id) {
if (type == 'editor') {
this.$refs.addCatalog.id = id
}
this.$refs.addCatalog.categoryList = this.categoryList
this.$refs.addCatalog.type = type
this.$refs.addCatalog.isShow = true
},
@ -113,7 +147,8 @@
},
resetSearch() {
this.select.page = 1
this.select.title = ''
this.select.title = ''
this.select.category_ids = ''
this.getList()
},
async getList() {
@ -124,6 +159,10 @@
key:'title',
op:'like',
value:this.select.title
}, {
key: 'category_ids',
op: 'json_contains',
value: this.select.category_ids
}]
})
this.list = res.data

@ -25,6 +25,19 @@
</div>
</div>
</template>
<template v-slot:is_top>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Top
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.is_top" placeholder="Please Select">
<el-option v-for="(item,index) in [{name:'No',id:0},{name:'Yes',id:1}]" :key="index" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:date>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
@ -81,9 +94,6 @@
import {
getToken
} from '@/utils/auth'
import {
index as getCategory
} from "@/api/product/category.js"
import resource from "@/mixin/resources.js"
export default {
mixins: [resource],
@ -104,6 +114,7 @@
form: {
category_ids: '',
title: "",
is_top:0,
date:'',
type: '',
files: []
@ -122,7 +133,6 @@
},
created() {
this.uploadOther.token = getToken();
this.getCategoryList()
},
methods: {
handleRemove(file, fileList) {
@ -140,16 +150,6 @@
this.showProgress = true;
this.uploadProgress = event.percent;
},
async getCategoryList() {
const res = await getCategory({
page_size: 999,
page: 1,
sort_type: 'ASC',
sort_name: 'sort',
type: 2
})
this.categoryList = res.data
},
submit() {
if (this.id) {
@ -196,7 +196,8 @@
}).then(res => {
this.form = this.base.requestToForm(res, this.form)
this.form.date = res.date?res.date:this.$moment().format('YYYY-MM-DD HH:mm:ss')
this.form.category_ids = res.category_ids?res.category_ids:[]
this.form.category_ids = res.category_ids?res.category_ids:[]
this.form.is_top = res.is_top?res.is_top:0
if (res.files_details && res.files_details.length > 0) {
this.filesList = []
res.files_details.map(item => {
@ -227,6 +228,7 @@
this.form = {
category_ids: '',
title: "",
is_top:0,
date:'',
type: '',
files: []
@ -241,7 +243,8 @@
<style scoped lang="scss">
::v-deep .category_ids,
::v-deep .title,
::v-deep .title,
::v-deep .is_top,
::v-deep .type,
::v-deep .date,
::v-deep .files {

@ -12,6 +12,19 @@
</div>
</div>
</template>
<template v-slot:is_top>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Top
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.is_top" placeholder="Please Select">
<el-option v-for="(item,index) in [{name:'No',id:0},{name:'Yes',id:1}]" :key="index" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:date>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
@ -82,6 +95,7 @@
uploadProgress:0,
form: {
title: "",
is_top:0,
date:'',
files: [],
content: ''
@ -162,7 +176,8 @@
this.form = this.base.requestToForm(res, this.form)
this.form.date = res.date?res.date:this.$moment().format('YYYY-MM-DD HH:mm:ss')
this.form.content = res.content ? res.content : ''
this.form.content = res.content ? res.content : ''
this.form.is_top = res.is_top?res.is_top:0
this.showWang = true
if (res.files_details && res.files_details.length > 0) {
this.filesList = []
@ -194,6 +209,7 @@
this.filesList = []
this.form = {
title: "",
is_top:0,
date:'',
files: [],
content: ''
@ -209,6 +225,7 @@
<style scoped lang="scss">
::v-deep .title,
::v-deep .files,
::v-deep .is_top,
::v-deep .date,
::v-deep .content {
flex-basis: 100%;

@ -2,7 +2,7 @@
<div>
<xy-dialog ref="dialog" :width="50" :is-show.sync="isShow" :type="'form'" :title="$route.meta.title" :form="form"
:rules='rules' @submit="submit">
<template v-slot:category_ids v-if="table_name==='posters' || table_name==='flyers'">
<template v-slot:category_ids v-if="table_name!='product_selections'">
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Product Phase
@ -14,6 +14,19 @@
</el-select>
</div>
</div>
</template>
<template v-slot:application_type_ids v-if="table_name==='technical_newsletters'">
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Application Samples
</div>
<div class="xy-table-item-content">
<el-select multiple filterable style="width:100%" v-model="form.application_type_ids" placeholder="Please Select">
<el-option v-for="(item,index) in applicationTypeList" :key="index" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:title>
<div class="xy-table-item">
@ -25,6 +38,19 @@
</div>
</div>
</template>
<template v-slot:is_top>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Top
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.is_top" placeholder="Please Select">
<el-option v-for="(item,index) in [{name:'No',id:0},{name:'Yes',id:1}]" :key="index" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:date>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
@ -88,9 +114,8 @@
import {
getToken
} from '@/utils/auth'
import {
index as getCategory
} from "@/api/product/category.js"
export default {
data() {
return {
@ -105,11 +130,14 @@
showProgress:false,
uploadProgress:0,
filesList: [],
categoryList: [],
categoryList: [],
applicationTypeList:[],
showWang: false,
form: {
category_ids: [],
title: "",
category_ids: [],
application_type_ids:[],
title: "",
is_top:0,
date: '',
link:'',
files: [],
@ -124,8 +152,9 @@
}
},
created() {
this.uploadOther.token = getToken();
this.getCategoryList()
this.uploadOther.token = getToken();
},
methods: {
handleRemove(file, fileList) {
@ -145,18 +174,9 @@
},
changeEditor(e) {
this.form.content = e
},
async getCategoryList() {
const res = await getCategory({
page_size: 999,
page: 1,
sort_type: 'ASC',
sort_name: 'sort',
type: 2
})
this.categoryList = res.data
},
},
submit() {
if (this.id) {
@ -205,8 +225,11 @@
this.showWang = true
}
this.form.category_ids = res.category_ids?res.category_ids:[]
this.form.application_type_ids = res.application_type_ids?res.application_type_ids:[]
this.form.date = res.date?res.date:this.$moment().format('YYYY-MM-DD HH:mm:ss')
this.form.date = res.date?res.date:this.$moment().format('YYYY-MM-DD HH:mm:ss')
this.form.is_top = res.is_top?res.is_top:0
if (res.files_details && res.files_details.length > 0) {
this.filesList = []
res.files_details.map(item => {
@ -241,8 +264,10 @@
this.showProgress = false;
this.uploadProgress = 0;
this.form = {
category_ids: '',
title: "",
category_ids: [],
application_type_ids:[],
title: "",
is_top:0,
date: '',
files: [],
content: ''
@ -256,7 +281,9 @@
</script>
<style scoped lang="scss">
::v-deep .category_ids,
::v-deep .category_ids,
::v-deep .application_type_ids,
::v-deep .is_top,
::v-deep .date,
::v-deep .link,
::v-deep .title,

@ -155,9 +155,7 @@
show
} from "@/api/system/baseForm.js"
import resource from "@/mixin/resources.js"
import {
index as getCategory
} from "@/api/product/category.js"
import {
index as getApplication
} from "@/api/application/category.js"
@ -218,8 +216,7 @@
},
created() {
this.uploadOther.token = getToken();
this.getCategoryList()
// this.getProductList()
this.getProductList()
this.getApplicationList()
// this.getAppSpecial()
},
@ -240,16 +237,7 @@
this.uploadProgress = event.percent;
console.log("uploadProgress",this.showProgress,uploadProgress,event)
},
async getCategoryList() {
const res = await getCategory({
page_size: 999,
page: 1,
sort_type: 'ASC',
sort_name: 'sort',
type: 2
})
this.categoryList = res.data
},
async getApplicationList() {
const res = await getApplication({
page_size: 9999,

@ -25,6 +25,19 @@
</div>
</div>
</template>
<template v-slot:is_top>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Top
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.is_top" placeholder="Please Select">
<el-option v-for="(item,index) in [{name:'No',id:0},{name:'Yes',id:1}]" :key="index" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:date>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
@ -66,10 +79,7 @@
} from "@/api/system/baseForm.js"
import {
getToken
} from '@/utils/auth'
import {
index as getCategory
} from "@/api/product/category.js"
} from '@/utils/auth'
export default {
data() {
return {
@ -88,6 +98,7 @@
form: {
category_ids: [],
name: "",
is_top:0,
date:'',
// product_ids:[],
files: []
@ -102,7 +113,6 @@
},
created() {
this.uploadOther.token = getToken();
this.getCategoryList()
},
methods: {
handleRemove(file, fileList) {
@ -119,17 +129,6 @@
handleProgress(event, file, fileList) {
this.showProgress = true;
this.uploadProgress = event.percent;
},
async getCategoryList() {
const res = await getCategory({
page_size: 999,
page: 1,
sort_type: 'ASC',
sort_name: 'sort',
type:2
})
this.categoryList = res.data
},
submit() {
@ -175,7 +174,7 @@
}).then(res => {
this.form = this.base.requestToForm(res, this.form)
this.form.date = res.date?res.date:this.$moment().format('YYYY-MM-DD HH:mm:ss')
this.form.is_top = res.is_top?res.is_top:0
this.form.category_ids = res.category_ids?res.category_ids:[]
if (res.files_details && res.files_details.length > 0) {
this.filesList = []
@ -207,6 +206,7 @@
this.form = {
category_ids: [],
name: "",
is_top:0,
date:'',
// product_ids: [],
files: []
@ -221,7 +221,8 @@
<style scoped lang="scss">
::v-deep .name,
::v-deep .date,
::v-deep .date,
::v-deep .is_top,
::v-deep .category_ids,
::v-deep .files {
flex-basis: 100%;

@ -12,6 +12,19 @@
</div>
</div>
</template>
<template v-slot:is_top>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Top
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.is_top" placeholder="Please Select">
<el-option v-for="(item,index) in [{name:'No',id:0},{name:'Yes',id:1}]" :key="index" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:date>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
@ -137,6 +150,7 @@
videosPicList:[],
form: {
title: "",
is_top:0,
date:'',
picture: [],
video_pics:[],
@ -272,7 +286,7 @@
}).then(res => {
this.form = this.base.requestToForm(res, this.form)
this.form.date = res.date?res.date:this.$moment().format('YYYY-MM-DD HH:mm:ss')
this.form.is_top = res.is_top?res.is_top:0
this.form.content = res.content ? res.content : ''
this.showWang = true
if (res.picture_details && res.picture_details.length > 0) {
@ -328,6 +342,7 @@
this.uploadProgress = 0;
this.form = {
title: "",
is_top:0,
date:'',
picture: [],
video_pics:[],
@ -348,6 +363,7 @@
::v-deep .date,
::v-deep .picture,
::v-deep .videos,
::v-deep .is_top,
::v-deep .video_pics,
::v-deep .introduction,
::v-deep .content {

@ -58,8 +58,10 @@
table_name:'faqs',
page: 1,
page_size: 10,
sort_name:"date",
sort_type:"DESC",
sort_name:"is_top",
sort_type:"DESC",
sort_name2:"date",
sort_type2:"DESC",
},
total: 0,
list: [],
@ -71,6 +73,14 @@
prop: 'title',
label: 'Title',
align: 'left',
},{
prop: 'is_top',
label: 'Top',
align: 'left',
width:180,
formatter: (cell, data, value) => {
return value == 1 ? 'Yes' : 'No'
}
},{
prop: 'date',
label: 'Release Time',

@ -8,6 +8,20 @@
<div class="searchwrap" style="display: flex;align-items: center;">
<div>
<el-input v-model="select.title" placeholder="Title"></el-input>
</div>
<div v-if="select.table_name!='product_selections'">
<el-select clearable style="width:100%" filterable v-model="select.category_ids"
placeholder="Product Phase">
<el-option v-for="(item,index) in categoryList" :key="index" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
<div v-if="select.table_name=='technical_newsletters'">
<el-select clearable style="width:100%" filterable v-model="select.application_type_ids"
placeholder="Application Samples">
<el-option v-for="(item,index) in applicationTypeList" :key="index" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-button type="primary" size="small" @click="select.page=1,getList()">search</el-button>
@ -58,7 +72,13 @@
import {
index,
destroy
} from "@/api/system/baseForm.js"
} from "@/api/system/baseForm.js"
import {
index as getCategory
} from "@/api/product/category.js"
import {
index as getApplication
} from "@/api/application/category.js"
export default {
components: {
addFiles
@ -74,12 +94,19 @@
},
select: {
title: '',
table_name:'product_selections',
table_name:'product_selections',
category_ids:'',
application_type_ids:'',
page: 1,
page_size: 10,
sort_name:"date",
sort_type:"DESC",
},
categoryList:'',
sort_name:"is_top",
sort_type:"DESC",
sort_name2:"date",
sort_type2:"DESC",
},
applicationTypeList:[],
categoryList: [],
total: 0,
list: [],
table_item: [{
@ -90,6 +117,14 @@
prop: 'title',
label: 'Title',
align: 'left',
},{
prop: 'is_top',
label: 'Top',
align: 'left',
width:180,
formatter: (cell, data, value) => {
return value == 1 ? 'Yes' : 'No'
}
},{
prop: 'date',
label: 'Release Time',
@ -110,13 +145,37 @@
let path = this.$route.path.split("_")
this.select.table_name = this.tableTypes[path[1]]
}
this.getList()
this.getList()
this.getCategoryList()
this.getApplicationList()
},
methods: {
methods: {
async getCategoryList() {
const res = await getCategory({
page_size: 999,
page: 1,
sort_type: 'ASC',
sort_name: 'sort',
type: 2
})
this.categoryList = res.data
},
async getApplicationList() {
const res = await getApplication({
page_size: 999,
page: 1,
sort_name:'sort',
sort_type:'ASC'
})
this.applicationTypeList = res.data
},
editFiles(type, id) {
if (type == 'editor') {
this.$refs.addFiles.id = id
}
this.$refs.addFiles.categoryList = this.categoryList
this.$refs.addFiles.applicationTypeList = this.applicationTypeList
this.$refs.addFiles.table_name = this.select.table_name
this.$refs.addFiles.type = type
this.$refs.addFiles.isShow = true
@ -132,7 +191,9 @@
},
resetSearch() {
this.select.page = 1
this.select.title = ''
this.select.title = ''
this.select.category_ids = ''
this.select.application_type_ids = ''
this.getList()
},
async getList() {
@ -142,6 +203,14 @@
key:'title',
op:'like',
value:this.select.title
}, {
key: 'category_ids',
op: 'json_contains',
value: this.select.category_ids
},{
key: 'application_type_ids',
op: 'json_contains',
value: this.select.application_type_ids
}]
})
this.list = res.data

@ -10,9 +10,10 @@
<el-input v-model="select.title" placeholder="Title"></el-input>
</div>
<div>
<el-select clearable style="width:100%" filterable v-model="select.number" placeholder="Product Phase">
<el-option v-for="(item,index) in productList" :key="index" :label="item.number" :value="item.id">
</el-option>
<el-select clearable style="width:100%" filterable v-model="select.category_ids"
placeholder="Product Phase">
<el-option v-for="(item,index) in categoryList" :key="index" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
<div>
@ -55,8 +56,8 @@
destroy
} from "@/api/system/baseForm.js"
import {
index as getProduct
} from "@/api/product/index.js"
index as getCategory
} from "@/api/product/category.js"
export default {
components: {
addLr
@ -65,16 +66,18 @@
return {
select: {
title: '',
table_name: 'literature_references',
number:'',
table_name: 'literature_references',
category_ids: '',
page: 1,
page_size: 10,
sort_name: "year",
sort_name: "is_top",
sort_type: "DESC",
sort_name2: "date",
sort_name2: "year",
sort_type2: "DESC",
},
productList:[],
sort_name3: "date",
sort_type3: "DESC",
},
categoryList: [],
total: 0,
list: [],
table_item: [{
@ -97,6 +100,14 @@
label: 'Link',
align: 'left',
width: 480,
}, {
prop: 'is_top',
label: 'Top',
align: 'left',
width: 180,
formatter: (cell, data, value) => {
return value == 1 ? 'Yes' : 'No'
}
}, {
prop: 'date',
label: 'Release Time',
@ -121,21 +132,24 @@
},
created() {
this.getList()
this.getProductList()
this.getCategoryList()
},
methods: {
async getProductList() {
const res = await getProduct({
page_size: 9999,
page: 1
})
this.productList = res.data
async getCategoryList() {
const res = await getCategory({
page_size: 999,
page: 1,
sort_type: 'ASC',
sort_name: 'sort',
type: 2
})
this.categoryList = res.data
},
editLr(type, id) {
if (type == 'editor') {
this.$refs.addLr.id = id
}
this.$refs.addLr.productList = this.productList
}
this.$refs.addLr.categoryList = this.categoryList
this.$refs.addLr.type = type
this.$refs.addLr.isShow = true
},
@ -150,7 +164,8 @@
},
resetSearch() {
this.select.page = 1
this.select.title = ''
this.select.title = ''
this.select.category_ids = ''
this.getList()
},
async getList() {
@ -160,10 +175,10 @@
key: 'title',
op: 'like',
value: this.select.title
},{
key: 'product_numbers',
op: 'like',
value: this.select.number
}, {
key: 'category_ids',
op: 'json_contains',
value: this.select.category_ids
}]
})
this.list = res.data

@ -9,6 +9,13 @@
<div>
<el-input v-model="select.name" placeholder="Title"></el-input>
</div>
<div>
<el-select clearable style="width:100%" filterable v-model="select.category_ids"
placeholder="Product Phase">
<el-option v-for="(item,index) in categoryList" :key="index" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-button type="primary" size="small" @click="select.page=1,getList()">search</el-button>
</div>
@ -24,13 +31,14 @@
</lx-header>
</div>
</div>
<xy-table :list="list" :total="total" @pageIndexChange="pageIndexChange"
@pageSizeChange="pageSizeChange" :table-item="table_item">
<xy-table :list="list" :total="total" @pageIndexChange="pageIndexChange" @pageSizeChange="pageSizeChange"
:table-item="table_item">
<template v-slot:btns>
<el-table-column align='center' fixed="right" label="Operate" width="180" header-align="center">
<template slot-scope="scope">
<el-button type="primary" size="small" @click="editLr('editor',scope.row.id)">edit</el-button>
<el-popconfirm confirm-button-text="confirm" cancel-button-text="cancel" style="margin:0 10px" @confirm="deleteList(scope.row.id)" title="Are you sure to delete it?">
<el-popconfirm confirm-button-text="confirm" cancel-button-text="cancel" style="margin:0 10px"
@confirm="deleteList(scope.row.id)" title="Are you sure to delete it?">
<el-button type="danger" size="small" slot="reference">delete</el-button>
</el-popconfirm>
</template>
@ -43,10 +51,13 @@
<script>
import addUm from './components/addUm.vue';
import {
index,
destroy
import {
index,
destroy
} from "@/api/system/baseForm.js"
import {
index as getCategory
} from "@/api/product/category.js"
export default {
components: {
addUm
@ -54,46 +65,69 @@
data() {
return {
select: {
name: '',
table_name:'user_manuals',
name: '',
table_name: 'user_manuals',
category_ids: '',
page: 1,
page_size: 10,
sort_name:"date",
sort_type:"DESC",
page_size: 10,
sort_name: "is_top",
sort_type: "DESC",
sort_name2: "date",
sort_type2: "DESC",
},
categoryList: [],
total: 0,
list: [],
table_item: [{
type: 'index',
width: 50,
fixed: 'left'
}, {
prop: 'name',
label: 'Name',
align: 'left',
},{
prop: 'date',
label: 'Release Time',
align: 'left',
width:180
},{
prop: 'admin.name',
label: 'Creator',
align: 'left',
width:180
type: 'index',
width: 50,
fixed: 'left'
}, {
prop: 'name',
label: 'Name',
align: 'left',
}, {
prop: 'is_top',
label: 'Top',
align: 'left',
width: 180,
formatter: (cell, data, value) => {
return value == 1 ? 'Yes' : 'No'
}
]
}, {
prop: 'date',
label: 'Release Time',
align: 'left',
width: 180
}, {
prop: 'admin.name',
label: 'Creator',
align: 'left',
width: 180
}]
}
},
created() {
this.getList()
this.getCategoryList()
},
methods: {
async getCategoryList() {
const res = await getCategory({
page_size: 999,
page: 1,
sort_type: 'ASC',
sort_name: 'sort',
type: 2
})
this.categoryList = res.data
},
editLr(type, id) {
if (type == 'editor') {
this.$refs.addUm.id = id
}
this.$refs.addUm.categoryList = this.categoryList
this.$refs.addUm.type = type
this.$refs.addUm.isShow = true
},
@ -108,26 +142,31 @@
},
resetSearch() {
this.select.page = 1
this.select.name = ''
this.select.name = ''
this.select.category_ids = ''
this.getList()
},
async getList() {
const res = await index({
...this.select,
filter:[{
key:'name',
op:'like',
value:this.select.name
}]
async getList() {
const res = await index({
...this.select,
filter: [{
key: 'name',
op: 'like',
value: this.select.name
}, {
key: 'category_ids',
op: 'json_contains',
value: this.select.category_ids
}]
})
this.list = res.data
this.total = res.total
},
deleteList(id) {
var that = this;
destroy({
table_name:this.select.table_name,
id:id
destroy({
table_name: this.select.table_name,
id: id
}).then(response => {
this.$Message.success('Success');
this.getList()

@ -58,8 +58,10 @@
table_name:'webinars',
page: 1,
page_size: 10,
sort_name:"date",
sort_type:"DESC",
sort_name:"is_top",
sort_type:"DESC",
sort_name2:"date",
sort_type2:"DESC",
},
total: 0,
list: [],
@ -71,6 +73,14 @@
prop: 'title',
label: 'Title',
align: 'left',
},{
prop: 'is_top',
label: 'Top',
align: 'left',
width:180,
formatter: (cell, data, value) => {
return value == 1 ? 'Yes' : 'No'
}
},{
prop: 'date',
label: 'Release Time',
@ -108,7 +118,8 @@
},
resetSearch() {
this.select.page = 1
this.select.title = ''
this.select.title = ''
this.select.category_ids = ''
this.getList()
},
async getList() {

@ -25,7 +25,7 @@ module.exports = {
* Detail: https://cli.vuejs.org/config/#publicpath
*/
publicPath: process.env.ENV === 'staging' ? '/admin_test' : '/admin',
outputDir: '/Users/mac/Documents/朗业/2024/s-美国赛分/saifen/public/admin_test',
outputDir: '/Users/mac/Documents/朗业/2024/s-美国赛分/saifen/public/admin',
assetsDir: 'static',
css: {
loaderOptions: { // 向 CSS 相关的 loader 传递选项

Loading…
Cancel
Save