1.删除未使用的接口方法和无用的页面文件

master
x_z 3 years ago
parent fc8e572173
commit 85f5c69db9

@ -1,34 +0,0 @@
/**
* Created by lk on 17/6/4.
*/
import axios from "../../utils/axios";
// 谁最懂我相关
// 列表
export function adList(query) {
return axios({
url: "/admin/ad/ad/index",
method: "get",
params: query
});
}
// 保存
export function adSave(data, formName, method = "post") {
var url = formName === "add" ? "/admin/ad/ad/save" : "/admin/ad/ad/edit";
return axios({
url: url,
method: method,
data: data
});
}
// 删除
export function adDelete(data) {
return axios({
url: "/admin/ad/ad/delete",
method: "post",
data: data
});
}

@ -1,44 +0,0 @@
/**
* Created by lk on 17/6/4.
*/
import axios from "../../utils/axios";
// 谁最懂我相关
// 列表
export function adSiteList(query) {
return axios({
url: "/admin/ad/site/index",
method: "get",
params: query
});
}
// 广告列表
export function adSiteAdList(query) {
return axios({
url: "/admin/ad/site/adList",
method: "get",
params: query
});
}
// 保存
export function adSiteSave(data, formName, method = "post") {
var url =
formName === "add" ? "/admin/ad/site/save" : "/admin/ad/site/edit";
return axios({
url: url,
method: method,
data: data
});
}
// 删除
export function adSiteDelete(data) {
return axios({
url: "/admin/ad/site/delete",
method: "post",
data: data
});
}

@ -1,10 +1,5 @@
/**
* Created by lk on 17/6/4.
*/
import axios from "../../utils/axios"; import axios from "../../utils/axios";
// 权限管理
// 获取列表 // 获取列表
export function authPermissionRuleList(query) { export function authPermissionRuleList(query) {
return axios({ return axios({

@ -1,6 +1,3 @@
/**
* Created by lk on 17/6/4.
*/
import axios from "../../utils/axios"; import axios from "../../utils/axios";
// 获取列表 // 获取列表

@ -1,13 +1,5 @@
import axios from "../../utils/axios"; import axios from "../../utils/axios";
export function filterCustomers(query) {
return axios({
url: "/spms/customer/list",
method: "get",
params: query
});
}
export function getCustomers(query) { export function getCustomers(query) {
return axios({ return axios({
url: "/udi/customer/list", url: "/udi/customer/list",
@ -31,21 +23,3 @@ export function deleteCustomers(data) {
data: data data: data
}); });
} }
export function customersInfo(query) {
return axios({
url: "/udi/customer/detail",
method: "get",
params: query
});
}
export function modifyCustomers(data) {
return axios({
url: "/udi/customer/modify",
method: "post",
data: data
});
}

@ -8,7 +8,6 @@ export function registerList(query) {
}); });
} }
export function check(data) { export function check(data) {
return axios({ return axios({
url: "/sale/device/check", url: "/sale/device/check",

@ -1,7 +1,5 @@
/**
* Created by lk on 17/6/4.
*/
import axios from "../../utils/axios"; import axios from "../../utils/axios";
// 获取信息 // 获取信息
export function userInfo(id, token) { export function userInfo(id, token) {
return axios({ return axios({

@ -8,14 +8,6 @@ export function getPlatform(query) {
}); });
} }
export function getUnbindPlatform(query) {
return axios({
url: "/udims/platform/getUnbindList",
method: "get",
params: query
});
}
export function updatePlatform(data) { export function updatePlatform(data) {
return axios({ return axios({
url: "/udims/platform/update", url: "/udims/platform/update",
@ -32,7 +24,6 @@ export function deletePlatform(data) {
}); });
} }
export function linkPlatform(query) { export function linkPlatform(query) {
return axios({ return axios({
url: "/udims/platform/link", url: "/udims/platform/link",
@ -75,7 +66,6 @@ export function getTargetInv(query) {
}); });
} }
export function getTargetSubInv(query) { export function getTargetSubInv(query) {
return axios({ return axios({
url: "/udims/platform/getTargetSubInv", url: "/udims/platform/getTargetSubInv",

@ -8,7 +8,6 @@ export function getRegisters(query) {
}); });
} }
export function register(data) { export function register(data) {
return axios({ return axios({
url: "/udiwarehouse/register/save", url: "/udiwarehouse/register/save",

@ -16,12 +16,4 @@ export function getBasicInstrumentMaintainsFilterProduct(query) {
}); });
} }
export function filterByUuid(query) {
return axios({
url: "/udiwms/udiinfo/local/filterByUuid",
method: "get",
params: query
});
}

@ -1,40 +1,5 @@
import axios from "../../utils/axios"; import axios from "../../utils/axios";
export function getBasicInstrumentMaintainRelevances(query) {
return axios({
url: "/udi/udirel/filterUdi",
method: "get",
params: query
});
}
export function deletetBasicInstrumentMaintainRelevances(query) {
return axios({
url: "/udi/udirel/deleteById",
method: "post",
data: query
});
}
export function deleteAlltBasicInstrumentMaintainRelevances(query) {
return axios({
url: "/Audi/udirel/deletell",
method: "post",
data: query
});
}
export function updatetBasicInstrumentMaintainRelevances(query) {
return axios({
url: "/udi/udirel/update",
method: "post",
data: query
});
}
export function combineUdi(query) { export function combineUdi(query) {
return axios({ return axios({
url: "/udi/udirel/revleance", url: "/udi/udirel/revleance",
@ -57,32 +22,3 @@ export function addErp(query) {
data: query data: query
}); });
} }
export function updateErpProduct(query) {
return axios({
url: "/udi/udirel/updateErp",
method: "get",
params: query
});
}
export function uploadSmp(query) {
return axios({
url: "/udiwms/smp/udirl/upload",
method: "post",
data: query
});
}
export function thirdSysDetail(query) {
return axios({
url: "/udiwms/udirel/thirdSys/detail",
method: "get",
params: query
});
}

@ -7,39 +7,3 @@ export function getBasicThirdSys(query) {
params: query params: query
}); });
} }
export function updateBasicThirdSys(query) {
return axios({
url: "/udiwms/basic/thirdsys/update",
method: "post",
data: query
});
}
export function getDetailBasicThirdSys(query) {
return axios({
url: "/udiwms/basic/thirdsys/filterDetail",
method: "get",
params: query
});
}
export function filterDetailByKey(query) {
return axios({
url: "/udiwms/basic/thirdsys/filterDetailByKey",
method: "get",
params: query
});
}
export function updateDetailBasicThirdSys(query) {
return axios({
url: "/udiwms/basic/thirdsys/saveDetail",
method: "post",
data: query
});
}

@ -8,7 +8,6 @@ export function getChangeBusType(query) {
}); });
} }
export function addChangeBusType(query) { export function addChangeBusType(query) {
return axios({ return axios({
url: "/spms/bussinessChangeType/insert", url: "/spms/bussinessChangeType/insert",
@ -25,7 +24,6 @@ export function removeBusChange(query) {
}); });
} }
export function deleteChangeBusType(query) { export function deleteChangeBusType(query) {
return axios({ return axios({
url: "/spms/bussinessChangeType/delete", url: "/spms/bussinessChangeType/delete",

@ -16,7 +16,6 @@ export function getLocalJoinBusType(query) {
}); });
} }
export function getLocalJoinByUser(query) { export function getLocalJoinByUser(query) {
return axios({ return axios({
url: "/udiwms/localBusType/filterJoinByUser", url: "/udiwms/localBusType/filterJoinByUser",
@ -32,29 +31,3 @@ export function filterByBus(query) {
params: query params: query
}); });
} }
export function addLocalBusType(query) {
return axios({
url: "/udiwms/localBusType/add",
method: "post",
data: query
});
}
export function deleteLocalBusType(query) {
return axios({
url: "/udiwms/localBusType/delete",
method: "post",
data: query
});
}
export function updateLocalBusType(query) {
return axios({
url: "/udiwms/localBusType/update",
method: "post",
data: query
});
}

@ -1,9 +0,0 @@
import axios from "../../utils/axios";
export function getOriginBusType(query) {
return axios({
url: "/udiwms/originBusType/filter",
method: "get",
params: query
});
}

@ -16,13 +16,6 @@ export function deleteLog(query) {
}); });
} }
export function downloadLog(query) {
return axios({
url: "/udiwms/corps/exportLog/download",
method: "get",
params: query
});
}
export function exportExcel(query) { export function exportExcel(query) {
return axios({ return axios({
url: "/udiwms/corps/importLog/export", url: "/udiwms/corps/importLog/export",

@ -15,6 +15,7 @@ export function filterLog(query) {
params: query params: query
}); });
} }
export function deleteLog(query) { export function deleteLog(query) {
return axios({ return axios({
url: "/udiwms/corps/importLog/deleteLog", url: "/udiwms/corps/importLog/deleteLog",

@ -1,21 +1,6 @@
import axios from "../../utils/axios"; import axios from "../../utils/axios";
//--------------获取ERP数据------------------- //--------------获取ERP数据-------------------
export function getErpProduct(query) {
return axios({
url: "/warehouse/getErpGoods",
method: "get",
params: query
});
}
export function getErpUnit(query) {
return axios({
url: "/warehouse/getErpUnit",
method: "get",
params: query
});
}
export function getInvbasdoc(query) { export function getInvbasdoc(query) {
return axios({ return axios({
url: "/udiwms/udiinfo/erp/products", url: "/udiwms/udiinfo/erp/products",

@ -140,7 +140,6 @@ Print.prototype = {
frameWindow.close(); frameWindow.close();
}, 10); }, 10);
} catch (err) { } catch (err) {
console.log('err', err);
} }
}, },
// 检查一个元素是否是 body 元素的后代元素且非 body 元素本身 // 检查一个元素是否是 body 元素的后代元素且非 body 元素本身

@ -183,8 +183,6 @@ export const asyncRouterMap = [
meta: { meta: {
authRule: ["backstage_manage"] authRule: ["backstage_manage"]
}, },
// noDropdown: true,
children: [ children: [
{ {
path: "/permissionManage", path: "/permissionManage",
@ -224,7 +222,6 @@ export const asyncRouterMap = [
} }
}, },
] ]
}, },
{ {
path: "phoneRegisterManage", path: "phoneRegisterManage",

@ -138,7 +138,6 @@ import {
updateBussinessType, updateBussinessType,
insertBussinessType, insertBussinessType,
} from "../../api/basic/bussinessType"; } from "../../api/basic/bussinessType";
import modifyDialog from "./BussinessTypeModify"; import modifyDialog from "./BussinessTypeModify";
import axios from "axios"; import axios from "axios";
import store from "@/store"; import store from "@/store";
@ -237,8 +236,8 @@ export default {
this.getList(); this.getList();
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.filterQuery.page = val; this.filterQuery.page = val;
this.getList(); this.getList();
}, },
getList() { getList() {
this.loading = true; this.loading = true;

@ -1,417 +0,0 @@
<template>
<div>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col">
<div class="text item">
<div class="itemTag">
<span>业务类型名称:&nbsp;</span>
</div>
<el-input
style="width: 200px"
size="small"
splaceholder="请输入内容"
v-model="inputQuery.name"
></el-input>
</div>
</el-col>
<el-col :span="10" class="el-col">
<div class="text item">
<div class="itemTag">
<span>业务类型代码:&nbsp;</span>
</div>
<el-input
style="width: 200px"
size="small"
splaceholder="请输入内容"
disabled
v-model="inputQuery.action"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col">
<div class="text item">
<div class="itemTag">
<span>第三方单据类型:&nbsp;</span>
</div>
<el-select v-model="inputQuery.originAction" placeholder="请选择第三方系统单据类型" clearable="true">
<el-option
v-for="item in originTypes"
:key="item.name"
:label="item.name"
:value="item.action">
<span style="float: left;font-size: 13px">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px;margin-left: 10px">{{
item.thirdSysName
}}</span>
</el-option>
</el-select>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="20" class="el-col">
<div class="text item">
<div class="itemTag">
<span>备注:&nbsp;</span>
</div>
<el-input
style="width: 80%"
size="small"
splaceholder="请输入内容"
v-model="inputQuery.remark"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<!-- <el-col :span="4" class="el-col">-->
<!-- <div class="text item">-->
<!-- <el-checkbox v-model="inputQuery.enable"></el-checkbox>-->
<!-- </div>-->
<!-- </el-col>-->
<el-col :span="4" class="el-col">
<div class="text item">
<el-checkbox v-model="inputQuery.advanceType"></el-checkbox>
</div>
</el-col>
<el-col :span="4" class="el-col">
<div class="text item">
<el-checkbox v-model="inputQuery.changeEnable" @change="isChangeOrder"
:disabled="!changeEnable || inputQuery.mainAction=='WareHouseIn' || inputQuery.id == null || inputQuery.mainAction==null">
缺量自动补单
</el-checkbox>
</div>
</el-col>
<el-col :span="4" class="el-col">
<div class="text item">
<el-checkbox v-model="inputQuery.spUse">使</el-checkbox>
</div>
</el-col>
</el-row>
<div v-if="visibleChange">
<!-- <div style="float:right;margin-bottom: 10px">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- size="mini"-->
<!-- @click.native="addChangeType"-->
<!-- >新增流转单据类型-->
<!-- </el-button-->
<!-- >-->
<!-- </div>-->
<el-table border style="margin-bottom: 20px;margin-top: 10px" :data="changeList">
<el-table-column label="序号" type="index" width="55"></el-table-column>
<el-table-column label="补单说明" prop="intro"></el-table-column>
<!-- <el-table-column label="补单单据类型代码" prop="action"></el-table-column>-->
<el-table-column label="补单扫码单据类型" prop="name"></el-table-column>
<el-table-column label="推前时长(小时)" prop="beforeTime"></el-table-column>
<el-table-column label="备注" prop="remark"></el-table-column>
<el-table-column label="操作" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="handleModifyClick(scope.row)"
>编辑
</el-button
>
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="deleteClick(scope.row)"-->
<!-- >删除-->
<!-- </el-button-->
<!-- >-->
</template>
</el-table-column>
</el-table>
</div>
<el-dialog
:title="formMap[changeEdit]"
:visible.sync="editChangeTypeVisible"
width="55%"
:close-on-click-modal="false"
:close-on-press-escape="false"
append-to-body
v-if="editChangeTypeVisible">
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col">
<div class="text item">
<div class="itemTag">
<span>生成扫码单据类型:&nbsp;</span>
</div>
<el-select v-model="editQuery.scAction" placeholder="请选择扫码单据类型" clearable="true">
<el-option
v-for="item in codeTypes"
:key="item.name"
:label="item.name"
:value="item.action">
<span style="float: left">{{ item.name }}</span>
<!--<span style="float: right; color: #8492a6; font-size: 13px">{{ item.action }}</span>-->
</el-option>
</el-select>
</div>
</el-col>
<el-col :span="10" class="el-col">
<div class="text item">
<div class="itemTag">
<span>往前推移时间(小时):&nbsp;</span>
</div>
<el-input
style="width: 200px"
size="small"
splaceholder="请输入内容"
v-model="editQuery.beforeTime"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col">
<div class="text item">
<div class="itemTag">
<span>转换顺序号:&nbsp;</span>
</div>
<el-input
style="width: 200px"
size="small"
splaceholder="请输入内容"
v-model="editQuery.index"
disabled="false"
></el-input>
</div>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button @click.native="hideForm" size="small">取消</el-button>
<el-button
type="primary"
size="small"
@click.native="formSubmit()"
:loading="formLoading"
>提交
</el-button
>
</div>
</el-dialog>
</div>
</template>
<script>
import {getOriginBusType} from "../../api/basic/busOriginType";
import {getBussinessType, getJoinBussinessType} from "../../api/basic/bussinessType";
import {
getChangeBusType,
addChangeBusType,
deleteChangeBusType,
updateChangeBusType, removeBusChange
} from "../../api/basic/busChangeType";
export default {
name: "inputQuery",
props: {
inputQuery: {
type: Object,
required: true,
},
},
data() {
return {
query: {
action: null,
type: null,
},
filterQuery: {
enabled: true,
isBuType: true,
},
editQuery: {},
thirdSys: [],
localTypes: [],
originTypes: [],
codeTypes: [],
value: "",
changeEnable: false,
changeEdit: 0,
editChangeTypeVisible: false,
formMap: {
0: "新增",
1: "编辑",
},
changeList: [],
visibleChange: false,
}
},
methods: {
getList() {
this.query.action = this.inputQuery.action;
getChangeBusType(this.query)
.then((response) => {
if (response.code == 20000) {
this.changeList = response.data || [];
if (this.inputQuery.changeEnable) {
this.visibleChange = true;
}
this.changeEnable = true;
// if (this.changeList.length == 0)
// this.changeEnable = false;
// else
// this.changeEnable = true;
} else {
// this.$message.error(response.message);
this.visibleChange = false;
this.changeEnable = false;
}
})
.catch(() => {
});
},
getTypes() {
getOriginBusType()
.then((response) => {
this.originTypes = response.data.list || [];
})
.catch(() => {
});
this.getBusTypes();
},
getBusTypes() {
let query = {
enabled: true,
filterAction: this.inputQuery.action,
};
getJoinBussinessType(query)
.then((response) => {
this.codeTypes = response.data.list || [];
})
.catch(() => {
});
},
removeBusChangeType() {
let query = {
scAction: this.inputQuery.action,
};
removeBusChange(query)
.then((response) => {
this.changeList = [];
})
.catch(() => {
});
},
addChangeType() {
this.changeEdit = 0;
this.editQuery = {};
this.editChangeTypeVisible = true;
}
,
handleModifyClick(row) {
this.changeEdit = 1;
this.editQuery = row;
this.editChangeTypeVisible = true;
this.getBusTypes();
}
,
hideForm() {
this.editChangeTypeVisible = false;
}
,
formSubmit() {
if (this.changeEdit == 0) {
this.editQuery.action = this.inputQuery.action;
addChangeBusType(this.editQuery)
.then((response) => {
this.editChangeTypeVisible = false;
this.getList();
})
.catch(() => {
});
} else {
updateChangeBusType(this.editQuery)
.then((response) => {
this.editChangeTypeVisible = false;
this.getList();
})
.catch(() => {
});
}
}
,
deleteClick(row) {
let query = {
id: row.id,
}
deleteChangeBusType(query)
.then((response) => {
this.editChangeTypeVisible = false;
this.getList();
})
.catch(() => {
});
}
,
isChangeOrder() {
if (this.inputQuery.changeEnable) {
this.query.type = "changeEnable";
this.getList()
} else {
this.visibleChange = false;
this.removeBusChangeType();
}
}
,
},
created() {
this.getTypes();
this.getList();
}
,
}
;
</script>
<style scoped>
.itemTag {
float: left;
text-align: left;
margin-top: 10px;
width: 100px;
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
}
.el-row {
display: flex;
flex-wrap: wrap;
margin-bottom: 20px;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
}
</style>

@ -170,10 +170,10 @@ export default {
options: [{ options: [{
value: "0", value: "0",
label: "供应商信息" label: "供应商信息"
}, { }, {
value: "1", value: "1",
label: "仓库信息" label: "仓库信息"
}, },
{ {
value: "2", value: "2",
label: "客户信息" label: "客户信息"

@ -662,11 +662,7 @@
</template> </template>
<script> <script>
import { import {getProductInfos} from "../../api/receipts/productInfo";
getProductInfos,
deleteProductInfos,
updateProductInfos
} from "../../api/receipts/productInfo";
import { import {
filterByUuid, filterByUuid,
updatetUdiInfos, updatetUdiInfos,

File diff suppressed because it is too large Load Diff

@ -502,14 +502,13 @@ import {
saveWarehouse, saveWarehouse,
deleteWarehouse, warehouseBussinessTypeList, deleteWarehouse, warehouseBussinessTypeList,
warehouseUserList, saveWarehouseBussinessType, warehouseUserList, saveWarehouseBussinessType,
saveWarehouseUser, updateDirector, disableWarehouse, saveWarehouseUser, updateDirector,
deleteWarehouseUser, deleteWarehouseBussinessType, deleteWarehouseUser, deleteWarehouseBussinessType,
bindThrWarehouse, unbindThrWarehouse, getThrsysDetail bindThrWarehouse, unbindThrWarehouse
} from "../../api/basic/invWarehouse"; } from "../../api/basic/invWarehouse";
import {filterThrList} from "@/api/thrsys/thrInvWarehouse"; import {filterThrList} from "@/api/thrsys/thrInvWarehouse";
import {getUserList} from "../../api/auth/authUser"; import {getUserList} from "../../api/auth/authUser";
import {getJoinBussinessType} from "../../api/basic/bussinessType"; import {getJoinBussinessType} from "../../api/basic/bussinessType";
import {formatDate} from "@/utils/date";
import axios from "axios"; import axios from "axios";
import store from "@/store"; import store from "@/store";
@ -933,7 +932,8 @@ export default {
loadUserList(val) { loadUserList(val) {
if (val != null) { if (val != null) {
this.userQuery.page = val; this.userQuery.page = val;
}; }
;
// //
warehouseUserList(this.userQuery).then((res) => { warehouseUserList(this.userQuery).then((res) => {
this.userData = res.data.list || []; this.userData = res.data.list || [];

@ -215,10 +215,7 @@ import {
modifyUnit, modifyUnit,
deleteUnitMaintain deleteUnitMaintain
} from "../../api/receipts/unitMaintain"; } from "../../api/receipts/unitMaintain";
import { import {getPlatform} from "../../api/auth/platform";
getPlatform,
linkPlatform
} from "../../api/auth/platform";
export default { export default {
data() { data() {

@ -178,11 +178,7 @@
<script> <script>
import {filterCompany} from "../../api/basic/udiInfo"; import {filterCompany} from "../../api/basic/udiInfo";
import { import {getUdiInfos, combineUdi, combineAllUdi} from "../../api/erp/udiRelevance";
getUdiInfos,
combineProduct,
combineUdi, combineAllUdi
} from "../../api/erp/udiRelevance";
import selectDIDetail from "./SelectDIDetailDialog"; import selectDIDetail from "./SelectDIDetailDialog";
export default { export default {
@ -265,18 +261,6 @@ export default {
this.unionQuery.page = val; this.unionQuery.page = val;
this.getList(); this.getList();
}, },
getErpList() {
this.loading = true;
getErpProduct(this.erpQuery)
.then((response) => {
this.loading = false;
this.erpList = response.data || [];
})
.catch(() => {
this.loading = false;
this.erpList = [];
});
},
intentBack() { intentBack() {
this.$emit("closeUdi", false); this.$emit("closeUdi", false);
}, },

@ -243,7 +243,6 @@
<script> <script>
import { import {
getUnbindUnitMaintain,
getUnitMaintain, getUnitMaintain,
addUnit, addUnit,
modifyUnit modifyUnit

@ -387,7 +387,7 @@ export default {
} else if (isBlank(this.formData.passWord)) { } else if (isBlank(this.formData.passWord)) {
this.$message.error("密码不能为空") this.$message.error("密码不能为空")
return; return;
}else if (isBlank(this.formData.checkPassword)) { } else if (isBlank(this.formData.checkPassword)) {
this.$message.error("请再次确认密码"); this.$message.error("请再次确认密码");
return; return;
} else if (isBlank(this.formData.employeeName)) { } else if (isBlank(this.formData.employeeName)) {

@ -273,8 +273,8 @@
</template> </template>
<script> <script>
import {getRegisters, checkPass, deleteRe} from "../../api/auth/register"; import {checkPass} from "../../api/auth/register";
import {authAdminRoleList, authCustomerRoles} from "../../api/auth/authAdmin"; import {authCustomerRoles} from "../../api/auth/authAdmin";
import {getSystemPDFTemplates} from "../../api/param/systemPDFTemplate"; import {getSystemPDFTemplates} from "../../api/param/systemPDFTemplate";
import { import {
getCustomers, getCustomers,

@ -321,7 +321,6 @@ import {
systemPDFModuleSave, systemPDFModuleSave,
getSystemPDFModules getSystemPDFModules
} from "../../../api/param/systemPDFTemplate"; } from "../../../api/param/systemPDFTemplate";
import {BASE_URL} from "../../../config/app"; import {BASE_URL} from "../../../config/app";
import {saveAs} from 'file-saver'; import {saveAs} from 'file-saver';
import {demoPrint} from "@/api/itextpdf/itextpdf"; import {demoPrint} from "@/api/itextpdf/itextpdf";

@ -481,7 +481,7 @@ export default {
selectedOptions: [], selectedOptions: [],
fromOptions: [], fromOptions: [],
fromUdplatOptions: [], fromUdplatOptions: [],
fileList:[], fileList: [],
acoountInfo: "账号:" + "------" + "\n密码" + "-----", acoountInfo: "账号:" + "------" + "\n密码" + "-----",
rules: { rules: {
nickName: [ nickName: [
@ -627,7 +627,7 @@ export default {
this.inputQuery.areaCode = value.toString(); this.inputQuery.areaCode = value.toString();
}, },
beforeRemove(file, fileList) { beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${ file.name }`, '提示', { return this.$confirm(`确定移除 ${file.name}`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
@ -709,9 +709,6 @@ export default {
this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`); this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
}, },
uploadOnchange(file, fileList) { uploadOnchange(file, fileList) {
console.log("触发了")
console.log(fileList)
console.log(file)
let fileName = file.name; let fileName = file.name;
let uid = file.uid; let uid = file.uid;
let pos = fileName.lastIndexOf("."); let pos = fileName.lastIndexOf(".");

@ -173,7 +173,6 @@ import {
authAdminSave, authAdminSave,
authAdminDelete, authAdminDelete,
} from "../../api/auth/authAdmin"; } from "../../api/auth/authAdmin";
import {userInfo} from "../../api/auth/login"; import {userInfo} from "../../api/auth/login";
const formJson = { const formJson = {

@ -78,13 +78,13 @@
<span>{{ scope.row.actDate }}</span> <span>{{ scope.row.actDate }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="状态" prop="contrastStatus" width="120"> <!-- <el-table-column label="状态" prop="contrastStatus" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="(scope.row.status === 1) | statusFilterType"> <el-tag :type="(scope.row.status === 1) | statusFilterType">
{{ erpCheckStatus[scope.row.contrastStatus] }} {{ erpCheckStatus[scope.row.contrastStatus] }}
</el-tag> </el-tag>
</template> </template>
</el-table-column>--> </el-table-column>-->
<el-table-column label="单据状态" prop="status" width="100"> <el-table-column label="单据状态" prop="status" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="(scope.row.status == 3) | statusFilterType">{{ <el-tag :type="(scope.row.status == 3) | statusFilterType">{{

@ -25,7 +25,8 @@
:clearable="true"></el-input> :clearable="true"></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-select v-model="filterQuery.invStorageCode" placeholder="请选择仓库" clearable="true" size="mini"> <el-select v-model="filterQuery.invStorageCode" placeholder="请选择仓库" clearable="true"
size="mini">
<el-option <el-option
v-for="item in storageList" v-for="item in storageList"
:key="item.name" :key="item.name"
@ -103,10 +104,7 @@
</template> </template>
<script> <script>
import { import {filterProducts, deleteProducts} from "../../api/warehouse/InvProducts";
filterProducts,
deleteProducts
} from "../../api/warehouse/InvProducts";
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import codeDetail from "../inventory/InvPreProductsDetail"; import codeDetail from "../inventory/InvPreProductsDetail";
import store from "../../store"; import store from "../../store";

@ -234,13 +234,7 @@
<script> <script>
import { import {
orderGetUdi,
orderList,
codeList,
orderListError,
saveOrderWeb, saveOrderWeb,
mergeOrder,
postOrdersWeb,
errorCodeList, errorCodeList,
addOrderWeb, addOrderWeb,
deleteCodesTempById, deleteCodesTempById,

@ -48,9 +48,8 @@
</template> </template>
<script> <script>
import {orderList, codeList} from "../../api/warehouse/order"; import {codeList} from "../../api/warehouse/order";
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import {saveAs} from "file-saver";
export default { export default {
name: "idQuery", name: "idQuery",

@ -172,232 +172,232 @@
</template> </template>
<script> <script>
import {codeList, updateOrderInfo, getOrderById} from "../../api/warehouse/order"; import {codeList, updateOrderInfo, getOrderById} from "../../api/warehouse/order";
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import {replaceCodes} from "@/api/basic/invWarehouse"; import {replaceCodes} from "@/api/basic/invWarehouse";
export default { export default {
name: "idQuery", name: "idQuery",
props: { props: {
idQuery: { idQuery: {
type: Object, type: Object,
required: true, required: true,
},
}, },
data() { },
return { data() {
query: { return {
code: "", query: {
corpOrderId: "", code: "",
page: 1, corpOrderId: "",
limit: 20, page: 1,
}, limit: 20,
codeArry: [], },
total: 0, codeArry: [],
loading: true, total: 0,
index: null, loading: true,
formLoading: false, index: null,
formVisible: false, formLoading: false,
replaceVisible: false, formVisible: false,
deleteLoading: false, replaceVisible: false,
orderNo: null, deleteLoading: false,
busTypes: [], orderNo: null,
codeDetail: { busTypes: [],
code: null, codeDetail: {
count: null, code: null,
newCode: null, count: null,
newCount: null, newCode: null,
orderId: null newCount: null,
}, orderId: null
actDate: null, },
auditTime: null, actDate: null,
editOrderVisible: false, auditTime: null,
pickerOptions: { editOrderVisible: false,
disabledDate: time => { pickerOptions: {
let endDate = new Date().getTime(); disabledDate: time => {
let nowDate = new Date(time).getTime(); let endDate = new Date().getTime();
return (nowDate > endDate); let nowDate = new Date(time).getTime();
} return (nowDate > endDate);
} }
}
};
},
components: {
draggable,
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.query = {
code: "",
corpOrderId: "",
page: 1,
limit: 20,
}; };
this.getCodeList();
}, },
components: { onSubmit() {
draggable, this.$router.push({
path: "",
query: this.query,
});
this.getCodeList();
},
handleSizeChange(val) {
this.query.limit = val;
this.getCodeList();
},
handleCurrentChange(val) {
this.query.page = val;
this.getCodeList();
}, },
methods: {
onReset() {
this.$router.push({
path: "",
});
this.query = {
code: "",
corpOrderId: "",
page: 1,
limit: 20,
};
this.getCodeList();
},
onSubmit() {
this.$router.push({
path: "",
query: this.query,
});
this.getCodeList();
},
handleSizeChange(val) {
this.query.limit = val;
this.getCodeList();
},
handleCurrentChange(val) {
this.query.page = val;
this.getCodeList();
},
getCodeList() { getCodeList() {
this.loading = true; this.loading = true;
this.query.orderId = this.idQuery.id; this.query.orderId = this.idQuery.id;
codeList(this.query) // codeList(this.query) //
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
this.codeArry = response.data.list || []; this.codeArry = response.data.list || [];
this.total = response.data.total || 0; this.total = response.data.total || 0;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
this.list = []; this.list = [];
this.total = 0; this.total = 0;
}); });
}, },
intentBack() { intentBack() {
this.$router.go(-1); this.$router.go(-1);
}, },
showReplaceDialog(row) { showReplaceDialog(row) {
this.replaceVisible = true; this.replaceVisible = true;
this.codeDetail = {
code: row.code,
count: row.count,
orderId: row.orderId
}
},
cancelDialog() {
this.replaceVisible = false;
this.codeDetail = {
code: null,
count: null,
newCode: null,
newCount: null
};
},
replaceCodes(row) {
this.$confirm("是否确认库存减一", "提示", {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.codeDetail = { this.codeDetail = {
code: row.code, code: row.code,
count: row.count, count: row.count,
orderId: row.orderId orderId: row.orderId
}
},
cancelDialog() {
this.replaceVisible = false;
this.codeDetail = {
code: null,
count: null,
newCode: null,
newCount: null
};
},
replaceCodes(row) {
this.$confirm("是否确认库存减一", "提示", {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.codeDetail = {
code: row.code,
count: row.count,
orderId: row.orderId
};
replaceCodes(this.codeDetail).then((res) => {
if (res.code === 20000) {
this.$message.success("操作成功");
this.getCodeList();
} else {
this.$message.error(res.message);
}
}).catch((error) => {
this.$message.error(error.message);
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
});
});
},
editOrderTime() {
let getOrderDataParam = {
id: this.query.corpOrderId,
};
getOrderById(getOrderDataParam).then((res) => {
this.actDate = res.data.actDate;
this.auditTime = res.data.auditTime;
this.editOrderVisible = true;
}).catch((error) => {
});
},
updateOrderInfo() {
if (this.actDate === null || this.actDate === undefined) {
this.$message.warning("创建时间不能为空");
return;
}
let data = {
actDate: this.actDate,
orderIds: [this.query.orderId]
}; };
updateOrderInfo(data).then((res) => { replaceCodes(this.codeDetail).then((res) => {
if (res.code === 20000) { if (res.code === 20000) {
this.$message.success("修改成功"); this.$message.success("操作成功");
this.getCodeList(); this.getCodeList();
} else {
this.$message.error(res.message);
} }
}).catch((error) => { }).catch((error) => {
this.$message.error(error.message);
}); });
this.actDate = null; }).catch(() => {
this.auditTime = null; this.$message({
this.editOrderVisible = false; type: 'info',
}, message: '已取消操作'
cancelEdit() { });
this.editOrderVisible = false; });
this.actDate = null;
this.auditTime = null;
}
}, },
filters: {}, editOrderTime() {
mounted() { let getOrderDataParam = {
document.body.ondrop = function (event) { id: this.query.corpOrderId,
event.preventDefault();
event.stopPropagation();
}; };
getOrderById(getOrderDataParam).then((res) => {
this.actDate = res.data.actDate;
this.auditTime = res.data.auditTime;
this.editOrderVisible = true;
}).catch((error) => {
});
}, },
created() { updateOrderInfo() {
// if (this.actDate === null || this.actDate === undefined) {
let query = this.$route.query; this.$message.warning("创建时间不能为空");
this.orderNo = query.id; return;
}
let data = {
actDate: this.actDate,
orderIds: [this.query.orderId]
};
updateOrderInfo(data).then((res) => {
if (res.code === 20000) {
this.$message.success("修改成功");
this.getCodeList();
}
}).catch((error) => {
});
this.actDate = null;
this.auditTime = null;
this.editOrderVisible = false;
},
cancelEdit() {
this.editOrderVisible = false;
this.actDate = null;
this.auditTime = null;
}
},
filters: {},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
},
created() {
//
let query = this.$route.query;
this.orderNo = query.id;
this.query = Object.assign(this.query, query); this.query = Object.assign(this.query, query);
this.query.limit = parseInt(this.query.limit); this.query.limit = parseInt(this.query.limit);
this.query.corpOrderId = query.id; this.query.corpOrderId = query.id;
// //
this.getCodeList(); this.getCodeList();
}, },
}; };
</script> </script>
<style scoped> <style scoped>
.itemTag { .itemTag {
float: left; float: left;
text-align: left; text-align: left;
margin-top: 10px; margin-top: 10px;
width: 100px; width: 100px;
} }
.text { .text {
font-size: 13px; font-size: 13px;
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
} }
.el-row { .el-row {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
margin-bottom: 20px; margin-bottom: 20px;
} }
.el-col { .el-col {
border-radius: 4px; border-radius: 4px;
flex-wrap: wrap; flex-wrap: wrap;
} }
</style> </style>

@ -104,13 +104,11 @@
<script> <script>
import { import {
orderList,
errorCodeList, errorCodeList,
deleteCodesTempById, deleteCodesTempById,
deleteCodes, updateCodeBindSup, deleteCodes, updateCodeBindSup,
} from "../../api/warehouse/order"; } from "../../api/warehouse/order";
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import {saveAs} from "file-saver";
import DialogSelectUnit from "./DialogSelectUnit"; import DialogSelectUnit from "./DialogSelectUnit";
import selectRlDialog from "./DialogSelectRl"; import selectRlDialog from "./DialogSelectRl";

@ -264,10 +264,6 @@ export default {
}, },
busTypes: [], busTypes: [],
list: [], list: [],
adId: [],
adSelectList: [],
adList: {},
adListNoDataText: "无数据",
queryAdIdAsyncLoading: false, queryAdIdAsyncLoading: false,
codeDetailVisible: false, codeDetailVisible: false,
total: 0, total: 0,

@ -312,7 +312,6 @@
<script> <script>
import { import {
filterCode, filterCode,
codeList,
findAllByOrderId, findAllByOrderId,
updateUnit, updateUnit,
filterOrder, filterOrder,
@ -322,7 +321,6 @@ import {
mergeOrder, mergeOrder,
orderDetail, orderDetail,
} from "../../api/warehouse/order"; } from "../../api/warehouse/order";
import {unitListBykey} from "../../api/warehouse/unit"; import {unitListBykey} from "../../api/warehouse/unit";
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import {saveAs} from "file-saver"; import {saveAs} from "file-saver";

@ -239,12 +239,7 @@ export default {
}, },
curOrderId: null, curOrderId: null,
list: [], list: [],
adId: [],
busTypes: [], busTypes: [],
adSelectList: [],
adList: {},
adListNoDataText: "无数据",
queryAdIdAsyncLoading: false,
codeDetailVisible: false, codeDetailVisible: false,
total: 0, total: 0,
loading: true, loading: true,

@ -166,7 +166,6 @@
<script> <script>
import { import {
filterCode, filterCode,
codeList,
findAllByOrderId, findAllByOrderId,
updateUnit, updateUnit,
deleteByOrderId, deleteByOrderId,

@ -305,12 +305,9 @@
<script> <script>
import { import {
getBasicInstrumentMaintains,
getBasicInstrumentMaintainsFilterProduct getBasicInstrumentMaintainsFilterProduct
} from "../../api/basic/basicInstrumentMaintain"; } from "../../api/basic/basicInstrumentMaintain";
import {combineUdi} from "../../api/basic/basicInstrumentMaintainRelevance";
import store from "../../store"; import store from "../../store";
import {insertCompanySalesman, updateCompanySalesman} from "../../api/warehouse/companySalesman";
import { import {
insertCompanyProductRelevance, insertCompanyProductRelevance,
updateCompanyProductRelevance updateCompanyProductRelevance

@ -218,359 +218,359 @@
</template> </template>
<script> <script>
import {filterOrderForDelete, orderDetail, deleteByOrderId, updateOrderInfo} from "../../api/warehouse/order"; import {filterOrderForDelete, orderDetail, deleteByOrderId, updateOrderInfo} from "../../api/warehouse/order";
import store from "../../store"; import store from "../../store";
import {getBussinessType} from "../../api/basic/bussinessType"; import {getBussinessType} from "../../api/basic/bussinessType";
import {filterAllByUser} from "@/api/basic/invWarehouse"; import {filterAllByUser} from "@/api/basic/invWarehouse";
import codeReplace from "./codeReplace"; import codeReplace from "./codeReplace";
export default { export default {
name: "stockOrderDelete", name: "stockOrderDelete",
data() { data() {
return { return {
query: { query: {
orderId: "", orderId: "",
page: 1, page: 1,
limit: 10 limit: 10
},
detailQuery: {
orderId: null,
page: 1,
limit: 20
},
busTypes: [],
list: [],
detailList: [],
currentCheckIndex: -1,
multipId: [],
formLabelWidth: '150px',
total: 0,
detailTotal: 0,
storageList: [],
loading: false,
detailLoading: false,
idQuery: {
id: "",
},
sourceMap: {
"1": "web端新增单据",
"2": "第三方系统",
"3": "扫码单据转换",
},
fromTypeMap: {
"1": "UDIMS平台",
"2": "网页新增",
"3": "pda即时校验",
"4": "pda未校验",
"5": "pc端扫码精灵",
"6": "缺量补录单据",
"7": "UDI供应商平台",
"8": "平衡补录单据",
},
erpCheckStatus: {
1: "已验收",
0: "未验收",
2: "无需验收",
},
isSp: store.getters.customerId,
detailFormData: {},
detailFormLoading: false,
actDateRange: [],
curRow: null,
codeDetailVisible: false,
editOrderVisible: false,
actDate: null, //
orderIds: [],
pickerOptions: {
disabledDate: time => {
let endDate = new Date().getTime();
let nowDate = new Date(time).getTime();
return (nowDate > endDate);
}
}
}
},
methods: {
onReset() {
this.$router.push({
path: ""
});
this.query = {
orderId: ""
};
this.list = [];
this.detailList = [];
this.actDateRange = [];
}, },
onSubmit() { detailQuery: {
this.query.page = 1; orderId: null,
this.getList(); page: 1,
limit: 20
}, },
handleCurrentChange(val) { busTypes: [],
this.query.page = val; list: [],
this.getList(); detailList: [],
}, currentCheckIndex: -1,
multipId: [],
changeFun(row) { formLabelWidth: '150px',
let _this = this; total: 0,
_this.multipId = []; //ID detailTotal: 0,
row.forEach((item) => { storageList: [],
_this.multipId.push(item.id); loading: false,
}) detailLoading: false,
idQuery: {
id: "",
}, },
detailHandleCurrentChange(val) { sourceMap: {
this.query.page = val; "1": "web端新增单据",
this.getOrderDetailList(); "2": "第三方系统",
"3": "扫码单据转换",
}, },
// fromTypeMap: {
resetForm() { "1": "UDIMS平台",
if (this.$refs["dataForm"]) { "2": "网页新增",
// "3": "pda即时校验",
this.$refs["dataForm"].clearValidate(); "4": "pda未校验",
// "5": "pc端扫码精灵",
this.$refs["dataForm"].resetFields(); "6": "缺量补录单据",
this.getList(); "7": "UDI供应商平台",
} "8": "平衡补录单据",
}, },
getList() { erpCheckStatus: {
this.query.orderId = this.query.orderId.trim(); 1: "已验收",
if (this.query.orderId === null || this.query.orderId === "") { 0: "未验收",
this.$message.warning("请输入需要查询的单号"); 2: "无需验收",
} else {
this.loading = true;
filterOrderForDelete(this.query)
.then(response => {
this.loading = false;
this.list = response.data || [];
this.detailList = [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
this.detailList = [];
});
}
}, },
getOrderDetailList(row) { isSp: store.getters.customerId,
if (this.$isNotBlank(row)) { detailFormData: {},
this.detailQuery.orderId = row.orderId; detailFormLoading: false,
actDateRange: [],
curRow: null,
codeDetailVisible: false,
editOrderVisible: false,
actDate: null, //
orderIds: [],
pickerOptions: {
disabledDate: time => {
let endDate = new Date().getTime();
let nowDate = new Date(time).getTime();
return (nowDate > endDate);
} }
this.detailLoading = true; }
orderDetail(this.detailQuery) }
.then((response) => { },
this.detailLoading = false; methods: {
this.detailList = response.data || []; onReset() {
this.$router.push({
path: ""
});
this.query = {
orderId: ""
};
this.list = [];
this.detailList = [];
this.actDateRange = [];
},
onSubmit() {
this.query.page = 1;
this.getList();
},
handleCurrentChange(val) {
this.query.page = val;
this.getList();
},
changeFun(row) {
let _this = this;
_this.multipId = []; //ID
row.forEach((item) => {
_this.multipId.push(item.id);
})
},
detailHandleCurrentChange(val) {
this.query.page = val;
this.getOrderDetailList();
},
//
resetForm() {
if (this.$refs["dataForm"]) {
//
this.$refs["dataForm"].clearValidate();
//
this.$refs["dataForm"].resetFields();
this.getList();
}
},
getList() {
this.query.orderId = this.query.orderId.trim();
if (this.query.orderId === null || this.query.orderId === "") {
this.$message.warning("请输入需要查询的单号");
} else {
this.loading = true;
filterOrderForDelete(this.query)
.then(response => {
this.loading = false;
this.list = response.data || [];
this.detailList = [];
this.total = response.data.total || 0;
}) })
.catch(() => { .catch(() => {
this.detailLoading = false; this.loading = false;
this.list = [];
this.total = 0;
this.detailList = []; this.detailList = [];
}); });
}, }
tableRowClassName({row, rowIndex}) { },
if (rowIndex === 0) { getOrderDetailList(row) {
return 'highlight-row'; if (this.$isNotBlank(row)) {
this.detailQuery.orderId = row.orderId;
}
this.detailLoading = true;
orderDetail(this.detailQuery)
.then((response) => {
this.detailLoading = false;
this.detailList = response.data || [];
})
.catch(() => {
this.detailLoading = false;
this.detailList = [];
});
},
tableRowClassName({row, rowIndex}) {
if (rowIndex === 0) {
return 'highlight-row';
}
return '';
},
getActionName(action) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].action === action) {
return this.busTypes[i].name;
} }
return ''; }
}, },
getActionName(action) { getBusType() {
for (let i = 0; i < this.busTypes.length; i++) { let query = {
if (this.busTypes[i].action === action) { enabled: true,
return this.busTypes[i].name; };
} getBussinessType(query)
.then((response) => {
this.busTypes = response.data.list || [];
})
.catch(() => {
});
},
getStorageName(code) {
for (let i = 0; i < this.storageList.length; i++) {
if (this.storageList[i].code === code) {
return this.storageList[i].name;
} }
}, }
getBusType() { },
let query = { getStorage() {
enabled: true, this.storageList = [];
filterAllByUser()
.then((response) => {
this.storageList = response.data || [];
})
.catch(() => {
});
},
deleteOrder(row) {
this.$confirm('是否确认删除单据及相关数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params = {
orderId: row.orderId
}; };
getBussinessType(query) deleteByOrderId(params).then((res) => {
.then((response) => { if (res.code === 20000) {
this.busTypes = response.data.list || []; this.$message({
}) type: 'success',
.catch(() => { message: '删除成功!'
}); });
}, this.getList();
getStorageName(code) { this.detailList = [];
for (let i = 0; i < this.storageList.length; i++) {
if (this.storageList[i].code === code) {
return this.storageList[i].name;
} }
} }).catch((error) => {
}, this.$message.error("删除失败");
getStorage() {
this.storageList = [];
filterAllByUser()
.then((response) => {
this.storageList = response.data || [];
})
.catch(() => {
});
},
deleteOrder(row) {
this.$confirm('是否确认删除单据及相关数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params = {
orderId: row.orderId
};
deleteByOrderId(params).then((res) => {
if (res.code === 20000) {
this.$message({
type: 'success',
message: '删除成功!'
});
this.getList();
this.detailList = [];
}
}).catch((error) => {
this.$message.error("删除失败");
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
}); });
}, }).catch(() => {
deleteAllOrder() { this.$message({
if (this.query.orderId === null || this.query.orderId === "" || this.list.length === 0) { type: 'info',
return; message: '已取消删除'
} });
this.$confirm("是否确认删除此单据及所有关联单据?", "提示", { });
confirmButtonText: '确定', },
cancelButtonText: '取消', deleteAllOrder() {
type: 'warning' if (this.query.orderId === null || this.query.orderId === "" || this.list.length === 0) {
}).then(() => { return;
let ids = []; }
this.list.forEach(item => { this.$confirm("是否确认删除此单据及所有关联单据?", "提示", {
ids.push(item.orderId); confirmButtonText: '确定',
}); cancelButtonText: '取消',
let params = { type: 'warning'
ids: ids }).then(() => {
}; let ids = [];
deleteByOrderId(params).then((res) => {
if (res.code === 20000) {
this.$message.success("删除成功");
this.list = [];
this.detailList = [];
}
}).catch((error) => {
this.$message.error("删除失败");
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
})
},
editAllOrderTime() {
if (this.query.orderId === null || this.query.orderId === "" || this.list.length === 0) {
return;
}
this.actDate = null;
this.editOrderVisible = true;
},
intentDetail(row) {
this.codeDetailVisible = true;
this.idQuery.id = row.orderId;
},
handleEdit(row) {
this.editOrderVisible = true;
let actDateSplit = row.actDate.split(" ");
this.actDate = actDateSplit[0];
this.actDate2 = actDateSplit[1];
this.orderIds = [];
},
updateOrderInfo() {
if (this.actDate === null || this.actDate === '') {
this.$message.warning("创建时间不能为空");
return;
}
this.editOrderVisible = false;
this.orderIds = [];
this.list.forEach(item => { this.list.forEach(item => {
this.orderIds.push(item.orderId); ids.push(item.orderId);
}); });
let data = { let params = {
actDate: this.actDate, ids: ids
orderIds: this.orderIds
}; };
updateOrderInfo(data).then((res) => { deleteByOrderId(params).then((res) => {
if (res.code === 20000) { if (res.code === 20000) {
this.$message.success("修改成功"); this.$message.success("删除成功");
this.getList(); this.list = [];
this.detailList = [];
} }
}).catch((error) => { }).catch((error) => {
this.$message.error(error.message); this.$message.error("删除失败");
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
}); });
}, })
cancelEdit() { },
this.editOrderVisible = false; editAllOrderTime() {
if (this.query.orderId === null || this.query.orderId === "" || this.list.length === 0) {
return;
} }
this.actDate = null;
this.editOrderVisible = true;
}, },
components: { intentDetail(row) {
codeReplace this.codeDetailVisible = true;
this.idQuery.id = row.orderId;
}, },
filters: { handleEdit(row) {
statusFilterType(status) { this.editOrderVisible = true;
const statusMap = { let actDateSplit = row.actDate.split(" ");
0: "gray", this.actDate = actDateSplit[0];
1: "success" this.actDate2 = actDateSplit[1];
};
return statusMap[status]; this.orderIds = [];
}, },
statusFilterName(status) { updateOrderInfo() {
const statusMap = { if (this.actDate === null || this.actDate === '') {
"1": "草稿", this.$message.warning("创建时间不能为空");
"2": "未配货", return;
"3": "待校验",
"4": "已校验",
"5": "已核对",
};
return statusMap[status];
},
typeFilterName(type) {
const typeMap = {
1: "预入库",
2: "普通采购",
};
return typeMap[type];
} }
this.editOrderVisible = false;
this.orderIds = [];
this.list.forEach(item => {
this.orderIds.push(item.orderId);
});
let data = {
actDate: this.actDate,
orderIds: this.orderIds
};
updateOrderInfo(data).then((res) => {
if (res.code === 20000) {
this.$message.success("修改成功");
this.getList();
}
}).catch((error) => {
this.$message.error(error.message);
});
}, },
created() { cancelEdit() {
this.getBusType(); this.editOrderVisible = false;
this.getStorage();
} }
},
components: {
codeReplace
},
filters: {
statusFilterType(status) {
const statusMap = {
0: "gray",
1: "success"
};
return statusMap[status];
},
statusFilterName(status) {
const statusMap = {
"1": "草稿",
"2": "未配货",
"3": "待校验",
"4": "已校验",
"5": "已核对",
};
return statusMap[status];
},
typeFilterName(type) {
const typeMap = {
1: "预入库",
2: "普通采购",
};
return typeMap[type];
}
},
created() {
this.getBusType();
this.getStorage();
} }
}
</script> </script>
<style scoped> <style scoped>
.el-dialog { .el-dialog {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin: 0 !important; margin: 0 !important;
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
.el-dialog .el-dialog__body { .el-dialog .el-dialog__body {
flex: 1; flex: 1;
overflow: auto; overflow: auto;
} }
.el-table /deep/ .highlight-row { .el-table /deep/ .highlight-row {
background: #cae3f9; background: #cae3f9;
} }
</style> </style>

Loading…
Cancel
Save