16 changed files with 2195 additions and 1 deletions
-
4src/api/jst/com_sales_order_upload_file.js
-
10src/api/jst/sales_order_brand.js
-
6src/api/jst/sales_order_exception.js
-
16src/api/jst/sales_order_item_upload.js
-
16src/api/jst/sales_order_warehouse.js
-
16src/api/jst/shop_store.js
-
44src/utils/httpRequest.js
-
138src/views/modules/jst/com_add_update_brand.vue
-
180src/views/modules/jst/com_add_update_shop_store.vue
-
137src/views/modules/jst/com_add_update_warehouse.vue
-
117src/views/modules/jst/com_sales_order_upload_file.vue
-
228src/views/modules/jst/sales_order_brand.vue
-
229src/views/modules/jst/sales_order_exception.vue
-
475src/views/modules/jst/sales_order_item_upload.vue
-
233src/views/modules/jst/sales_order_warehouse.vue
-
347src/views/modules/jst/shop_store.vue
@ -0,0 +1,4 @@ |
|||
import { createAPI } from '@/utils/httpRequest.js' |
|||
|
|||
// 获取产品列表
|
|||
export const uploadSalesOrderFile = data => createAPI('/jst/uploadSalesOrderFile', 'post', data) |
|||
@ -0,0 +1,10 @@ |
|||
import { createAPI } from "@/utils/httpRequest.js"; |
|||
|
|||
// 查询
|
|||
export const getSalesOrderBrand = data => createAPI('/jst/getSalesOrderBrand', 'post', data) |
|||
|
|||
// 新增
|
|||
export const insertSalesOrderBrand = data => createAPI('/jst/insertSalesOrderBrand', 'post', data) |
|||
|
|||
//修改
|
|||
export const saveSalesOrderBrand = data => createAPI('/jst/saveSalesOrderBrand', 'post', data) |
|||
@ -0,0 +1,6 @@ |
|||
import { createAPI } from "@/utils/httpRequest.js"; |
|||
|
|||
// 获取产品列表
|
|||
export const getExceptionList = data => createAPI('/jst/getExceptionList', 'post', data) |
|||
|
|||
|
|||
@ -0,0 +1,16 @@ |
|||
import { createAPI } from "@/utils/httpRequest.js"; |
|||
|
|||
// 获取文件的列表
|
|||
export const getSaleOrderFileHist = data => createAPI('/jst/getSaleOrderFileHist', 'post', data) |
|||
|
|||
// 导入销售单明细
|
|||
export const batchInsertSalesOrderItems = data => createAPI('/jst/batchInsertSalesOrderItems', 'post', data) |
|||
|
|||
//检查销售单的信息
|
|||
export const checkSalesOrderException = data => createAPI('/jst/checkSalesOrderException', 'post', data) |
|||
|
|||
//检查销售单的信息
|
|||
export const downSalesOrder = data => createAPI('/jst/downSalesOrder', 'post', data) |
|||
|
|||
|
|||
|
|||
@ -0,0 +1,16 @@ |
|||
import { createAPI } from "@/utils/httpRequest.js"; |
|||
|
|||
// 获取文件的列表
|
|||
export const getSalesOrderWarehouse = data => createAPI('/jst/getSalesOrderWarehouse', 'post', data) |
|||
|
|||
//新增
|
|||
export const insertSalesOrderWarehouse = data => createAPI('/jst/insertSalesOrderWarehouse', 'post', data) |
|||
|
|||
//修改
|
|||
export const saveSalesOrderWarehouse = data => createAPI('/jst/saveSalesOrderWarehouse', 'post', data) |
|||
|
|||
//检查销售单的信息
|
|||
export const downSalesOrder = data => createAPI('/jst/downSalesOrder', 'post', data) |
|||
|
|||
|
|||
|
|||
@ -0,0 +1,16 @@ |
|||
import { createAPI } from "@/utils/httpRequest.js"; |
|||
|
|||
// 获取文件的列表
|
|||
export const getShopStores = data => createAPI('/jst/getShopStores', 'post', data) |
|||
|
|||
// 导入销售单明细
|
|||
export const insertShopStore = data => createAPI('/jst/insertShopStore', 'post', data) |
|||
|
|||
//检查销售单的信息
|
|||
export const saveShopStore = data => createAPI('/jst/saveShopStore', 'post', data) |
|||
|
|||
//检查销售单的信息
|
|||
export const deleteShopStore = data => createAPI('/jst/deleteShopStore', 'post', data) |
|||
|
|||
|
|||
|
|||
@ -0,0 +1,138 @@ |
|||
<template> |
|||
<div class="customer-css"> |
|||
<el-dialog :title="titleCon" v-drag :close-on-click-modal="false" :visible.sync="visible" |
|||
width="240px" style="height: 680px;" class="customer-dialog"> |
|||
<el-form :inline="true" label-position="top" style="height: 10px;" |
|||
label-width="80px"> |
|||
<!-- 当前卷 --> |
|||
<el-row> |
|||
<el-col :span="20"> |
|||
<el-form-item class="customer-item" label='品牌名称:'> |
|||
<el-input v-model="pageData.brandName" :readonly=!this.addFlag style="width: 200px;" ></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="20"> |
|||
<el-form-item class="customer-item" label='品牌域:'> |
|||
<el-input v-model="pageData.brandContract" style="width: 200px;"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<span slot="footer" class="dialog-footer" style="margin-top: -20px;"> |
|||
<el-button type="primary" @click="saveBrand()">保存</el-button> |
|||
<el-button type="primary" @click="closeDialog">关闭</el-button> |
|||
</span> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
insertSalesOrderBrand, |
|||
saveSalesOrderBrand, |
|||
} from "@/api/jst/sales_order_brand.js"; |
|||
|
|||
var functionId = 'C10000008'; |
|||
export default { |
|||
data() { |
|||
return { |
|||
titleCon: '品牌维护', |
|||
visible: false, |
|||
addFlag: true, |
|||
pageData: { |
|||
brandName: '', |
|||
brandContract: '', |
|||
}, |
|||
} |
|||
}, |
|||
methods: { |
|||
//初始化页面 |
|||
init(currentRow, addFlag) { |
|||
//判断是否是新增 |
|||
if('N' === addFlag){ |
|||
this.pageData = JSON.parse(JSON.stringify(currentRow)); |
|||
this.addFlag = false; |
|||
}else{ |
|||
this.pageData = {}; |
|||
this.addFlag = true; |
|||
} |
|||
//打开modal |
|||
this.visible = true; |
|||
}, |
|||
|
|||
/*关闭modal*/ |
|||
closeDialog(){ |
|||
//刷新报工的页面 |
|||
this.$emit('refreshPageTables'); |
|||
//关闭当前的页面 |
|||
this.visible = false; |
|||
}, |
|||
|
|||
|
|||
/*保存店铺的相关的信息*/ |
|||
saveBrand(){ |
|||
//区分新增还是保存 |
|||
if(true === this.addFlag){ |
|||
insertSalesOrderBrand(this.pageData).then(({data}) => { |
|||
//判断是否保存成功 |
|||
if(data.code === 200){ |
|||
this.$message.success(data.msg); |
|||
this.closeDialog(); |
|||
}else{ |
|||
this.$message.error(data.msg); |
|||
} |
|||
}); |
|||
}else{ |
|||
saveSalesOrderBrand(this.pageData).then(({data}) => { |
|||
//判断是否保存成功 |
|||
if(data.code === 200){ |
|||
this.$message.success(data.msg); |
|||
this.closeDialog(); |
|||
}else{ |
|||
this.$message.error(data.msg); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
}, |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
}, |
|||
created() { |
|||
// this.factoryList() |
|||
// this.getLanguageList() |
|||
} |
|||
} |
|||
|
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
/*调节页面button和input的上下间距*/ |
|||
.customer-css .customer-button{ |
|||
margin-top: 25px; |
|||
} |
|||
|
|||
/*调节fieldset下的样式*/ |
|||
.customer-fieldset .customer-item{ |
|||
margin-top: -15px; |
|||
} |
|||
|
|||
/*fieldset下table的样式*/ |
|||
.customer-fieldset /deep/ .el-table__header th.is-leaf{ |
|||
line-height: 16px; |
|||
} |
|||
|
|||
/deep/ .customer-tab .el-tabs__content{ |
|||
padding: 0px !important; |
|||
} |
|||
|
|||
</style> |
|||
@ -0,0 +1,180 @@ |
|||
<template> |
|||
<div class="customer-css"> |
|||
<el-dialog :title="titleCon" v-drag :close-on-click-modal="false" :visible.sync="visible" |
|||
width="480px" style="height: 680px;" class="customer-dialog"> |
|||
<el-form :inline="true" label-position="top" style="height: 100px;" |
|||
label-width="80px"> |
|||
<!-- 当前卷 --> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<el-form-item class="customer-item" label='店铺站点:'> |
|||
<el-input v-model="pageData.shopSite" style="width: 120px;" ></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="customer-item" label='店铺名称:'> |
|||
<el-input v-model="pageData.shopName" style="width: 120px;"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="customer-item" label="店铺编号:"> |
|||
<el-input v-model="pageData.shopId" style="width: 120px;"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<el-form-item class="customer-item" label='域:'> |
|||
<el-input v-model="pageData.contract" style="width: 120px;" ></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="customer-item" label='客户编号:'> |
|||
<el-input v-model="pageData.customerNo" style="width: 120px;"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="customer-item" label="订单类型:"> |
|||
<el-input v-model="pageData.orderType" style="width: 120px;"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<el-form-item class="customer-item" label='区分纯电商:'> |
|||
<el-input v-model="pageData.pureCustom" style="width: 120px;" ></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="customer-item" label='区分客户:'> |
|||
<el-input v-model="pageData.distinguishCustom" style="width: 120px;"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="customer-item" label="区分寄售:"> |
|||
<el-input v-model="pageData.consignmentFlag" style="width: 120px;"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<span slot="footer" class="dialog-footer" style="margin-top: -20px;"> |
|||
<el-button type="primary" @click="saveShopStore()">保存</el-button> |
|||
<el-button type="primary" @click="closeDialog">关闭</el-button> |
|||
</span> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
insertShopStore, |
|||
saveShopStore, |
|||
} from "@/api/jst/shop_store.js"; |
|||
var functionId = 'C10000006'; |
|||
export default { |
|||
data() { |
|||
return { |
|||
titleCon: '店铺维护', |
|||
visible: false, |
|||
addFlag: '', |
|||
pageData: { |
|||
contract: '', |
|||
shopSite: '', |
|||
shopId: '', |
|||
shopName: '', |
|||
customerNo: '', |
|||
pureCustom: '', |
|||
distinguishCustom: '', |
|||
consignmentFlag: '', |
|||
orderType: '', |
|||
}, |
|||
} |
|||
}, |
|||
methods: { |
|||
//初始化页面 |
|||
init(currentRow, addFlag) { |
|||
this.addFlag = addFlag; |
|||
//判断是否是新增 |
|||
if('N' === addFlag){ |
|||
this.pageData = JSON.parse(JSON.stringify(currentRow)); |
|||
}else{ |
|||
this.pageData = {}; |
|||
} |
|||
//打开modal |
|||
this.visible = true; |
|||
}, |
|||
|
|||
/*关闭modal*/ |
|||
closeDialog(){ |
|||
//刷新报工的页面 |
|||
this.$emit('refreshPageTables'); |
|||
//关闭当前的页面 |
|||
this.visible = false; |
|||
}, |
|||
|
|||
|
|||
/*保存店铺的相关的信息*/ |
|||
saveShopStore(){ |
|||
//区分新增还是保存 |
|||
if('Y' === this.addFlag){ |
|||
insertShopStore(this.pageData).then(({data}) => { |
|||
//判断是否保存成功 |
|||
if(data.code === 200){ |
|||
this.$message.success(data.msg); |
|||
this.closeDialog(); |
|||
}else{ |
|||
this.$message.error(data.msg); |
|||
} |
|||
}); |
|||
}else{ |
|||
saveShopStore(this.pageData).then(({data}) => { |
|||
//判断是否保存成功 |
|||
if(data.code === 200){ |
|||
this.$message.success(data.msg); |
|||
this.closeDialog(); |
|||
}else{ |
|||
this.$message.error(data.msg); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
}, |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
}, |
|||
created() { |
|||
// this.factoryList() |
|||
// this.getLanguageList() |
|||
} |
|||
} |
|||
|
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
/*调节页面button和input的上下间距*/ |
|||
.customer-css .customer-button{ |
|||
margin-top: 25px; |
|||
} |
|||
|
|||
/*调节fieldset下的样式*/ |
|||
.customer-fieldset .customer-item{ |
|||
margin-top: -15px; |
|||
} |
|||
|
|||
/*fieldset下table的样式*/ |
|||
.customer-fieldset /deep/ .el-table__header th.is-leaf{ |
|||
line-height: 16px; |
|||
} |
|||
|
|||
/deep/ .customer-tab .el-tabs__content{ |
|||
padding: 0px !important; |
|||
} |
|||
|
|||
</style> |
|||
@ -0,0 +1,137 @@ |
|||
<template> |
|||
<div class="customer-css"> |
|||
<el-dialog :title="titleCon" v-drag :close-on-click-modal="false" :visible.sync="visible" |
|||
width="240px" style="height: 680px;" class="customer-dialog"> |
|||
<el-form :inline="true" label-position="top" style="height: 10px;" |
|||
label-width="80px"> |
|||
<!-- 当前卷 --> |
|||
<el-row> |
|||
<el-col :span="20"> |
|||
<el-form-item class="customer-item" label='仓库名称:'> |
|||
<el-input v-model="pageData.warehouseName" :readonly=!this.addFlag style="width: 200px;" ></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="20"> |
|||
<el-form-item class="customer-item" label='仓库类型:'> |
|||
<el-input v-model="pageData.warehouseType" style="width: 200px;"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<span slot="footer" class="dialog-footer" style="margin-top: -20px;"> |
|||
<el-button type="primary" @click="saveWarehouse()">保存</el-button> |
|||
<el-button type="primary" @click="closeDialog">关闭</el-button> |
|||
</span> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
insertSalesOrderWarehouse, |
|||
saveSalesOrderWarehouse, |
|||
} from "@/api/jst/sales_order_warehouse.js"; |
|||
var functionId = 'C10000007'; |
|||
export default { |
|||
data() { |
|||
return { |
|||
titleCon: '仓库维护', |
|||
visible: false, |
|||
addFlag: true, |
|||
pageData: { |
|||
warehouseName: '', |
|||
warehouseType: '', |
|||
}, |
|||
} |
|||
}, |
|||
methods: { |
|||
//初始化页面 |
|||
init(currentRow, addFlag) { |
|||
//判断是否是新增 |
|||
if('N' === addFlag){ |
|||
this.pageData = JSON.parse(JSON.stringify(currentRow)); |
|||
this.addFlag = false; |
|||
}else{ |
|||
this.pageData = {}; |
|||
this.addFlag = true; |
|||
} |
|||
//打开modal |
|||
this.visible = true; |
|||
}, |
|||
|
|||
/*关闭modal*/ |
|||
closeDialog(){ |
|||
//刷新报工的页面 |
|||
this.$emit('refreshPageTables'); |
|||
//关闭当前的页面 |
|||
this.visible = false; |
|||
}, |
|||
|
|||
|
|||
/*保存店铺的相关的信息*/ |
|||
saveWarehouse(){ |
|||
//区分新增还是保存 |
|||
if(true === this.addFlag){ |
|||
insertSalesOrderWarehouse(this.pageData).then(({data}) => { |
|||
//判断是否保存成功 |
|||
if(data.code === 200){ |
|||
this.$message.success(data.msg); |
|||
this.closeDialog(); |
|||
}else{ |
|||
this.$message.error(data.msg); |
|||
} |
|||
}); |
|||
}else{ |
|||
saveSalesOrderWarehouse(this.pageData).then(({data}) => { |
|||
//判断是否保存成功 |
|||
if(data.code === 200){ |
|||
this.$message.success(data.msg); |
|||
this.closeDialog(); |
|||
}else{ |
|||
this.$message.error(data.msg); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
}, |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
}, |
|||
created() { |
|||
// this.factoryList() |
|||
// this.getLanguageList() |
|||
} |
|||
} |
|||
|
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
/*调节页面button和input的上下间距*/ |
|||
.customer-css .customer-button{ |
|||
margin-top: 25px; |
|||
} |
|||
|
|||
/*调节fieldset下的样式*/ |
|||
.customer-fieldset .customer-item{ |
|||
margin-top: -15px; |
|||
} |
|||
|
|||
/*fieldset下table的样式*/ |
|||
.customer-fieldset /deep/ .el-table__header th.is-leaf{ |
|||
line-height: 16px; |
|||
} |
|||
|
|||
/deep/ .customer-tab .el-tabs__content{ |
|||
padding: 0px !important; |
|||
} |
|||
|
|||
</style> |
|||
@ -0,0 +1,117 @@ |
|||
<template> |
|||
<div class="customer-css"> |
|||
<el-dialog :title="titleCon" :close-on-click-modal="false" :visible.sync="visible" width="420px" style="height: 520px;" class="customer-dialog"> |
|||
<el-form :inline="true" label-position="top" label-width="80px"> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<el-upload class="customer-upload" |
|||
drag |
|||
action="javascript:void(0);" ref="uploadFile" :limit="1" |
|||
:before-upload="beforeUploadHandle" :on-change="onChange" |
|||
accept=".xlsx,.pdf,.PDF" :auto-upload="false" |
|||
style="text-align: left;"> |
|||
<i class="el-icon-upload"></i> |
|||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> |
|||
</el-upload> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<span slot="footer" class="dialog-footer"> |
|||
<el-button type="primary" @click="saveUploadFile()">保存</el-button> |
|||
<el-button type="primary" @click="closeDialog">关闭</el-button> |
|||
</span> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
uploadSalesOrderFile, |
|||
} from '@/api/jst/com_sales_order_upload_file.js'; |
|||
|
|||
/* 引入组件 */ |
|||
var functionId = 'C10000002'; |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
titleCon: '文件上传', |
|||
folder: 'salesOrder', |
|||
visible: false, |
|||
userId: this.$store.state.user.name, |
|||
fileList: [], |
|||
pageData: { |
|||
fileRemark: '', |
|||
}, |
|||
dataListLoading: false, |
|||
} |
|||
}, |
|||
methods: { |
|||
//初始化组件的参数 |
|||
init() { |
|||
//打开页面 |
|||
this.visible = true; |
|||
//重置人员信息 |
|||
this.pageData.username = this.userId; |
|||
//重置标题 |
|||
//this.titleCon = this.labels.titleCon; |
|||
}, |
|||
|
|||
// 上传之前 |
|||
beforeUploadHandle (file) { |
|||
if (file.type !== "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" && file.type !== "application/vnd.ms-excel") { |
|||
this.$message.error('只支持xls、xlsx、格式的文件!') |
|||
return false; |
|||
} |
|||
}, |
|||
|
|||
/*选择上传文件时*/ |
|||
onChange(file){ |
|||
this.fileList.push(file); |
|||
}, |
|||
|
|||
/*关闭modal*/ |
|||
closeDialog(){ |
|||
//刷新报工的页面 |
|||
this.$emit('refreshPageTables'); |
|||
//关闭当前的页面 |
|||
this.visible = false; |
|||
}, |
|||
|
|||
/*保修当前的数据*/ |
|||
saveUploadFile(){ |
|||
|
|||
/*判断文件是否上传*/ |
|||
if(null == this.fileList || 0 == this.fileList.length){ |
|||
this.$message.error("请先上传文件!"); |
|||
return false; |
|||
} |
|||
const formData = new FormData(); |
|||
//片接文件 |
|||
formData.append("file", this.fileList[0].raw); |
|||
formData.append("folder", this.folder); |
|||
uploadSalesOrderFile(formData).then(({data}) => { |
|||
if (data.code === 200) { |
|||
this.$message.success(data.msg); |
|||
//清空文件上传记录 |
|||
this.$refs.uploadFile.clearFiles(); |
|||
//关闭弹窗 |
|||
this.closeDialog(); |
|||
}else { |
|||
this.$message.warning(data.msg); |
|||
} |
|||
}) |
|||
} |
|||
|
|||
}, |
|||
created() { |
|||
// this.factoryList() |
|||
// this.getLanguageList() |
|||
} |
|||
} |
|||
|
|||
</script> |
|||
<style scoped lang="scss"> |
|||
|
|||
|
|||
</style> |
|||
@ -0,0 +1,228 @@ |
|||
<template> |
|||
<div class="mod-config"> |
|||
<el-form v-model="searchData"> |
|||
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;" > |
|||
<el-form-item :label="'仓库名称:'"> |
|||
<el-input v-model="searchData.brandName" style="width: 120px"></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="' '"> |
|||
<el-button @click="refreshPageTables()" style="margin-left: 0px" type="primary">查询</el-button> |
|||
<el-button @click="addOrUpdateModal('Y')" style="margin-left: 14px" type="primary">新增</el-button> |
|||
<el-button @click="addOrUpdateModal('N')" style="margin-left: 14px" type="primary">修改</el-button> |
|||
</el-form-item> |
|||
<el-form-item :label="' '"> |
|||
<download-excel |
|||
:fields="fields()" |
|||
type="xls" |
|||
:name="exportName" |
|||
:fetch="createExportData" |
|||
worksheet="导出信息" |
|||
class="el-button el-button--primary el-button--medium"> |
|||
{{ '导出' }} |
|||
</download-excel> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-form> |
|||
<el-table |
|||
:height="height" |
|||
:data="tableData" |
|||
ref="fileTable" |
|||
highlight-current-row |
|||
@row-click="setCurrentRow" |
|||
@current-change="changeCurrentRow" |
|||
border |
|||
style="width: 100%"> |
|||
<el-table-column |
|||
v-for="(item,index) in columnList" :key="index" |
|||
:sortable="item.columnSortable" |
|||
:prop="item.columnProp" |
|||
header-align="center" |
|||
:show-overflow-tooltip="item.showOverflowTooltip" |
|||
:align="item.align" |
|||
:fixed="item.fixed==''?false:item.fixed" |
|||
:min-width="item.columnWidth" |
|||
:label="item.columnLabel"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
|||
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
|||
style="width: 100px; height: 80px"/></span> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
</el-table> |
|||
<!--新增或者修改--> |
|||
<comAddUpdateBrand ref="comAddUpdateBrand" @refreshPageTables="refreshPageTables" v-drag></comAddUpdateBrand> |
|||
</div> |
|||
|
|||
|
|||
</template> |
|||
|
|||
<script> |
|||
import comAddUpdateBrand from "./com_add_update_brand"; |
|||
import { |
|||
getSalesOrderBrand, |
|||
} from '@/api/jst/sales_order_brand.js' |
|||
import Vue from 'vue' |
|||
|
|||
|
|||
export default { |
|||
name: 'salesOrder', |
|||
data () { |
|||
return { |
|||
// 导出+动态列 start |
|||
exportData: [], |
|||
exportName: '品牌表' + this.getStrDate(), |
|||
columnList: [ |
|||
{ |
|||
tableId: 'brandHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'brandName', |
|||
columnLabel: '品牌名称', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 30, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'left' |
|||
}, |
|||
{ |
|||
tableId: 'brandHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'brandContract', |
|||
columnLabel: '品牌域', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 60, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'left' |
|||
}, |
|||
{ |
|||
tableId: 'brandHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'createdDate', |
|||
columnLabel: '创建时间', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 60, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'left' |
|||
}, |
|||
], |
|||
currentRow:{}, |
|||
visible: false, |
|||
// 导出 end |
|||
height: 200, |
|||
tableData: [], |
|||
searchData: { |
|||
brandName: '', |
|||
}, |
|||
} |
|||
}, |
|||
|
|||
components: { |
|||
comAddUpdateBrand,/*新增或修改*/ |
|||
}, |
|||
mounted () { |
|||
this.$nextTick(() => { |
|||
this.height = window.innerHeight - 150 |
|||
}) |
|||
}, |
|||
methods: { |
|||
refreshPageTables () { |
|||
getSalesOrderBrand(this.searchData).then(({data}) => { |
|||
this.tableData = data.rows; |
|||
if(data.total > 0){ |
|||
//设置选中行 |
|||
this.$refs.fileTable.setCurrentRow(this.tableData[0]); |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
/*设置工艺的行*/ |
|||
setCurrentRow(row, column, event) { |
|||
this.currentRow = row; |
|||
}, |
|||
|
|||
// 选中记录 |
|||
/*当前值发生变化的时候修改*/ |
|||
changeCurrentRow(row, oldRow){ |
|||
//判断是否是获取焦点的事件 |
|||
if(row){ |
|||
this.currentRow = JSON.parse(JSON.stringify(row)); |
|||
} |
|||
}, |
|||
|
|||
// 导出+动态列 |
|||
fields () { |
|||
let json = '{' |
|||
this.columnList.forEach((item, index) => { |
|||
if (index === this.columnList.length - 1) { |
|||
json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' |
|||
} else { |
|||
json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ',' |
|||
} |
|||
}) |
|||
json += '}' |
|||
return eval('(' + json + ')') |
|||
}, |
|||
createExportData () { |
|||
// 点击导出按钮之后,开始导出数据之前的执行函数,返回值为需要下载的数据 |
|||
return this.tableData |
|||
}, |
|||
getStrDate () { |
|||
let dd = new Date() |
|||
let Y = dd.getFullYear() |
|||
let M = (dd.getMonth() + 1) < 10 ? '0' + (dd.getMonth() + 1) : (dd.getMonth() + 1)// 获取当前月份的日期,不足10补0 |
|||
let D = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate()// 获取当前几号,不足10补0 |
|||
let H = dd.getHours() < 10 ? '0' + dd.getHours() : dd.getHours() |
|||
let MM = dd.getMinutes() < 10 ? '0' + dd.getMinutes() : dd.getMinutes() |
|||
let S = dd.getSeconds() < 10 ? '0' + dd.getSeconds() : dd.getSeconds() |
|||
return Y + M + D + H + MM + S |
|||
}, |
|||
|
|||
|
|||
/*新增或修改的modal*/ |
|||
addOrUpdateModal(addFlag){ |
|||
//打开组件 去做新增业务 |
|||
this.$nextTick(() => { |
|||
//区分是否是新增 |
|||
if('Y' === addFlag){ |
|||
this.$refs.comAddUpdateBrand.init({}, addFlag); |
|||
}else{ |
|||
this.$refs.comAddUpdateBrand.init(this.currentRow, addFlag); |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
}, |
|||
|
|||
created() { |
|||
this.refreshPageTables(); |
|||
// this.getLanguageList() |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
|||
@ -0,0 +1,229 @@ |
|||
<template> |
|||
<div class="mod-config"> |
|||
<el-form inline="true" v-model="searchData"> |
|||
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;" > |
|||
<el-form-item :label="'异常分类:'"> |
|||
<el-input v-model="searchData.orderNo" style="width: 120px"></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'异常描述:'"> |
|||
<el-input v-model="searchData.exceptionDesc" style="width: 120px"></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'异常信息:'"> |
|||
<el-input v-model="searchData.exceptionData" style="width: 120px"></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="' '"> |
|||
<el-button @click="searchException()" style="margin-left: 0px" type="primary">查询</el-button> |
|||
</el-form-item> |
|||
<el-form-item :label="' '"> |
|||
<download-excel |
|||
:fields="fields()" |
|||
type="xls" |
|||
:name="exportName" |
|||
:fetch="createExportData" |
|||
worksheet="导出信息" |
|||
class="el-button el-button--primary el-button--medium"> |
|||
{{ '导出' }} |
|||
</download-excel> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-form> |
|||
<el-table |
|||
:height="height" |
|||
:data="tableData" |
|||
border |
|||
style="width: 100%"> |
|||
<el-table-column |
|||
v-for="(item,index) in columnList" :key="index" |
|||
:sortable="item.columnSortable" |
|||
:prop="item.columnProp" |
|||
header-align="center" |
|||
:show-overflow-tooltip="item.showOverflowTooltip" |
|||
:align="item.align" |
|||
:fixed="item.fixed==''?false:item.fixed" |
|||
:min-width="item.columnWidth" |
|||
:label="item.columnLabel"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
|||
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
|||
style="width: 100px; height: 80px"/></span> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
</el-table> |
|||
<!--文件上传--> |
|||
<comSalesOrderUploadFile ref="comSalesOrderUploadFile" v-drag></comSalesOrderUploadFile> |
|||
</div> |
|||
|
|||
|
|||
</template> |
|||
|
|||
<script> |
|||
import comSalesOrderUploadFile from "./com_sales_order_upload_file";/*上传文件的組件*/ |
|||
import { |
|||
getExceptionList, |
|||
} from '@/api/jst/sales_order_exception.js' |
|||
|
|||
export default { |
|||
name: 'salesOrder', |
|||
data () { |
|||
return { |
|||
// 导出+动态列 start |
|||
exportData: [], |
|||
userDev: this.$store.state.user.userDev, |
|||
exportName: '异常记录表' + this.getStrDate(), |
|||
columnList: [ |
|||
{ |
|||
tableId: 'ExceptionDataHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'exceptionType', |
|||
columnLabel: '异常类型', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 60, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'left' |
|||
}, |
|||
{ |
|||
tableId: 'ExceptionDataHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'exceptionDesc', |
|||
columnLabel: '异常描述', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 120, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'left' |
|||
}, |
|||
{ |
|||
tableId: 'ExceptionDataHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'exceptionData', |
|||
columnLabel: '异常信息', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 180, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'left' |
|||
}, |
|||
{ |
|||
tableId: 'ExceptionDataHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'exceptionTime', |
|||
columnLabel: '异常记录时间', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 120, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'left' |
|||
} |
|||
], |
|||
visible: false, |
|||
// 导出 end |
|||
height: 200, |
|||
tableData: [], |
|||
searchData: { |
|||
exceptionType: '', |
|||
exceptionDesc: '', |
|||
exceptionData: '' |
|||
}, |
|||
} |
|||
}, |
|||
|
|||
components: { |
|||
comSalesOrderUploadFile,/*文件上传的组件*/ |
|||
}, |
|||
mounted () { |
|||
this.$nextTick(() => { |
|||
this.height = window.innerHeight - 150 |
|||
}) |
|||
}, |
|||
methods: { |
|||
searchException () { |
|||
getExceptionList(this.searchData).then(({data}) => { |
|||
this.tableData = data.rows |
|||
}) |
|||
}, |
|||
|
|||
checkSalesOrder () { |
|||
checkSalesOrder().then(({data}) => { |
|||
this.$message.success('操作成功') |
|||
}) |
|||
}, |
|||
// 导出+动态列 |
|||
fields () { |
|||
let json = '{' |
|||
this.columnList.forEach((item, index) => { |
|||
if (index === this.columnList.length - 1) { |
|||
json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' |
|||
} else { |
|||
json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ',' |
|||
} |
|||
}) |
|||
json += '}' |
|||
return eval('(' + json + ')') |
|||
}, |
|||
createExportData () { |
|||
// 点击导出按钮之后,开始导出数据之前的执行函数,返回值为需要下载的数据 |
|||
return this.tableData |
|||
}, |
|||
getStrDate () { |
|||
let dd = new Date() |
|||
let Y = dd.getFullYear() |
|||
let M = (dd.getMonth() + 1) < 10 ? '0' + (dd.getMonth() + 1) : (dd.getMonth() + 1)// 获取当前月份的日期,不足10补0 |
|||
let D = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate()// 获取当前几号,不足10补0 |
|||
let H = dd.getHours() < 10 ? '0' + dd.getHours() : dd.getHours() |
|||
let MM = dd.getMinutes() < 10 ? '0' + dd.getMinutes() : dd.getMinutes() |
|||
let S = dd.getSeconds() < 10 ? '0' + dd.getSeconds() : dd.getSeconds() |
|||
return Y + M + D + H + MM + S |
|||
}, |
|||
userSetting () { |
|||
this.visible = true |
|||
this.$nextTick(() => { |
|||
this.$refs.column.init(this.queryTable) |
|||
}) |
|||
}, |
|||
|
|||
/*新增文件的modal*/ |
|||
addUploadFileModal(){ |
|||
//打开组件 去做新增业务 |
|||
this.$nextTick(() => { |
|||
this.$refs.comSalesOrderUploadFile.init(); |
|||
}) |
|||
}, |
|||
|
|||
} |
|||
|
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
|||
@ -0,0 +1,475 @@ |
|||
<template> |
|||
<div class="mod-config"> |
|||
<el-form v-model="searchData"> |
|||
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;" > |
|||
<el-form-item :label="'文件名:'"> |
|||
<el-input v-model="searchData.fileName" style="width: 120px"></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'文件状态:'"> |
|||
<el-select v-model="searchData.status" style="width: 120px"> |
|||
<el-option label="已上传" value="uploaded"></el-option> |
|||
<el-option label="已导入" value="inserted" el-selected></el-option> |
|||
<el-option label="已检查" value="checked"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item :label="' '"> |
|||
<el-button @click="refreshPageTables()" style="margin-left: 0px" type="primary">查询</el-button> |
|||
<el-button @click="addUploadFileModal()" style="margin-left: 14px" type="primary">销售明细上传</el-button> |
|||
<el-button @click="insertSalesOrderItems()" style="margin-left: 14px" type="primary">销售明细导入</el-button> |
|||
<el-button @click="checkSalesOrder()" style="margin-left: 0px" type="primary">开始检查</el-button> |
|||
<el-button @click="exportSalesOrder()" style="margin-left: 0px" type="primary">导出销售明细</el-button> |
|||
</el-form-item> |
|||
<el-form-item :label="' '"> |
|||
<download-excel |
|||
:fields="fields()" |
|||
type="xls" |
|||
:name="exportName" |
|||
:fetch="createExportData" |
|||
worksheet="导出信息" |
|||
class="el-button el-button--primary el-button--medium"> |
|||
{{ '导出' }} |
|||
</download-excel> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-form> |
|||
<el-table |
|||
:height="height" |
|||
:data="tableData" |
|||
ref="fileTable" |
|||
highlight-current-row |
|||
@row-click="setCurrentRow" |
|||
@current-change="changeCurrentRow" |
|||
border |
|||
style="width: 100%"> |
|||
<el-table-column |
|||
v-for="(item,index) in columnList" :key="index" |
|||
:sortable="item.columnSortable" |
|||
:prop="item.columnProp" |
|||
header-align="center" |
|||
:show-overflow-tooltip="item.showOverflowTooltip" |
|||
:align="item.align" |
|||
:fixed="item.fixed==''?false:item.fixed" |
|||
:min-width="item.columnWidth" |
|||
:label="item.columnLabel"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
|||
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
|||
style="width: 100px; height: 80px"/></span> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
</el-table> |
|||
<!--文件上传--> |
|||
<comSalesOrderUploadFile ref="comSalesOrderUploadFile" @refreshPageTables="refreshPageTables" v-drag></comSalesOrderUploadFile> |
|||
</div> |
|||
|
|||
|
|||
</template> |
|||
|
|||
<script> |
|||
import comSalesOrderUploadFile from "./com_sales_order_upload_file";/*上传文件的組件*/ |
|||
import axios from "axios"; |
|||
import { |
|||
getSaleOrderFileHist, |
|||
batchInsertSalesOrderItems, |
|||
checkSalesOrderException, |
|||
downSalesOrder, |
|||
} from '@/api/jst/sales_order_item_upload.js' |
|||
import Vue from 'vue' |
|||
|
|||
export default { |
|||
name: 'salesOrder', |
|||
data () { |
|||
return { |
|||
// 导出+动态列 start |
|||
exportData: [], |
|||
userDev: this.$store.state.user.userDev, |
|||
exportName: '上传记录表' + this.getStrDate(), |
|||
columnList: [ |
|||
{ |
|||
tableId: 'salesOrderHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'fileName', |
|||
columnLabel: '文件名', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 120, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'left' |
|||
}, |
|||
{ |
|||
tableId: 'salesOrderHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'status', |
|||
columnLabel: '状态', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 60, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'left' |
|||
}, |
|||
{ |
|||
tableId: 'salesOrderHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'uploadBy', |
|||
columnLabel: '上传人', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 60, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'left' |
|||
}, |
|||
{ |
|||
tableId: 'salesOrderHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'uploadDate', |
|||
columnLabel: '上传时间', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 120, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'left' |
|||
}, |
|||
{ |
|||
tableId: 'salesOrderHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'insertBy', |
|||
columnLabel: '导入人', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 60, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'left' |
|||
}, |
|||
{ |
|||
tableId: 'salesOrderHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'insertDate', |
|||
columnLabel: '导入时间', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 120, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'left' |
|||
}, |
|||
{ |
|||
tableId: 'salesOrderHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'checkBy', |
|||
columnLabel: '检查人', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 60, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'left' |
|||
}, |
|||
{ |
|||
tableId: 'salesOrderHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'checkDate', |
|||
columnLabel: '检查时间', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 120, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'left' |
|||
}, |
|||
{ |
|||
tableId: 'salesOrderHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'itemCount', |
|||
columnLabel: '当前明细数量', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 80, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'right' |
|||
}, |
|||
], |
|||
currentRow:{}, |
|||
visible: false, |
|||
// 导出 end |
|||
height: 200, |
|||
tableData: [], |
|||
searchData: { |
|||
fileName: '', |
|||
status: 'uploaded', |
|||
}, |
|||
} |
|||
}, |
|||
|
|||
components: { |
|||
comSalesOrderUploadFile,/*文件上传的组件*/ |
|||
}, |
|||
mounted () { |
|||
this.$nextTick(() => { |
|||
this.height = window.innerHeight - 150 |
|||
}) |
|||
}, |
|||
methods: { |
|||
refreshPageTables () { |
|||
getSaleOrderFileHist(this.searchData).then(({data}) => { |
|||
this.tableData = data.rows; |
|||
if(data.total > 0){ |
|||
//设置选中行 |
|||
this.$refs.fileTable.setCurrentRow(this.tableData[0]); |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
//excel转导入的数据 |
|||
insertSalesOrderItems(){ |
|||
batchInsertSalesOrderItems(this.currentRow).then(({data}) =>{ |
|||
if(data.code === 200){ |
|||
this.$message.success('操作成功!'); |
|||
//刷新当前页面数据 |
|||
this.refreshPageTables(); |
|||
}else{ |
|||
this.$message.error(data.msg) |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
checkSalesOrder () { |
|||
checkSalesOrderException().then(({data}) => { |
|||
if(data.code === 200){ |
|||
this.$message.success('操作成功!'); |
|||
//刷新当前页面数据 |
|||
this.refreshPageTables(); |
|||
}else{ |
|||
this.$message.error(data.msg) |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
/*设置工艺的行*/ |
|||
setCurrentRow(row, column, event) { |
|||
this.currentRow = row; |
|||
}, |
|||
|
|||
// 选中记录 |
|||
/*当前值发生变化的时候修改*/ |
|||
changeCurrentRow(row, oldRow){ |
|||
//判断是否是获取焦点的事件 |
|||
if(row){ |
|||
this.currentRow = JSON.parse(JSON.stringify(row)); |
|||
} |
|||
}, |
|||
|
|||
|
|||
|
|||
// 导出+动态列 |
|||
fields () { |
|||
let json = '{' |
|||
this.columnList.forEach((item, index) => { |
|||
if (index === this.columnList.length - 1) { |
|||
json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' |
|||
} else { |
|||
json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ',' |
|||
} |
|||
}) |
|||
json += '}' |
|||
return eval('(' + json + ')') |
|||
}, |
|||
createExportData () { |
|||
// 点击导出按钮之后,开始导出数据之前的执行函数,返回值为需要下载的数据 |
|||
return this.tableData |
|||
}, |
|||
getStrDate () { |
|||
let dd = new Date() |
|||
let Y = dd.getFullYear() |
|||
let M = (dd.getMonth() + 1) < 10 ? '0' + (dd.getMonth() + 1) : (dd.getMonth() + 1)// 获取当前月份的日期,不足10补0 |
|||
let D = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate()// 获取当前几号,不足10补0 |
|||
let H = dd.getHours() < 10 ? '0' + dd.getHours() : dd.getHours() |
|||
let MM = dd.getMinutes() < 10 ? '0' + dd.getMinutes() : dd.getMinutes() |
|||
let S = dd.getSeconds() < 10 ? '0' + dd.getSeconds() : dd.getSeconds() |
|||
return Y + M + D + H + MM + S |
|||
}, |
|||
userSetting () { |
|||
this.visible = true |
|||
this.$nextTick(() => { |
|||
this.$refs.column.init(this.queryTable) |
|||
}) |
|||
}, |
|||
|
|||
/*新增文件的modal*/ |
|||
addUploadFileModal(){ |
|||
//打开组件 去做新增业务 |
|||
this.$nextTick(() => { |
|||
this.$refs.comSalesOrderUploadFile.init(); |
|||
}) |
|||
}, |
|||
|
|||
/*导出销售单明细的数据*/ |
|||
exportSalesOrder(){ |
|||
downSalesOrder('download').then(({data}) => { |
|||
// 不限制文件下载类型 |
|||
const blob = new Blob([data], {type: 'application/octet-stream;charset=utf-8'}) |
|||
// 下载文件名称 |
|||
const fileName = '销售单明细.xlsx'; |
|||
// a标签下载 |
|||
const linkNode = document.createElement('a') |
|||
linkNode.download = fileName // a标签的download属性规定下载文件的名称 |
|||
linkNode.style.display = 'none' |
|||
linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL |
|||
console.log(linkNode) |
|||
// if(val == 'Y'){ |
|||
// this.pdfVisible = true |
|||
// this.pdfUrl = linkNode.href |
|||
// }else { |
|||
document.body.appendChild(linkNode) |
|||
linkNode.click() // 模拟在按钮上的一次鼠标单击 |
|||
URL.revokeObjectURL(linkNode.href) // 释放URL 对象 |
|||
document.body.removeChild(linkNode) |
|||
}) |
|||
|
|||
/*axios.get('/proxyApi/jst/downSalesOrder?remark=销售明细', { |
|||
responseType: 'blob', |
|||
headers: { |
|||
'Content-Type': 'application/json', |
|||
'token': Vue.cookie.get('token') |
|||
} |
|||
}).then(({data}) => { |
|||
// 不限制文件下载类型 |
|||
const blob = new Blob([data], {type: "application/octet-stream"}) |
|||
// 下载文件名称 |
|||
const fileName = "销售明细.xlsx" |
|||
console.info(fileName); |
|||
// a标签下载 |
|||
const linkNode = document.createElement('a') |
|||
linkNode.download = fileName // a标签的download属性规定下载文件的名称 |
|||
linkNode.style.display = 'none' |
|||
linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL |
|||
debugger; |
|||
document.body.appendChild(linkNode) |
|||
linkNode.click() // 模拟在按钮上的一次鼠标单击 |
|||
URL.revokeObjectURL(linkNode.href) // 释放URL 对象 |
|||
document.body.removeChild(linkNode) |
|||
// } |
|||
})*/ |
|||
/*let url = '/api/ftp/file//downSalesOrder' |
|||
let token = Vue.cookie.get('token'); |
|||
axios.get(url,{ |
|||
headers: { |
|||
'Content-Type': 'application/json', |
|||
'token': token |
|||
}, |
|||
responseType: 'blob',//二进制流 |
|||
}).then(function (res) { |
|||
if (!res) return |
|||
let blob = new Blob([res.data], {type: 'application/vnd.ms-excel;charset=utf8'}) |
|||
var downloadElement = documentcreateElement('a'); |
|||
var href = window.URL.createObjectURL(blob); //创建下载的链接 |
|||
downloadElement.href = href; |
|||
downloadElement.download = '销售明细导出.xlsx'; //下载后文件名 |
|||
document.body.appendChild(downloadElement); |
|||
downloadElement.click(); //点击下载 |
|||
document.body.removeChild(downloadElement); //下载完成移除元素 |
|||
window.URL.revokeobjectURL(href); //释放掉blob对象 |
|||
}).catch(function (error){ |
|||
console.log(error) |
|||
})*/ |
|||
/*let url = '/proxyApi/jst/downSalesOrder?remark=销售明细'; |
|||
const xhr = new XMLHttpRequest() |
|||
xhr.open('get', url) |
|||
xhr.responseType = 'blob'//设置后端返回类型为二进制流,不设置会返回乱码 |
|||
xhr.setRequestHeader('token', Vue.cookie.get('token')) // 若依的鉴权token |
|||
xhr.onreadystatechange = function() { |
|||
if (this.readyState === 4 && this.status === 200) { |
|||
const name = '销售明细'; |
|||
// 支持IE浏览器 |
|||
if (window.navigator && window.navigator.msSaveOrOpenBlob) { |
|||
window.navigator.msSaveOrOpenBlob(this.response, name) |
|||
return |
|||
} |
|||
const href = window.URL.createObjectURL(this.response) |
|||
const link = document.createElement('a') |
|||
link.style.display = 'none' |
|||
link.href = href |
|||
link.setAttribute('download', name) |
|||
document.body.appendChild(link) |
|||
link.click() |
|||
document.body.removeChild(link) |
|||
window.URL.revokeObjectURL(href) // 释放掉blob对象 |
|||
} |
|||
} |
|||
xhr.send();*/ |
|||
}, |
|||
|
|||
|
|||
|
|||
}, |
|||
|
|||
created() { |
|||
this.refreshPageTables(); |
|||
// this.getLanguageList() |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
|||
@ -0,0 +1,233 @@ |
|||
<template> |
|||
<div class="mod-config"> |
|||
<el-form v-model="searchData"> |
|||
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;" > |
|||
<el-form-item :label="'仓库名称:'"> |
|||
<el-input v-model="searchData.warehouseName" style="width: 120px"></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="' '"> |
|||
<el-button @click="refreshPageTables()" style="margin-left: 0px" type="primary">查询</el-button> |
|||
<el-button @click="addOrUpdateModal('Y')" style="margin-left: 14px" type="primary">新增</el-button> |
|||
<el-button @click="addOrUpdateModal('N')" style="margin-left: 14px" type="primary">修改</el-button> |
|||
</el-form-item> |
|||
<el-form-item :label="' '"> |
|||
<download-excel |
|||
:fields="fields()" |
|||
type="xls" |
|||
:name="exportName" |
|||
:fetch="createExportData" |
|||
worksheet="导出信息" |
|||
class="el-button el-button--primary el-button--medium"> |
|||
{{ '导出' }} |
|||
</download-excel> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-form> |
|||
<el-table |
|||
:height="height" |
|||
:data="tableData" |
|||
ref="fileTable" |
|||
highlight-current-row |
|||
@row-click="setCurrentRow" |
|||
@current-change="changeCurrentRow" |
|||
border |
|||
style="width: 100%"> |
|||
<el-table-column |
|||
v-for="(item,index) in columnList" :key="index" |
|||
:sortable="item.columnSortable" |
|||
:prop="item.columnProp" |
|||
header-align="center" |
|||
:show-overflow-tooltip="item.showOverflowTooltip" |
|||
:align="item.align" |
|||
:fixed="item.fixed==''?false:item.fixed" |
|||
:min-width="item.columnWidth" |
|||
:label="item.columnLabel"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
|||
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
|||
style="width: 100px; height: 80px"/></span> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
</el-table> |
|||
<!--新增或者修改--> |
|||
<comAddUpdateWarehouse ref="comAddUpdateWarehouse" @refreshPageTables="refreshPageTables" v-drag></comAddUpdateWarehouse> |
|||
</div> |
|||
|
|||
|
|||
</template> |
|||
|
|||
<script> |
|||
import comAddUpdateWarehouse from "./com_add_update_warehouse"; |
|||
import { |
|||
getSalesOrderWarehouse, |
|||
} from '@/api/jst/sales_order_warehouse.js' |
|||
import Vue from 'vue' |
|||
|
|||
|
|||
export default { |
|||
name: 'salesOrder', |
|||
data () { |
|||
return { |
|||
// 导出+动态列 start |
|||
exportData: [], |
|||
exportName: '发货仓表' + this.getStrDate(), |
|||
columnList: [ |
|||
{ |
|||
tableId: 'warehouseHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'warehouseName', |
|||
columnLabel: '仓库名称', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 30, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'left' |
|||
}, |
|||
{ |
|||
tableId: 'warehouseHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'warehouseType', |
|||
columnLabel: '仓库类型', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 60, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'left' |
|||
}, |
|||
{ |
|||
tableId: 'warehouseHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'createdDate', |
|||
columnLabel: '创建时间', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 60, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'left' |
|||
}, |
|||
], |
|||
currentRow:{}, |
|||
visible: false, |
|||
// 导出 end |
|||
height: 200, |
|||
tableData: [], |
|||
searchData: { |
|||
warehouseName: '', |
|||
}, |
|||
} |
|||
}, |
|||
|
|||
components: { |
|||
comAddUpdateWarehouse,/*新增或修改*/ |
|||
}, |
|||
mounted () { |
|||
this.$nextTick(() => { |
|||
this.height = window.innerHeight - 150 |
|||
}) |
|||
}, |
|||
methods: { |
|||
refreshPageTables () { |
|||
getSalesOrderWarehouse(this.searchData).then(({data}) => { |
|||
this.tableData = data.rows; |
|||
if(data.total > 0){ |
|||
//设置选中行 |
|||
this.$refs.fileTable.setCurrentRow(this.tableData[0]); |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
|
|||
|
|||
|
|||
/*设置工艺的行*/ |
|||
setCurrentRow(row, column, event) { |
|||
this.currentRow = row; |
|||
}, |
|||
|
|||
// 选中记录 |
|||
/*当前值发生变化的时候修改*/ |
|||
changeCurrentRow(row, oldRow){ |
|||
//判断是否是获取焦点的事件 |
|||
if(row){ |
|||
this.currentRow = JSON.parse(JSON.stringify(row)); |
|||
} |
|||
}, |
|||
|
|||
|
|||
|
|||
// 导出+动态列 |
|||
fields () { |
|||
let json = '{' |
|||
this.columnList.forEach((item, index) => { |
|||
if (index === this.columnList.length - 1) { |
|||
json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' |
|||
} else { |
|||
json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ',' |
|||
} |
|||
}) |
|||
json += '}' |
|||
return eval('(' + json + ')') |
|||
}, |
|||
createExportData () { |
|||
// 点击导出按钮之后,开始导出数据之前的执行函数,返回值为需要下载的数据 |
|||
return this.tableData |
|||
}, |
|||
getStrDate () { |
|||
let dd = new Date() |
|||
let Y = dd.getFullYear() |
|||
let M = (dd.getMonth() + 1) < 10 ? '0' + (dd.getMonth() + 1) : (dd.getMonth() + 1)// 获取当前月份的日期,不足10补0 |
|||
let D = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate()// 获取当前几号,不足10补0 |
|||
let H = dd.getHours() < 10 ? '0' + dd.getHours() : dd.getHours() |
|||
let MM = dd.getMinutes() < 10 ? '0' + dd.getMinutes() : dd.getMinutes() |
|||
let S = dd.getSeconds() < 10 ? '0' + dd.getSeconds() : dd.getSeconds() |
|||
return Y + M + D + H + MM + S |
|||
}, |
|||
|
|||
|
|||
/*新增或修改的modal*/ |
|||
addOrUpdateModal(addFlag){ |
|||
//打开组件 去做新增业务 |
|||
this.$nextTick(() => { |
|||
//区分是否是新增 |
|||
if('Y' === addFlag){ |
|||
this.$refs.comAddUpdateWarehouse.init({}, addFlag); |
|||
}else{ |
|||
this.$refs.comAddUpdateWarehouse.init(this.currentRow, addFlag); |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
}, |
|||
|
|||
created() { |
|||
this.refreshPageTables(); |
|||
// this.getLanguageList() |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
|||
@ -0,0 +1,347 @@ |
|||
<template> |
|||
<div class="mod-config"> |
|||
<el-form v-model="searchData"> |
|||
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;" > |
|||
<el-form-item :label="'店铺名称:'"> |
|||
<el-input v-model="searchData.shopName" style="width: 120px"></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'店铺编号:'"> |
|||
<el-input v-model="searchData.shopId" style="width: 120px"></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="' '"> |
|||
<el-button @click="refreshPageTables()" style="margin-left: 0px" type="primary">查询</el-button> |
|||
<el-button @click="addOrUpdateModal('Y')" style="margin-left: 14px" type="primary">新增</el-button> |
|||
<el-button @click="addOrUpdateModal('N')" style="margin-left: 14px" type="primary">修改</el-button> |
|||
</el-form-item> |
|||
<el-form-item :label="' '"> |
|||
<download-excel |
|||
:fields="fields()" |
|||
type="xls" |
|||
:name="exportName" |
|||
:fetch="createExportData" |
|||
worksheet="导出信息" |
|||
class="el-button el-button--primary el-button--medium"> |
|||
{{ '导出' }} |
|||
</download-excel> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-form> |
|||
<el-table |
|||
:height="height" |
|||
:data="tableData" |
|||
ref="fileTable" |
|||
highlight-current-row |
|||
@row-click="setCurrentRow" |
|||
@current-change="changeCurrentRow" |
|||
border |
|||
style="width: 100%"> |
|||
<el-table-column |
|||
v-for="(item,index) in columnList" :key="index" |
|||
:sortable="item.columnSortable" |
|||
:prop="item.columnProp" |
|||
header-align="center" |
|||
:show-overflow-tooltip="item.showOverflowTooltip" |
|||
:align="item.align" |
|||
:fixed="item.fixed==''?false:item.fixed" |
|||
:min-width="item.columnWidth" |
|||
:label="item.columnLabel"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
|||
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
|||
style="width: 100px; height: 80px"/></span> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
</el-table> |
|||
<!--新增或者修改--> |
|||
<comAddUpdateShopStore ref="comAddUpdateShopStore" @refreshPageTables="refreshPageTables" v-drag></comAddUpdateShopStore> |
|||
</div> |
|||
|
|||
|
|||
</template> |
|||
|
|||
<script> |
|||
import comAddUpdateShopStore from "./com_add_update_shop_store"; |
|||
import { |
|||
getShopStores, |
|||
insertShopStore, |
|||
saveShopStore, |
|||
} from '@/api/jst/shop_store.js' |
|||
import Vue from 'vue' |
|||
|
|||
|
|||
export default { |
|||
name: 'salesOrder', |
|||
data () { |
|||
return { |
|||
// 导出+动态列 start |
|||
exportData: [], |
|||
exportName: '店铺映射表' + this.getStrDate(), |
|||
columnList: [ |
|||
{ |
|||
tableId: 'shopStoreHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'contract', |
|||
columnLabel: '域', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 30, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'left' |
|||
}, |
|||
{ |
|||
tableId: 'shopStoreHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'shopSite', |
|||
columnLabel: '店铺站点', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 60, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'left' |
|||
}, |
|||
{ |
|||
tableId: 'shopStoreHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'shopId', |
|||
columnLabel: '店铺编号', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 60, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'left' |
|||
}, |
|||
{ |
|||
tableId: 'shopStoreHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'shopName', |
|||
columnLabel: '店铺名称', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 120, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'left' |
|||
}, |
|||
{ |
|||
tableId: 'shopStoreHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'customerNo', |
|||
columnLabel: '客户编号', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 60, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'left' |
|||
}, |
|||
{ |
|||
tableId: 'shopStoreHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'pureCustom', |
|||
columnLabel: '区分纯电商', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 60, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'left' |
|||
}, |
|||
{ |
|||
tableId: 'shopStoreHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'distinguishCustom', |
|||
columnLabel: '区分客户', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 60, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'left' |
|||
}, |
|||
{ |
|||
tableId: 'shopStoreHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'consignmentFlag', |
|||
columnLabel: '区分寄售', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 60, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'left' |
|||
}, |
|||
{ |
|||
tableId: 'shopStoreHist', |
|||
tableName: this.$route.meta.title, |
|||
columnProp: 'orderType', |
|||
columnLabel: '订单类型', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
columnWidth: 60, |
|||
format: null, |
|||
functionId: this.$route.meta.menuId, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
serialNumber: null, |
|||
columnType: null, |
|||
align: 'right' |
|||
}, |
|||
], |
|||
currentRow:{}, |
|||
visible: false, |
|||
// 导出 end |
|||
height: 200, |
|||
tableData: [], |
|||
searchData: { |
|||
shopName: '', |
|||
shopId: '', |
|||
}, |
|||
} |
|||
}, |
|||
|
|||
components: { |
|||
comAddUpdateShopStore,/*新增或修改*/ |
|||
}, |
|||
mounted () { |
|||
this.$nextTick(() => { |
|||
this.height = window.innerHeight - 150 |
|||
}) |
|||
}, |
|||
methods: { |
|||
refreshPageTables () { |
|||
getShopStores(this.searchData).then(({data}) => { |
|||
this.tableData = data.rows; |
|||
if(data.total > 0){ |
|||
//设置选中行 |
|||
this.$refs.fileTable.setCurrentRow(this.tableData[0]); |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
|
|||
|
|||
|
|||
/*设置工艺的行*/ |
|||
setCurrentRow(row, column, event) { |
|||
this.currentRow = row; |
|||
}, |
|||
|
|||
// 选中记录 |
|||
/*当前值发生变化的时候修改*/ |
|||
changeCurrentRow(row, oldRow){ |
|||
//判断是否是获取焦点的事件 |
|||
if(row){ |
|||
this.currentRow = JSON.parse(JSON.stringify(row)); |
|||
} |
|||
}, |
|||
|
|||
|
|||
|
|||
// 导出+动态列 |
|||
fields () { |
|||
let json = '{' |
|||
this.columnList.forEach((item, index) => { |
|||
if (index === this.columnList.length - 1) { |
|||
json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' |
|||
} else { |
|||
json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ',' |
|||
} |
|||
}) |
|||
json += '}' |
|||
return eval('(' + json + ')') |
|||
}, |
|||
createExportData () { |
|||
// 点击导出按钮之后,开始导出数据之前的执行函数,返回值为需要下载的数据 |
|||
return this.tableData |
|||
}, |
|||
getStrDate () { |
|||
let dd = new Date() |
|||
let Y = dd.getFullYear() |
|||
let M = (dd.getMonth() + 1) < 10 ? '0' + (dd.getMonth() + 1) : (dd.getMonth() + 1)// 获取当前月份的日期,不足10补0 |
|||
let D = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate()// 获取当前几号,不足10补0 |
|||
let H = dd.getHours() < 10 ? '0' + dd.getHours() : dd.getHours() |
|||
let MM = dd.getMinutes() < 10 ? '0' + dd.getMinutes() : dd.getMinutes() |
|||
let S = dd.getSeconds() < 10 ? '0' + dd.getSeconds() : dd.getSeconds() |
|||
return Y + M + D + H + MM + S |
|||
}, |
|||
|
|||
|
|||
/*新增或修改的modal*/ |
|||
addOrUpdateModal(addFlag){ |
|||
//打开组件 去做新增业务 |
|||
this.$nextTick(() => { |
|||
//区分是否是新增 |
|||
if('Y' === addFlag){ |
|||
this.$refs.comAddUpdateShopStore.init({}, addFlag); |
|||
}else{ |
|||
this.$refs.comAddUpdateShopStore.init(this.currentRow, addFlag); |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
}, |
|||
|
|||
created() { |
|||
this.refreshPageTables(); |
|||
// this.getLanguageList() |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue