|
@@ -100,7 +100,14 @@
|
|
></el-input>
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
-
|
|
|
|
|
|
+ <el-col :xs="24" :sm="12" :lg="6">
|
|
|
|
+ <el-form-item label="备注" prop="remark">
|
|
|
|
+ <el-input
|
|
|
|
+ placeholder="请输入备注"
|
|
|
|
+ v-model="screenForm.remark"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
<el-col :xs="24" :sm="24" :lg="24" class="tr">
|
|
<el-col :xs="24" :sm="24" :lg="24" class="tr">
|
|
<el-form-item label="">
|
|
<el-form-item label="">
|
|
<el-button size="mini" @click="resetScreenForm">清空</el-button>
|
|
<el-button size="mini" @click="resetScreenForm">清空</el-button>
|
|
@@ -116,8 +123,32 @@
|
|
<!-- 按钮 -->
|
|
<!-- 按钮 -->
|
|
<div class="btn-group clearfix">
|
|
<div class="btn-group clearfix">
|
|
<div class="fl">
|
|
<div class="fl">
|
|
- <el-button type="primary" v-if="$checkBtnRole('add', $route.meta.roles)" icon="el-icon-plus" size="mini" @click="addFn">新增</el-button>
|
|
|
|
|
|
+<!-- <el-button type="primary" v-if="$checkBtnRole('add', $route.meta.roles)" icon="el-icon-plus" size="mini" @click="addFn">新增</el-button>-->
|
|
<!-- <el-button type="primary" size="mini">编辑</el-button> -->
|
|
<!-- <el-button type="primary" size="mini">编辑</el-button> -->
|
|
|
|
+ <el-upload
|
|
|
|
+ v-if="$checkBtnRole('add', $route.meta.roles)"
|
|
|
|
+ style="margin-bottom: 10px;"
|
|
|
|
+ class="import-btn"
|
|
|
|
+ :action="baseURL + 'student/import'"
|
|
|
|
+ :http-request="handleImport"
|
|
|
|
+ :file-list="importFileList"
|
|
|
|
+ :show-file-list="false"
|
|
|
|
+ :disabled="importLoading"
|
|
|
|
+ v-loading="importLoading"
|
|
|
|
+ >
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ size="mini"
|
|
|
|
+ >导入调价单
|
|
|
|
+ </el-button>
|
|
|
|
+ </el-upload>
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="$checkBtnRole('add', $route.meta.roles)"
|
|
|
|
+ type="primary"
|
|
|
|
+ size="mini"
|
|
|
|
+ @click="hanleDownloadFiles"
|
|
|
|
+ >下载模板
|
|
|
|
+ </el-button>
|
|
<el-popconfirm
|
|
<el-popconfirm
|
|
v-if="$checkBtnRole('del', $route.meta.roles)"
|
|
v-if="$checkBtnRole('del', $route.meta.roles)"
|
|
confirm-button-text="好的"
|
|
confirm-button-text="好的"
|
|
@@ -131,7 +162,7 @@
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
size="mini"
|
|
size="mini"
|
|
- icon="el-icon-delete"
|
|
|
|
|
|
+ icon="el-icon-delete"
|
|
slot="reference"
|
|
slot="reference"
|
|
class="el-popover-left"
|
|
class="el-popover-left"
|
|
>删除</el-button
|
|
>删除</el-button
|
|
@@ -499,13 +530,15 @@ import {
|
|
getTypeList,
|
|
getTypeList,
|
|
examineData
|
|
examineData
|
|
} from '@/api/basic_data/material'
|
|
} from '@/api/basic_data/material'
|
|
-import { downloadFiles } from '@/utils/util'
|
|
|
|
|
|
+import {downloadFiles, handleImport} from '@/utils/util'
|
|
import { getCategoryList } from '@/api/common'
|
|
import { getCategoryList } from '@/api/common'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
mixins: [Mixin],
|
|
mixins: [Mixin],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ baseURL: '',
|
|
|
|
+ importFileList: [],
|
|
show: 1,
|
|
show: 1,
|
|
currentPage: 1, // 当前页码
|
|
currentPage: 1, // 当前页码
|
|
pageSize: 10, // 每页数量
|
|
pageSize: 10, // 每页数量
|
|
@@ -539,7 +572,8 @@ export default {
|
|
materialOldNumber:'',
|
|
materialOldNumber:'',
|
|
saleTypeId:'',
|
|
saleTypeId:'',
|
|
k3CategoryNumber:'',
|
|
k3CategoryNumber:'',
|
|
- specification:''
|
|
|
|
|
|
+ specification:'',
|
|
|
|
+ remark: ''
|
|
},
|
|
},
|
|
liDetail: {},
|
|
liDetail: {},
|
|
detail: {},
|
|
detail: {},
|
|
@@ -584,8 +618,13 @@ export default {
|
|
return {
|
|
return {
|
|
materialName: this.screenForm.materialName,
|
|
materialName: this.screenForm.materialName,
|
|
materialNumber: this.screenForm.materialNumber,
|
|
materialNumber: this.screenForm.materialNumber,
|
|
- startDate:this.screenForm.startDate,
|
|
|
|
- billType:'HOME'
|
|
|
|
|
|
+ startDate: this.screenForm.startDate,
|
|
|
|
+ materialOldNumber:this.screenForm.materialOldNumber,
|
|
|
|
+ saleTypeId:this.screenForm.saleTypeId,
|
|
|
|
+ k3CategoryNumber:this.screenForm.k3CategoryNumber,
|
|
|
|
+ specification:this.screenForm.specification,
|
|
|
|
+ remark: this.screenForm.remark,
|
|
|
|
+ billType:'HOME'
|
|
};
|
|
};
|
|
},
|
|
},
|
|
},
|
|
},
|
|
@@ -684,6 +723,7 @@ export default {
|
|
saleTypeId:this.screenForm.saleTypeId,
|
|
saleTypeId:this.screenForm.saleTypeId,
|
|
k3CategoryNumber:this.screenForm.k3CategoryNumber,
|
|
k3CategoryNumber:this.screenForm.k3CategoryNumber,
|
|
specification:this.screenForm.specification,
|
|
specification:this.screenForm.specification,
|
|
|
|
+ remark: this.screenForm.remark,
|
|
billType:'HOME'
|
|
billType:'HOME'
|
|
};
|
|
};
|
|
getProductRriceList(params).then((res) => {
|
|
getProductRriceList(params).then((res) => {
|
|
@@ -740,13 +780,13 @@ export default {
|
|
customerName: this.screenForm.customerName,
|
|
customerName: this.screenForm.customerName,
|
|
freeDay: this.screenForm.freeDay,
|
|
freeDay: this.screenForm.freeDay,
|
|
toll: this.screenForm.toll,
|
|
toll: this.screenForm.toll,
|
|
|
|
+ remark: this.screenForm.remark,
|
|
billType:'HOME'
|
|
billType:'HOME'
|
|
};
|
|
};
|
|
downloadFiles("/product-compose/export", screenData);
|
|
downloadFiles("/product-compose/export", screenData);
|
|
},
|
|
},
|
|
resetInfo() {
|
|
resetInfo() {
|
|
this.diaLogForm = {
|
|
this.diaLogForm = {
|
|
- id: null,
|
|
|
|
composeNumber: "",
|
|
composeNumber: "",
|
|
id: "",
|
|
id: "",
|
|
items: [],
|
|
items: [],
|
|
@@ -756,6 +796,32 @@ export default {
|
|
productVolume: "",
|
|
productVolume: "",
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
+ // 导入
|
|
|
|
+ async handleImport(param) {
|
|
|
|
+ this.importLoading = true
|
|
|
|
+ const file = param.file
|
|
|
|
+ const formData = new FormData()
|
|
|
|
+ formData.append('file', file)
|
|
|
|
+ formData.append('billType', 'HOME')
|
|
|
|
+
|
|
|
|
+ const result = await handleImport('/product-upd-price/material/import', formData)
|
|
|
|
+ this.importLoading = false
|
|
|
|
+ this.importFileList = []
|
|
|
|
+ if (result.code === 200) {
|
|
|
|
+ this.$alert('成功处理记录数:' + result.data, '导入成功', {
|
|
|
|
+ confirmButtonText: '确定'
|
|
|
|
+ })
|
|
|
|
+ this.getList()
|
|
|
|
+ } else {
|
|
|
|
+ this.$alert(result.message, '导入失败', {
|
|
|
|
+ confirmButtonText: '确定'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 下载经销商模板
|
|
|
|
+ hanleDownloadFiles() {
|
|
|
|
+ downloadFiles('/product-upd-price/download')
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|