Browse Source

其它出库 导入execl sxm 2021-10-28

master
[li_she] 4 years ago
parent
commit
5f1d52d960
  1. 22
      src/views/modules/common/excelUpload.vue
  2. 79
      src/views/modules/finishedProductWarehouse/otherOut.vue
  3. 2
      src/views/modules/job/schedule.vue

22
src/views/modules/common/excelUpload.vue

@ -20,38 +20,34 @@
url: '', url: '',
num: 0, num: 0,
successNum: 0, successNum: 0,
fileList: []
fileList: [],
rollList: {}
} }
}, },
methods: { methods: {
init (id) { init (id) {
this.url = this.$http.adornUrl(`/excel/file/upload?token=${this.$cookie.get('token')}&folder=`+this.folder)
console.log(this.url)
this.url = this.$http.adornUrl(`/file/excel/upload?token=${this.$cookie.get('token')}`)
this.visible = true this.visible = true
}, },
// //
beforeUploadHandle (file) { beforeUploadHandle (file) {
// if (file.type !== 'image/jpg' && file.type !== 'image/jpeg' && file.type !== 'image/png' && file.type !== 'image/gif') {
// this.$message.error('jpgpnggif')
// return false
// }
if (file.type !== "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" && file.type !== "application/vnd.ms-excel" ) {
this.$message.error('只支持xls、xlsx、格式的文件!')
return false
}
this.num++ this.num++
}, },
// //
successHandle (response, file, fileList) { successHandle (response, file, fileList) {
this.fileList = fileList.map(item => {
return item.response.ossEntity
})
this.successNum++
if (response && response.code === 0) { if (response && response.code === 0) {
this.rollList = response
this.childClick() this.childClick()
} else { } else {
this.$message.error(response.msg) this.$message.error(response.msg)
} }
}, },
childClick () { childClick () {
// childByValueon
this.$emit('childByValue', this.fileList)
this.$emit('excelUploadChild', this.rollList)
} }
}, },
created() { created() {

79
src/views/modules/finishedProductWarehouse/otherOut.vue

@ -5,26 +5,9 @@
<icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg> <icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg>
</span> </span>
</div> </div>
<el-button @click="searchList()" type="primary">{{buttons.search}}</el-button>
<el-button @click="saveColumnList()" type="primary" v-show="showDefault">{{buttons.defaultTable}}
</el-button>
<el-button @click="userSetting" type="primary">{{ buttons.settingTable}}</el-button>
<el-form v-show="searchShow" :inline="true" :model="queryData" @keyup.enter.native="getDataList()">
<excelUpload></excelUpload>
<el-form-item label="呆滞天数">
<el-input oninput="value=value.replace(/[^\d]/g,'')" v-model="queryData.day" clearable>
</el-input>
</el-form-item>
<el-form-item label="rollno">
<el-input v-model="queryData.rollno" clearable>
</el-input>
</el-form-item>
<el-form-item label="partno">
<el-input v-model="queryData.partno" clearable>
</el-input>
</el-form-item>
<el-form :inline="true">
<el-form-item> <el-form-item>
<el-button @click="getDataList()" type="primary">{{ buttons.search }}</el-button>
<excelUpload v-on:excelUploadChild="excelUploadChild"></excelUpload>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table
@ -128,62 +111,20 @@
}) })
}, },
activated() { activated() {
this.getDataList()
}, },
methods: { methods: {
childByValue(childValue) {
excelUploadChild(childValue) {
// childValue // childValue
console.log(childValue) console.log(childValue)
this.getDataList(childValue)
},
//
searchList() {
if (this.searchShow) {
this.searchShow = false
return
if (childValue.list.length>0){
this.dataList = childValue.list
this.$message.success("批量出库成功")
}else { }else {
this.searchShow = true
}
},
//
getDataList() {
this.dataListLoading = true
let query = []
let f = {
queryAttributes: "parttypeFlag",
queryType: "string",
queryValue: "F",
}
query.push(f)
let toexpiredays = {
queryAttributes: "toexpiredays",
queryType: "number",
queryValue: this.queryData.day,
this.$message.warning("批量出库失败")
} }
query.push(toexpiredays)
if (this.queryData.rollno != '') {
let rollno = {
queryAttributes: "rollno",
queryType: "string",
queryValue: this.queryData.rollno,
}
query.push(rollno)
}
if (this.queryData.partno != '') {
let partno = {
queryAttributes: "partno",
queryType: "string",
queryValue: this.queryData.partno,
}
query.push(partno)
}
getCRollInfoList(query).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.list
}
this.dataListLoading = false
})
// this.searchShow = false
}, },
// //
favoriteIsOk() { favoriteIsOk() {

2
src/views/modules/job/schedule.vue

@ -223,7 +223,7 @@
var ids = id ? [id] : this.dataListSelections.map(item => { var ids = id ? [id] : this.dataListSelections.map(item => {
return item.jobId return item.jobId
}) })
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '恢复' : '批量恢复'}]操作?`, '提示', {
this.$confirm(`确定进行[${id ? '恢复' : '批量恢复'}]操作?`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'

Loading…
Cancel
Save