Browse Source

批量出库 2022-04-28 sxm

master
[li_she] 4 years ago
parent
commit
bc3435fa09
  1. 4
      src/App.vue
  2. 5
      src/api/crollinfo/crollinfo.js
  3. 19
      src/views/main-navbar-update-password.vue
  4. 760
      src/views/modules/finishedProductWarehouse/otherOut.vue
  5. 8
      src/views/modules/shopOrder/shopOrder/shopOrder.vue

4
src/App.vue

@ -11,7 +11,7 @@
data() {
return {
query: {},
version: '1.2.1'
version: '1.2.2'
}
},
created() {
@ -21,7 +21,7 @@
versionReload(){
let version = this.version; //线
console.log('最新系统版本: ',version)
console.log('当前系统班帮: ',this.version)
console.log('当前系统版本: ',this.version)
let versionLocal = localStorage.getItem('_version_');
if(version!=versionLocal){
localStorage.setItem('_version_',version);

5
src/api/crollinfo/crollinfo.js

@ -15,3 +15,8 @@ export const batchUpdateExpireddate = data => createAPI(`/finishedProduct/crolli
// 获取有效期列表
export const expiryList = data => createAPI(`/finishedProduct/crollinfo/expiryList`,'post',data)
// 批量出库
export const batchRollUpdateStatus = data => createAPI(`/finishedProduct/crollinfo/batchRollUpdateStatus`,'post',data)

19
src/views/main-navbar-update-password.vue

@ -78,6 +78,21 @@
//
dataFormSubmit () {
this.$refs['dataForm'].validate((valid) => {
let password = this.dataForm.password
let newPassword = this.dataForm.newPassword
let confirmPassword =this.dataForm.confirmPassword
if (!password){
this.$message.warning('原密码不能为空')
return
}
if (!newPassword){
this.$message.warning('新密码不能为空')
return
}
if (!confirmPassword){
this.$message.warning('确认密码不能为空')
return
}
if (valid) {
this.$http({
url: this.$http.adornUrl('/sys/user/password'),
@ -88,7 +103,7 @@
})
}).then(({data}) => {
if (data && data.code === 0) {
this.$message( '操作成功')
this.$message.success( '操作成功')
this.visible = false
this.$nextTick(() => {
this.mainTabs = []
@ -96,7 +111,7 @@
this.$router.replace({ name: 'login' })
})
} else {
this.$message.error(data.msg)
this.$message.warning(data.msg)
}
})
}

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

@ -7,9 +7,10 @@
</div>
<el-form :inline="true">
<el-form-item>
<excelUpload v-on:excelUploadChild="excelUploadChild"></excelUpload>
<excelUpload v-on:excelUploadChild="excelUploadChild"></excelUpload>
</el-form-item>
<el-form-item>
<el-button @click="batchOut" type="primary">{{ buttons.outList }}</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-item>
@ -38,18 +39,28 @@
</template>
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="150"
:label="buttons.cz">
<template slot-scope="scope">
<a type="text" size="small" @click="deleteRoll(scope.row)" herf="#">{{ buttons.delete }}</a>
</template>
</el-table-column>
</el-table>
<!-- 设置列 -->
<column v-if="visible" ref="column" @refreshData="getTableUserColumn"></column>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
</div>
</template>
<script>
import excelUpload from "../common/excelUpload";
import AddOrUpdate from './crollinfo-add-or-update'
import {getCRollInfoList} from '@/api/crollinfo/crollinfo.js'
import {getCRollInfoList, batchRollUpdateStatus} from '@/api/crollinfo/crollinfo.js'
import column from "../common/column";
import search from "../common/search";
import {
@ -79,8 +90,8 @@ export default {
functionId: this.$route.meta.menuId,
tableId: "105002003OO",
languageCode: this.$i18n.locale,
queryTable:{
functionId: this.$route.meta.menuId,
queryTable: {
functionId: this.$route.meta.menuId,
tableId: "105002003OO",
languageCode: this.$i18n.locale
},
@ -96,8 +107,8 @@ export default {
columnList: [
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"tableId": "105002003OO",
"tableName": "其它出库",
"columnProp": "rollno",
"columnLabel": "卷号",
"columnHidden": false,
@ -115,8 +126,8 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"tableId": "105002003OO",
"tableName": "其它出库",
"columnProp": "partno",
"columnLabel": "物料编号",
"columnHidden": false,
@ -134,8 +145,8 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"tableId": "105002003OO",
"tableName": "其它出库",
"columnProp": "partDescription",
"columnLabel": "物料描述",
"columnHidden": false,
@ -153,8 +164,8 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"tableId": "105002003OO",
"tableName": "其它出库",
"columnProp": "site",
"columnLabel": "工厂编号",
"columnHidden": false,
@ -172,27 +183,8 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "toexpiredays",
"columnLabel": "呆滞天数",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 4,
"status": true,
"fixed": false,
"serialNumber": null,
"columnType": "number",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"tableId": "105002003OO",
"tableName": "其它出库",
"columnProp": "status",
"columnLabel": "状态",
"columnHidden": false,
@ -210,27 +202,8 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "sourcetype",
"columnLabel": "来源类型",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 6,
"status": true,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"tableId": "105002003OO",
"tableName": "其它出库",
"columnProp": "rolltype",
"columnLabel": "卷类型",
"columnHidden": false,
@ -248,8 +221,8 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"tableId": "105002003OO",
"tableName": "其它出库",
"columnProp": "rollqty",
"columnLabel": "卷数量",
"columnHidden": false,
@ -264,614 +237,6 @@ export default {
"columnType": "number",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "createdby",
"columnLabel": "创建人",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 96,
"status": true,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "rolldate",
"columnLabel": "卷创建时间",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 120,
"format": null,
"sortLv": 97,
"status": true,
"fixed": false,
"serialNumber": null,
"columnType": "date",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "expireddate",
"columnLabel": "失效日期",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 120,
"format": null,
"sortLv": 98,
"status": true,
"fixed": false,
"serialNumber": null,
"columnType": "date",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "manufacturedate",
"columnLabel": "制造日期",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 120,
"format": null,
"sortLv": 99,
"status": true,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "createddate",
"columnLabel": "创建时间",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 150,
"format": null,
"sortLv": 100,
"status": true,
"fixed": false,
"serialNumber": null,
"columnType": "date",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "statusDb",
"columnLabel": "statusDb",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "supprollno",
"columnLabel": "供应商编号",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "rollseqno",
"columnLabel": "rollseqno",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "supprollnoflag",
"columnLabel": "供应商状态",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "supplierid",
"columnLabel": "供应商编号",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "orderref1",
"columnLabel": "关联单号1",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "orderref3",
"columnLabel": "关联单号3",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "orderref4",
"columnLabel": "关联单号4",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "rolltypeDb",
"columnLabel": "卷类型编号",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "firstlevelrollno",
"columnLabel": "首卷号",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "remark",
"columnLabel": "备注",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "parttypeFlag",
"columnLabel": "parttypeFlag",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "warehouseid",
"columnLabel": "warehouseid",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "synchronizedflag",
"columnLabel": "同步状态",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "consumeorderno",
"columnLabel": "销售订单号",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "consumeseqno",
"columnLabel": "销售序号",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "customerid",
"columnLabel": "客户ID",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "fgpartno",
"columnLabel": "fgpartno",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "refSupplierid",
"columnLabel": "refSupplierid",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "refPartdesc",
"columnLabel": "refPartdesc",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "needsynchronizeflag",
"columnLabel": "needsynchronizeflag",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "opslog",
"columnLabel": "opslog",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "frozenflag",
"columnLabel": "frozenflag",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "frozendate",
"columnLabel": "frozendate",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "date",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "frozenby",
"columnLabel": "frozenby",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "originalrollno",
"columnLabel": "原卷号",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
},
{
"userId": this.$store.state.user.name,
"tableId": "105002003OO",
"tableName": "呆滞料预警",
"columnProp": "orderref5",
"columnLabel": "关联单号5",
"columnHidden": false,
"columnImage": false,
"columnSortable": false,
"columnWidth": 80,
"format": null,
"sortLv": 0,
"status": false,
"fixed": false,
"serialNumber": null,
"columnType": "string",
"align": null
}
],
dataList: [],
buttons: {
@ -879,6 +244,7 @@ export default {
edit: '编辑',
delete: '删除',
deleteList: '批量删除',
outList: '出库',
cz: '操作',
search: '搜索',
download: '导出',
@ -905,14 +271,55 @@ export default {
},
methods: {
//
async batchOut() {
if (this.dataList.length === 0) {
this.$message.warning("请先导入数据!")
} else {
let status = JSON.parse(JSON.stringify(this.dataList)).filter(item => item.statusDb !== 'I')
let flag = true
if (status.length > 0) {
this.$message.warning("数据中包含不在库的卷!")
await this.$confirm('数据中包含不在库的卷, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
}).catch(() => {
flag = false
});
}
if (flag){
let dataList = JSON.parse(JSON.stringify(this.dataList)).filter(item => item.statusDb === 'I').map(item => {
item.statusDb = 'D'
item.status = '已消耗'
return item;
})
batchRollUpdateStatus(dataList).then(({data}) => {
if (data.code === 0) {
this.dataList = []
this.$message.success('出库成功')
} else {
this.$message.warning('出库失败')
}
})
}
}
},
//
deleteRoll(row) {
this.dataList = this.dataList.filter(item => item.rollno !== row.rollno)
},
excelUploadChild(childValue) {
// childValue
console.log(childValue)
if (childValue.list.length>0){
if (childValue.list.length > 0) {
this.dataList = childValue.list
this.$message.success("批量出库成功")
}else {
this.$message.warning("批量出库失败")
this.$message.success("导入数据成功")
} else {
this.$message.warning("导入数据失败,请检查导入的数据")
}
@ -1026,9 +433,9 @@ export default {
await removerDefault(this.queryTable)
// table
let sumColumnList = this.columnList;
sumColumnList = sumColumnList.map(item=> {
sumColumnList = sumColumnList.map(item => {
return item = {
tableId: item.tableId,
tableId: item.tableId,
tableName: item.tableName,
columnProp: item.columnProp,
columnLabel: item.columnLabel,
@ -1047,9 +454,9 @@ export default {
}
})
await saveTableDefaultList(sumColumnList)
await saveTableDefaultList(sumColumnList)
// button label title
let buttons = this.buttonList.map( item => {
let buttons = this.buttonList.map(item => {
return item = {
functionId: this.$route.meta.menuId,
languageValue: item.languageValue,
@ -1091,7 +498,7 @@ export default {
// this.showDefault = false
this.columnList = data.rows
} else {
// this.showDefault = true
// this.showDefault = true
}
})
},
@ -1110,6 +517,7 @@ export default {
overflow: hidden;
float: right;
}
.el-button--small, .el-button--small.is-round {
padding: 5px 10px;
}

8
src/views/modules/shopOrder/shopOrder/shopOrder.vue

@ -1705,7 +1705,7 @@ export default {
//
const LODOP = this.getLodop()
if (LODOP && this.orderInfo) {
LODOP.SET_LICENSES("", "13F0BE83846277CB60918577C6281375", "", "");
LODOP.SET_LICENSES("", "7B5624CC84E599D6B17F27DF40F4310C", "", "");
LODOP.NewPage();
LODOP.SET_PRINT_PAGESIZE(0, 2400, 1400, "");
LODOP.ADD_PRINT_LINE(102, 15, 103, 771, 0, 1);
@ -1859,9 +1859,9 @@ export default {
LODOP.ADD_PRINT_TEXT(towTop, 552, 221, 30, this.dayjs().format('YYYY-MM-DD HH:mm:ss'));
LODOP.SET_PRINT_STYLEA(0, "FontSize", 14);
LODOP.PRINT_DESIGN();
///LODOP.PREVIEW();
// LODOP.PRINT();
//LODOP.PRINT_DESIGN();
//LODOP.PREVIEW();
LODOP.PRINT();
console.log("操作成功!")
}
},

Loading…
Cancel
Save