Browse Source

前后端代码提交

branch_ccpg_220107
44673626 3 years ago
parent
commit
48d49eeeb0
  1. 11
      vue/src/router/modules/basedata.js
  2. 11
      vue/src/router/modules/vw_menu.js
  3. 10
      vue/src/router/modules/vw_out_order.js
  4. 19
      vue/src/views/ux/billManage/IssuedUnsettled/index.vue
  5. 1357
      vue/src/views/ux/billManage/kanBanWithOutCode/index.vue
  6. 517
      vue/src/views/ux/billManage/kanbanWithOutOrder/detail.vue
  7. 340
      vue/src/views/ux/billManage/kanbanWithOutOrder/index.vue
  8. 331
      vue/src/views/ux/billManage/sparePart/index.vue

11
vue/src/router/modules/basedata.js

@ -38,16 +38,7 @@ const basedataRouter = {
name: 'codeSetting',//命名路由
meta: { title: '通用代码设置', roles: ['SettleAccount.CodeSettings'], icon: '通用' }
},
{
path: 'part-settlement',
component: () => import('@/views/ux/basedata/partsSettlement/index'),
name: 'partsSettlement',//命名路由
meta: {
title: '总成与结算件关系',
roles: ['SettleAccount.MaterialRelationships'],
icon: '零件'
}
},
{
path: 'priceList',
component: () => import('@/views/ux/basedata/priceList/index'),

11
vue/src/router/modules/vw_menu.js

@ -157,7 +157,16 @@ const vwMenudataRouter = {
icon: '看板'
}
},
{
path: '/kbwithoutcode',
component: () => import('@/views/ux/billManage/kanBanWithOutCode'),
name: 'KanBanWithOutCode',//命名路由
meta: {
title: '无条码看板结算输出',
//roles: ['SettleAccount.EstimatedStockDiffReports'],//控制页面角色(可以设置多个角色)
icon: '看板'
}
},
{
path: '/vwsparepart',
component: () => import('@/views/ux/billManage/sparePart'),

10
vue/src/router/modules/vw_out_order.js

@ -36,6 +36,16 @@ const vwOutOrderDataRouter = {
icon: '结算'
}
},
{
path: 'kanban-without-order',
component: () => import('@/views/ux/billManage/kanbanWithOutOrder/index'),
name: 'SettleAccount',//命名路由
meta: {
title: '大众无条码看板出库单',
roles: ['SettleAccount.SettleAccounts'],//控制页面角色(可以设置多个角色)
icon: '结算'
}
},
{
path: 'sparepart-out-order',
component: () => import('@/views/ux/billManage/sparepartOutOrder/index'),

19
vue/src/views/ux/billManage/IssuedUnsettled/index.vue

@ -1,4 +1,4 @@
<!--发出未结算明细页-->
<!--准时化发出未结算明细页-->
<template>
<div class="cr-body-content">
<!--功能栏-->
@ -636,15 +636,14 @@ export default {
searchContent: "", //
form: {},
formCount: {
startTime: "",
endTime: "",
// name: "",
// settledate: "",
// materialCode: "",
// sapMaterialCode: "",
// chassisNumber: "",
// kennCode: "",
// version: "",
version: "",
materialCode: undefined,
kenncode: undefined,
chassisNumber: undefined,
materialGroup: undefined,
begin: undefined,
end: undefined,
sapMaterialCode: undefined,
},
list: null,
totalCount: 0,

1357
vue/src/views/ux/billManage/kanBanWithOutCode/index.vue

File diff suppressed because it is too large

517
vue/src/views/ux/basedata/partsSettlement/index.vue → vue/src/views/ux/billManage/kanbanWithOutOrder/detail.vue

@ -1,52 +1,43 @@
<!--总成与结算件关系页-->
<!--FIS发运数据对比输出表-明细数据-->
<template>
<div class="cr-body-content">
<flexbox class="content-header">
<span>版本:</span>
<XhJSSelect
:options="versionList"
style="width: 200px"
<!-- <el-button
class="filter-item"
size="mini"
type="info"
icon="el-icon-download"
@click="handleDownload()"
>导出全部
</el-button> -->
<JobSelectVerson
:options="JobVersionList"
style="width: 150px; margin-left: -10px"
class="search-container"
@value-change="selectValue"
></XhJSSelect>
<span>适用功能</span>
<el-select
v-model="valueSelect"
clearable
placeholder="请选结算或二配"
size="medium"
style="margin-right: 15px"
@change="valueselectChange"
>
<el-option label="结算" value="R0003"></el-option>
<el-option label="二配" value="R0001"></el-option>
</el-select>
@value-change="JobVersionValue"
></JobSelectVerson>
<el-button
class="filter-item"
type="success"
icon="el-icon-check"
size="mini"
type="primary"
icon="el-icon-plus"
@click="handleImportExcel()"
>导入文件Excel
</el-button>
@click="handleCreateBills()"
>确认出库单(支持批量)</el-button
>
<el-button
class="filter-item"
size="mini"
type="warning"
icon="el-icon-bottom"
@click="handleDownload()"
>导出Excel
icon="el-icon-download"
@click="handleCancelBills()"
>取消出库(支持批量)
</el-button>
<el-input
v-model="searchContent"
clearable
size="small"
placeholder="按照ERP物料号搜索..."
style="width: 200px"
placeholder="按照零件号搜索..."
style="width: 230px"
class="search-container"
@keyup.enter.native="handleFilter"
/>
@ -69,7 +60,7 @@
<!--表格渲染-->
<el-table
ref="multipleTable"
v-loading.fullscreen.lock="listLoading"
v-loading="listLoading"
element-loading-text="拼命加载中..."
element-loading-spinner="el-icon-loading"
class="cr-table"
@ -86,20 +77,7 @@
@selection-change="handleSelectionChange"
@row-click="handleRowClick"
>
<!-- <el-table-column type="selection" width="44px"></el-table-column> -->
<el-table-column
label="版本"
prop="version"
sortable="custom"
align="center"
width="100px"
><!-- fixed 默认固定在左边-->
<template slot-scope="scope">
<el-tooltip :content="scope.row.version" placement="top">
<span class="link-type">{{ scope.row.version }}</span>
</el-tooltip>
</template>
</el-table-column>
<el-table-column type="selection" width="44px"></el-table-column>
<el-table-column
v-for="(item, index) in getDefaultField"
:key="index"
@ -125,13 +103,6 @@
:limit.sync="listQuery.MaxResultCount"
@pagination="getList"
/>
<!-- 导入Excel组件 -->
<importExcel
ref="importexcel"
:show="showExcelImport"
:crmType="crmType"
@close="importExcelData"
/>
</div>
</div>
</template>
@ -139,27 +110,14 @@
<script>
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import permission from "@/directive/permission/index.js";
import importExcel from "@/components/ImportExcel-hq";
import CRMTableHead from "../../components/CRMTableHead";
import moment from "moment";
import Lockr from "lockr";
import { downloadFile } from "@/utils/crmindex.js";
import XhJSSelect from "@/components/CreateCom/Xh-JS-Select-Label.vue";
import JobSelectVerson from "@/components/CreateCom/Job-Select.vue";
export default {
name: "MaterialRelationshipDetail",
components: { Pagination, CRMTableHead, importExcel, XhJSSelect },
name: "sendUnsettledDiffReport",
components: { Pagination, CRMTableHead, CRMTableHead, JobSelectVerson },
directives: { permission },
filters: {
IsCustomerSignFilter(status) {
//
const statusMap = {
true: "是",
false: "否",
};
return statusMap[status];
},
},
props: {
customerInfos: {
type: Array,
@ -170,10 +128,7 @@ export default {
},
data() {
return {
crmType: "materialRelation",
versionValue: "",
valueSelect: "R0003",
versionList: [], //
crmType: "kanbanOutOrder",
rules: {
//
erpMaterialCode: [
@ -182,7 +137,8 @@ export default {
},
searchContent: "", //
customerInfo: {
settleAccountId: "",
parentId: "",
version: "",
},
form: {
dicDetailID: "",
@ -193,6 +149,13 @@ export default {
totalCount: 0,
listLoading: true,
formLoading: false,
JobVersionList: [
{ value: "0", label: "未处理" },
{ value: "1", label: "申请出库" },
{ value: "2", label: "确认出库" },
{ value: "3", label: "不能出库" },
{ value: "4", label: "取消出库" },
],
//
filterObj: {
type: Object,
@ -200,10 +163,6 @@ export default {
return {};
},
},
listVersionQuery: {
SkipCount: 0,
MaxResultCount: 15,
},
listQuery: {
Filters: [
{
@ -213,35 +172,24 @@ export default {
value: "true",
}, //
],
//OrgID:"",
SkipCount: 0,
MaxResultCount: 15,
version: "",
customerCode: ""
billNum: "",
},
listExportQuery: {
Filters: [
{
logic: 0,
column: "Enabled",
action: 0,
value: "true",
}, //
],
//OrgID:"",
SkipCount: 0,
MaxResultCount: 15,
listOutPutQuery: {
version: "",
fileType: 0,
userId: "",
guids: "",
billNum: "",
},
page: 1,
JobversionValue: "",
JobversionValueVerson: "",
dialogFormVisible: false,
multipleSelection: [],
formTitle: "",
drawer: false,
showExcelImport: false,
tableHeight: document.documentElement.clientHeight - 260,
tableHeight: document.documentElement.clientHeight - 230,
isEdit: false,
};
},
@ -249,127 +197,217 @@ export default {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 260;
self.tableHeight = offsetHei - 190;
};
},
created() {
this.getVersionInfo();
//if (this.versionList == []) {
this.getList();
// }
this.getList();
},
watch: {
customerInfos: {
handler(newVal) {
if (newVal == "" || newVal == "undefined") {
//TODO
} else {
newVal.forEach((element) => {
this.customerInfo.parentId = element.ParentId;
this.customerInfo.version = element.Version;
});
if (this.customerInfo.parentId != "") {
this.getList();
}
}
},
immediate: true,
},
},
computed: {
/** 列表字段 */
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({
label: "适配功能",
prop: "customerCode",
width: 150,
label: "版本",
prop: "version",
width: 110,
});
tempsTabs.push({
label: "ERP物料号",
prop: "erpMaterialCode",
label: "零件号",
prop: "materialCode",
width: 150,
});
tempsTabs.push({
label: "ERP物料描述",
prop: "materialDesc",
width: 250,
});
tempsTabs.push({
label: "结算物料号",
prop: "settleMaterialCode",
width: 120,
});
tempsTabs.push({
label: "数量",
prop: "qty",
width: 120,
});
tempsTabs.push({ label: "零件描述", prop: "materialDesc", width: 250 });
tempsTabs.push({ label: "物料组", prop: "materialGroup", width: 220 });
tempsTabs.push({ label: "交货单号", prop: "wmsBillNum", width: 100 });
tempsTabs.push({ label: "数量", prop: "qty", width: 100 });
tempsTabs.push({ label: "状态", prop: "state", width: 100 });
return tempsTabs;
},
MoreTypes() {
var moreTypes = [];
moreTypes.push({ type: "updateFis", name: "更新FIS结算数据" });
//moreTypes.push({ type: "enter", name: "" });
return moreTypes;
},
},
methods: {
handleImportExcel() {
//
this.showExcelImport = true;
this.$refs.importexcel.handleImportExcelClick();
},
selectValue(params) {
//
JobVersionValue(params) {
//
this.versionValue = params.value;
this.getList();
},
valueselectChange(data) {
//alert(data);
//
this.valueSelect = data;
this.listQuery.Filters = [];
var column = "state";
let filter = {
logic: 0,
column: column,
action: 0,
value: params.value,
};
this.listQuery.Filters.push(filter);
this.getList();
},
handleTypeDrop(command, params = {}) {
if (command == "updateFis") {
this.listLoading = true;
//this.listQuery.SkipCount = (this.page - 1) * 10000;
this.$axios
.posts("/api/settleaccount/MaterialRelationshipDetail/updateFis")
.then((res) => {
if (res == true) {
//
handleCancelBills(row) {
if (this.multipleSelection.length == 0) {
this.$message({
message: "至少选择一行!",
type: "warning",
});
return;
}
var params = [];
let myalert = ""; //使
if (row) {
//
params.push(row.id);
myalert = row.name;
} else {
//
this.multipleSelection.forEach((element) => {
let id = element.id;
params.push(id);
});
myalert = "选中项";
}
this.listOutPutQuery.version = this.customerInfo.version;
this.listOutPutQuery.guids = params;
this.listOutPutQuery.billNum = this.customerInfo.parentId;
console.log("取消出库条件:" + JSON.stringify(this.listOutPutQuery));
this.$confirm("是否确认取消出库" + myalert + "?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$axios
.posts(
"/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Cancel",
this.listOutPutQuery
)
.then((response) => {
const index = this.list.indexOf(row);
this.$notify({
title: "成功",
message: "FIS数据-更新成功!",
message: "操作成功",
type: "success",
duration: 2000,
});
} else {
this.$message({
type: "warning",
message: "FIS数据-更新失败!",
this.getList();
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
});
});
},
//
handleCreateBills(row) {
if (this.multipleSelection.length == 0) {
this.listLoading = true;
this.listOutPutQuery.guids = [];
this.listOutPutQuery.version = this.customerInfo.version;
this.listOutPutQuery.billNum = this.customerInfo.parentId;
console.log(
"未选择时全部确认出库条件:" + JSON.stringify(this.listOutPutQuery)
);
this.$confirm("是否全部确认出库?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$axios
.posts(
"/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Pass",
this.listOutPutQuery
)
.then((response) => {
const index = this.list.indexOf(row);
this.$notify({
title: "成功",
message: "生成成功",
type: "success",
duration: 2000,
});
this.getList();
this.listLoading = false;
});
}
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
});
this.listLoading = false;
});
} else if (command == "enter") {
}
},
selectOptionsChange(item) {
this.getList();
},
getVersionInfo() {
//
//this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 1000;
this.$axios
.posts(
"/api/settleaccount/MaterialRelationshipDetail/versionlist",
this.listQuery
)
.then((response) => {
this.versionList = [];
response.items.forEach((element) => {
let options = {};
options.value = element.id;
options.label = element.version;
this.versionList.push(options);
} else {
this.listLoading = true;
var params = [];
let myalert = ""; //使
if (row) {
//
params.push(row.id);
myalert = row.name;
} else {
//
this.multipleSelection.forEach((element) => {
let id = element.id;
params.push(id);
});
const res = new Map()
this.versionList = this.versionList.filter((item) => !res.has(item.label) && res.set(item.label, 1))
if (JSON.stringify(this.versionList) != "[]") {
//
this.versionValue = this.versionList[0].label;
this.getList();
}
myalert = "选中项";
}
this.listOutPutQuery.version = this.customerInfo.version;
this.listOutPutQuery.guids = params;
this.listOutPutQuery.billNum = this.customerInfo.parentId;
console.log(
"部分选择时确认出库条件:" + JSON.stringify(this.listOutPutQuery)
);
this.$confirm("是否确认将选中的出库" + myalert + "?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.catch(() => {
this.listLoading = false;
});
.then(() => {
this.$axios
.posts(
"/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Pass",
this.listOutPutQuery
)
.then((response) => {
const index = this.list.indexOf(row);
this.$notify({
title: "成功",
message: "生成成功",
type: "success",
duration: 2000,
});
this.getList();
this.listLoading = false;
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
});
this.listLoading = false;
});
}
},
/** 刷新列表 */
handleHandle(data) {
@ -379,49 +417,29 @@ export default {
},
/** 格式化字段 */
fieldFormatter(row, column) {
if (column.property === "customerCode") {
if (row[column.property] === "R0001") {
var vname = "二配";
return vname;
} else if (row[column.property] === "R0003") {
var vname = "结算";
return vname;
} else {
return row[column.property];
}
if (column.property == "state") {
return {
0: "未处理",
1: "申请出库",
2: "确认出库",
3: "不能出库",
4: "取消出库",
}[row[column.property]];
}
return row[column.property] || "--";
},
importExcelData() {
this.getVersionInfo();
this.listLoading = false;
//
this.showExcelImport = false;
this.getList();
},
//
async handleDownload() {
//await this.getDownBoms();
this.listLoading = true;
if (this.versionValue === "") {
this.$message.error("必需选择版本!");
this.listLoading = false;
return;
}
if (this.valueSelect === "") {
this.$message.error("必需选择适用功能!");
this.listLoading = false;
return;
}
if (this.valueSelect != "") {
this.listQuery.customerCode = this.valueSelect;
}
if (this.versionValue != "") {
this.listQuery.version = this.versionValue;
}
console.log("总成与结算件的导出条件:" + JSON.stringify(this.listQuery));
this.$axios
.posts(
"/api/settleaccount/MaterialRelationshipDetail/Export",
this.listQuery
.gets(
"/api/settleaccount/bt-kb-not-consign/export/" +
this.customerInfo.parentId
)
.then((res) => {
let fileNameOfProject = res;
@ -457,25 +475,23 @@ export default {
});
});
},
getList() {
getList(data) {
this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 10;
if (this.versionValue != "") {
this.listQuery.version = this.versionValue;
}
if (this.valueSelect != "") {
this.listQuery.customerCode = this.valueSelect;
if (data != undefined) {
this.listQuery.SkipCount = (this.page - 1) * data.limit;
} else {
this.listQuery.customerCode = "";
this.listQuery.SkipCount = (this.page - 1) * 15;
}
console.log("列表查询条件:" + JSON.stringify(this.listQuery));
this.listQuery.billNum = this.customerInfo.parentId;
console.log("查询条件:" + JSON.stringify(this.listQuery));
this.$axios
.posts(
"/api/settleaccount/MaterialRelationshipDetail/list",
"/api/settleaccount/wmskanbanoutput/WmsKanbanDetailList",
this.listQuery
)
.then((response) => {
this.list = response.items;
//alert(JSON.stringify(response.Items))
this.totalCount = response.totalCount;
setTimeout(() => {
//
@ -486,26 +502,17 @@ export default {
this.listLoading = false;
});
},
fetchData(id) {
//
this.$axios
.gets("/api/settleaccount/MaterialRelationshipDetail/" + id)
.then((response) => {
this.form = response;
});
},
/** 筛选操作 */
handleFilter() {
this.page = 1;
this.getList();
this.listQuery.Filters = [];
if (this.searchContent != "") {
var column = "erpMaterialCode";
var column = "materialCode";
let filter = {
logic: 0,
column: column,
action: 0,
action: 6,
value: this.searchContent,
};
this.listQuery.Filters.push(filter);
@ -555,6 +562,7 @@ export default {
}
},
resetQuery() {},
sortChange(data) {
const { prop, order } = data;
if (!prop || !order) {
@ -562,7 +570,6 @@ export default {
return;
}
this.listQuery.Sorting = prop + " " + order;
console.log(this.listQuery.Sorting);
this.handleFilter();
},
handleSelectionChange(val) {
@ -570,16 +577,24 @@ export default {
},
/** 通过回调控制style */
cellStyle({ row, column, rowIndex, columnIndex }) {
if (column.property === "qty") {
return { textAlign: "left" };
if (
column.property === "fisQty" ||
column.property === "diffQty" ||
column.property === "stockQty"
) {
return { textAlign: "right" };
} else {
return { textAlign: "left" };
}
},
/** 通过回调控制表头style */
headerRowStyle({ row, column, rowIndex, columnIndex }) {
if (column.property === "qty") {
return { textAlign: "left", background: "#FAFAFA" };
if (
column.property === "fisQty" ||
column.property === "diffQty" ||
column.property === "stockQty"
) {
return { textAlign: "right", background: "#FAFAFA" };
} else {
return { textAlign: "left", background: "#FAFAFA" };
}
@ -596,10 +611,4 @@ export default {
<style lang="scss" scoped>
@import "../../styles/crmtable.scss";
</style>
<style lang="scss">
.el-table .cell.el-tooltip {
white-space: pre-wrap;
}
</style>

340
vue/src/views/ux/billManage/kanbanWithOutOrder/index.vue

@ -0,0 +1,340 @@
<!--大众无条码看板-出库单-->
<template>
<div class="cr-body-content">
<flexbox class="content-header">
<el-input
v-model="searchContent"
clearable
size="small"
placeholder="按照版本号搜索..."
style="width: 200px"
class="search-container"
@keyup.enter.native="handleFilter"
/>
<el-button
size="mini"
type="success"
icon="el-icon-search"
@click="handleFilter"
>搜索
</el-button>
<el-button
class="filter-item"
size="mini"
type="warning"
icon="el-icon-upload2"
@click="handleImportExcel()"
>导入文件Excel
</el-button>
</flexbox>
<!--表格渲染-->
<el-table
ref="multipleTable"
v-loading="listLoading"
element-loading-text="拼命加载中..."
element-loading-spinner="el-icon-loading"
class="cr-table"
:data="list"
:height="tableHeight"
:cell-style="cellStyle"
size="small"
stripe
border
highlight-current-row
style="width: 100%"
@sort-change="sortChange"
@selection-change="handleSelectionChange"
@row-click="handleRowClick"
>
<el-table-column
label="单据号"
prop="billNum"
sortable="custom"
align="center"
width="250px"
>
<template slot-scope="scope">
<el-tooltip :content="scope.row.billNum" placement="bottom-end">
<span class="link-type" @click="handleDrawerOpen(scope.row)">{{
scope.row.billNum
}}</span>
</el-tooltip>
</template>
</el-table-column>
<!-- <el-table-column type="selection" width="44px"></el-table-column> -->
<el-table-column
v-for="(item, index) in getDefaultField"
:key="index"
:prop="item.prop"
:label="item.label"
:min-width="item.width"
:formatter="fieldFormatter"
sortable="custom"
show-overflow-tooltip
:gutter="0"
>
<template slot="header" slot-scope="scope">
{{ scope.column.label }}
</template>
</el-table-column>
</el-table>
<div class="table-footer">
<!-- 分页控件 style="margin-top: -25px;margin-bottom:-25px;float:right;"-->
<pagination
v-show="totalCount > 0"
:total="totalCount"
:page.sync="page"
:limit.sync="listQuery.MaxResultCount"
@pagination="getList"
/>
<!-- 导入Excel组件 -->
<importExcel
ref="importexcel"
:show="showExcelImport"
:crmType="crmType"
@close="importExcelData"
/>
<!-- 抽屉控件 -->
<el-drawer
title="信息详细页"
size="75%"
direction="rtl"
:visible.sync="drawer"
:before-close="handleDrawerClose"
>
<div>
<Detail
v-bind:customerInfos="customerInfos"
style="margin-top: -35px"
></Detail>
</div>
</el-drawer>
</div>
</div>
</template>
<script>
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import permission from "@/directive/permission/index.js";
import Detail from "./detail";
import moment from "moment";
import importExcel from "@/components/ImportExcel-base";
import { formatTimeToTimestamp } from "@/utils/index";
export default {
name: "sendUnsettledDiffReport",
components: { Pagination, Detail,importExcel },
directives: { permission },
data() {
return {
crmType: "kanbanoutorder",
rules: {
// version: [{ required: true, message: "", trigger: "change" }],
// beginTime: [{ required: true, message: "", trigger: "change" }],
// endTime: [{ required: true, message: "", trigger: "change" }],
},
customerInfos: [],
searchContent: "", //
drawer: false,
form: {
version: "",
customerCode: "",
customerName: "",
beginTime: "",
endTime: "",
},
versionValue: "",
versionList: [],
startTimeVale: "",
endTimeVale: "",
list: null,
totalCount: 0,
listLoading: true,
formLoading: false,
//
filterObj: {
type: Object,
default: () => {
return {};
},
},
listQuery: {
Filters: [
{
logic: 0,
column: "Enabled",
action: 0,
value: "true",
}, //
],
//OrgID:"",
SkipCount: 0,
MaxResultCount: 15,
},
page: 1,
dialogFormVisible: false,
multipleSelection: [],
formTitle: "",
drawer: false,
showExcelImport: false,
tableHeight: document.documentElement.clientHeight - 200,
isEdit: false,
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 200;
};
},
created() {
this.getList();
//this.getVersionInfo();
},
computed: {
/** 列表字段 */
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({
label: "版本",
prop: "version",
width: 120,
});
//tempsTabs.push({ label: "", prop: "billNum", width: 150 });
tempsTabs.push({ label: "创建人", prop: "creator", width: 160 });
tempsTabs.push({ label: "创建时间", prop: "creationTime", width: 160 });
tempsTabs.push({ label: "备注", prop: "remark", width: 120 });
return tempsTabs;
},
},
methods: {
handleImportExcel() {
//
this.showExcelImport = true;
this.$refs.importexcel.handleImportExcelClick();
},
getVersionInfo() {
//
this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 1000;
this.$axios
.posts("/api/settleaccount/CentralizedControl/openlist")
.then((response) => {
this.versionList = [];
response.forEach((element) => {
let options = {};
options.value = element.version;
options.label = element.version;
this.versionList.push(options);
});
})
.catch(() => {
this.listLoading = false;
});
},
//
handleDrawerOpen(param) {
this.drawer = true;
var parentId = param.billNum; //
var version = param.version; //
this.customerInfos = [
{
ParentId: parentId,
Version: version,
},
];
},
handleDrawerClose(done) {
done();
},
/** 格式化字段 */
fieldFormatter(row, column) {
if (column.property == "creationTime") {
var date = row[column.property];
if (date == undefined) {
return "";
}
return moment(date).format("YYYY-MM-DD HH:mm:ss");
}
if (column.property == "state") {
return { 0: "已提交", 1: "已出库", 2: "不能出库" }[
row[column.property]
];
}
return row[column.property] || "--";
},
importExcelData() {
//
this.showExcelImport = false;
this.getList();
},
getList(data) {
this.listLoading = true;
if (data != undefined) {
this.listQuery.SkipCount = (this.page - 1) * data.limit;
} else {
this.listQuery.SkipCount = (this.page - 1) * 15;
}
this.$axios
.posts("/api/settleaccount/wmskanbanoutput/WmsKanbanList", this.listQuery)
.then((response) => {
this.list = response.items;
//alert(JSON.stringify(response.Items))
this.totalCount = response.totalCount;
setTimeout(() => {
//
this.listLoading = false;
}, 500);
})
.catch(() => {
this.listLoading = false;
});
},
/** 筛选操作 */
handleFilter() {
this.page = 1;
this.getList();
this.listQuery.Filters = [];
if (this.searchContent != "") {
var column = "version";
let filter = {
logic: 0,
column: column,
action: 0,
value: this.searchContent,
};
this.listQuery.Filters.push(filter);
}
this.getList();
},
resetQuery() {},
sortChange(data) {
const { prop, order } = data;
if (!prop || !order) {
this.handleFilter();
return;
}
this.listQuery.Sorting = prop + " " + order;
this.handleFilter();
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
/** 通过回调控制style */
cellStyle({ row, column, rowIndex, columnIndex }) {
return { textAlign: "left" };
},
handleRowClick(row, column, event) {
this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row);
},
},
};
</script>
<style lang="scss" scoped>
@import "../../styles/crmtable.scss";
</style>

331
vue/src/views/ux/billManage/sparePart/index.vue

@ -44,6 +44,14 @@
@click="handleCreateBills()"
>生成出库单(支持批量)</el-button
>
<el-button
class="filter-item"
size="mini"
type="primary"
icon="el-icon-plus"
@click="handleCreateNoBill"
>备件未结明细统计
</el-button>
</flexbox>
</div>
<!-- 刷新 -->
@ -396,50 +404,32 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-row>
<el-col :md="4" :xs="24">
<el-form-item label="物料组(车型)" />
<el-form-item label="采购订单号" />
</el-col>
<el-col :md="20" :xs="24" style="margin-left: -80px">
<el-form-item prop="materialGroupValue">
<el-select
v-model="formCount.materialGroupValue"
size="medium"
multiple
filterable
clearable
style="width: 380px; margin-right: 15px"
@change="valueChange"
placeholder="请选择"
>
<el-option
v-for="item in materialGroupList"
:key="item.value"
:label="item.value"
:value="item.value"
>
<span style="float: left">{{ item.label }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{
item.value
}}</span>
</el-option>
</el-select>
<el-form-item prop="purchaseOrderNo">
<el-input
type="textarea"
v-model="formCount.purchaseOrderNo"
style="width: 450px"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :md="4" :xs="24">
<el-form-item label="CP5时间:" />
<el-form-item label="订单日期:" />
</el-col>
<el-col :md="10" :xs="24" style="margin-left: -80px">
<el-form-item>
<el-date-picker
v-model="cp5startTime"
:picker-options="pickerOptions2"
v-model="startTime"
type="datetime"
size="small"
@change="getdateValueCp5"
:picker-options="pickerOptions0"
@change="getdateValue"
value-format="yyyy-MM-dd HH:mm:ss"
default-time="00:00:00"
>
@ -449,11 +439,11 @@
<el-col :md="10" :xs="24" style="margin-left: -40px">
<el-form-item>
<el-date-picker
v-model="cp5endTime"
:picker-options="pickerOptions3"
v-model="endTime"
type="datetime"
:picker-options="pickerOptions1"
size="small"
@change="getdateValCp5"
@change="getdateVal"
value-format="yyyy-MM-dd HH:mm:ss"
default-time="23:59:59"
>
@ -461,17 +451,86 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :md="4" :xs="24">
<el-form-item label="厂内零件号" />
</el-col>
<el-col :md="20" :xs="24" style="margin-left: -80px">
<el-form-item prop="sapCode">
<el-input
v-model="formCount.sapCode"
style="width: 450px"
type="textarea"
:rows="4"
placeholder="多个厂内零件号,请以回车换行形式添加!"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<!-- <el-button type="text" @click="dialogFormVisible = false"
>取消</el-button
> -->
<el-button @click="resetForm('formCount')">重置</el-button>
<el-button v-loading="formLoading" type="primary" @click="save"
>确认</el-button
>
</div>
</el-dialog>
<!--统计-备件无条码报表-->
<el-dialog
:visible.sync="dialogFormNoBillVisible"
:close-on-click-modal="false"
:title="formTitle"
append-to-body
width="680px"
>
<el-form
ref="formNoBill"
:inline="true"
:rules="rulesNoBill"
:model="formNoBill"
size="mini"
>
<el-row>
<el-col :md="4" :xs="24">
<el-form-item label="选择版本" required />
</el-col>
<el-col :md="20" :xs="24" style="margin-left: -80px">
<el-form-item prop="versionValue">
<el-select
v-model="formNoBill.versionValue"
size="medium"
clearable
style="width: 188px; margin-right: 15px"
placeholder="请选择"
>
<el-option
v-for="item in versionList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :md="4" :xs="24">
<el-form-item label="CP7时间:" />
<el-form-item label="查询日期:" />
</el-col>
<el-col :md="10" :xs="24" style="margin-left: -80px">
<el-form-item>
<el-date-picker
v-model="startTime"
v-model="startTimeNoBill"
type="datetime"
size="small"
:picker-options="pickerOptions0"
:picker-options="pickerOptions4"
@change="getdateValue"
value-format="yyyy-MM-dd HH:mm:ss"
default-time="00:00:00"
@ -482,9 +541,9 @@
<el-col :md="10" :xs="24" style="margin-left: -40px">
<el-form-item>
<el-date-picker
v-model="endTime"
v-model="endTimeNoBill"
type="datetime"
:picker-options="pickerOptions1"
:picker-options="pickerOptions5"
size="small"
@change="getdateVal"
value-format="yyyy-MM-dd HH:mm:ss"
@ -496,37 +555,7 @@
</el-row>
<el-row>
<el-col :md="4" :xs="24">
<el-form-item label="KEEN号" />
</el-col>
<el-col :md="10" :xs="24" style="margin-left: -80px">
<el-form-item prop="kennCode">
<el-input
type="textarea"
v-model="formCount.kennCode"
style="width: 170px"
:rows="4"
placeholder="多个KENN号,请以回车换行形式添加!"
/>
</el-form-item>
</el-col>
<el-col :md="4" :xs="24">
<el-form-item label="底盘号" />
</el-col>
<el-col :md="10" :xs="24" style="margin-left: -95px">
<el-form-item prop="chassisNumber">
<el-input
v-model="formCount.chassisNumber"
style="width: 170px"
type="textarea"
:rows="4"
placeholder="多个底盘号,请以回车换行形式添加!"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :md="4" :xs="24">
<!-- <el-col :md="4" :xs="24">
<el-form-item label="客户零件号" />
</el-col>
<el-col :md="10" :xs="24" style="margin-left: -80px">
@ -539,15 +568,15 @@
placeholder="多个客户零件号,请以回车换行形式添加!"
/>
</el-form-item>
</el-col>
</el-col> -->
<el-col :md="4" :xs="24">
<el-form-item label="厂内零件号" />
</el-col>
<el-col :md="10" :xs="24" style="margin-left: -95px">
<el-col :md="10" :xs="24" style="margin-left: -80px">
<el-form-item prop="sapCode">
<el-input
v-model="formCount.sapCode"
style="width: 170px"
v-model="formNoBill.sapCode"
style="width: 450px"
type="textarea"
:rows="4"
placeholder="多个厂内零件号,请以回车换行形式添加!"
@ -557,11 +586,8 @@
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<!-- <el-button type="text" @click="dialogFormVisible = false"
>取消</el-button
> -->
<el-button @click="resetForm('formCount')">重置</el-button>
<el-button v-loading="formLoading" type="primary" @click="save"
<el-button @click="resetNoBillForm('formNoBill')">重置</el-button>
<el-button v-loading="formNoBillLoading" type="primary" @click="saveNoBill"
>确认</el-button
>
</div>
@ -590,6 +616,11 @@ export default {
{ required: true, message: "必须输入!", trigger: "change" },
],
},
rulesNoBill: {
versionValue: [
{ required: true, message: "必须输入!", trigger: "change" },
],
},
pickerOptionsCp5: {
disabledDate: (time) => {
let now = new Date();
@ -617,12 +648,6 @@ export default {
return time.getTime() <= new Date(this.startTime).getTime();
},
},
pickerOptions1: {
disabledDate: (time) => {
//return time.getTime() <= new Date(this.startTime).getTime() || time.getTime() > Date.now();
return time.getTime() <= new Date(this.startTime).getTime();
},
},
pickerOptions2: {
disabledDate: (time) => {
@ -636,8 +661,23 @@ export default {
return time.getTime() <= new Date(this.cp5startTime).getTime();
},
},
pickerOptions4: {
disabledDate: (time) => {
//if (this.endTime != "") {
return time.getTime() > new Date(this.endTimeNoBill).getTime();
//}
},
},
pickerOptions5: {
disabledDate: (time) => {
return time.getTime() <= new Date(this.startTimeNoBill).getTime();
},
},
startTime: "",
endTime: "",
startTimeNoBill: "",
endTimeNoBill: "",
pickerOptionsCp7: {
disabledDate: (time) => {
let now = new Date();
@ -689,6 +729,7 @@ export default {
customerInfos: "",
searchContent: "", //
form: {},
formNoBill: {},
formCount: {
startTime: "",
endTime: "",
@ -708,6 +749,7 @@ export default {
totalCount: 0,
listLoading: true,
formLoading: false,
formNoBillLoading: false,
//
filterObj: {
type: Object,
@ -717,14 +759,14 @@ export default {
},
listExportQuery: {
version: "",
materialCode: undefined,
cp7begin: undefined,
cp7end: undefined,
kenncode: undefined,
chassisNumber: undefined,
materialGroup: undefined,
purchaseOrderNo: undefined,
begin: undefined,
end: undefined,
sapCode: undefined,
},
listNoBillExportQuery: {
version: "",
sapCode: undefined,
},
listQuery: {
taskId: "",
@ -736,6 +778,7 @@ export default {
},
page: 1,
dialogFormVisible: false,
dialogFormNoBillVisible: false,
multipleSelection: [],
tableHeight: document.documentElement.clientHeight - 260,
isEdit: false,
@ -826,11 +869,10 @@ export default {
//cp5
getdateValueCp5(val) {
this.cp5startTime = val;
this.getbalanceIndexData();
//this.getbalanceIndexData();
},
getdateValCp5(val) {
this.cp5endTime = val;
this.getbalanceIndexData();
},
handleSelectionChange(val) {
this.multipleSelection = val;
@ -1060,14 +1102,6 @@ export default {
});
}
},
valueChange(data) {
this.getmaterialGroupValue = "";
this.getmaterialGroupValue += data + ",";
this.getmaterialGroupValue = this.getmaterialGroupValue.substring(
0,
this.getmaterialGroupValue.length - 1
);
},
//
JobVersionValue(params) {
//
@ -1101,11 +1135,9 @@ export default {
},
getdateValue(val) {
this.startTime = val;
this.getbalanceIndexData();
},
getdateVal(val) {
this.endTime = val;
this.getbalanceIndexData();
},
getCurrentMonthFirst() {
@ -1175,38 +1207,29 @@ export default {
this.cp5startTime = "";
this.cp5endTime = "";
},
resetNoBillForm(formName) {
this.formNoBill = {};
this.startTimeNoBill = "";
this.endTimeNoBill = "";
},
save() {
this.$refs.formCount.validate((valid) => {
if (valid) {
this.formLoading = true;
this.listExportQuery.version = this.formCount.versionValue; //
if (this.formCount.materialCode != "") {
this.listExportQuery.materialCode = this.formCount.materialCode; //
if (this.formCount.purchaseOrderNo != "") {
this.listExportQuery.purchaseOrderNo = this.formCount.purchaseOrderNo; //
}
if (this.formCount.sapCode != "") {
this.listExportQuery.sapCode = this.formCount.sapCode; //
}
if (this.formCount.kennCode != "") {
this.listExportQuery.kenncode = this.formCount.kennCode; //KEEN
}
this.listExportQuery.begin = this.cp5startTime
? this.cp5startTime
//
this.listExportQuery.begin = this.startTime
? this.startTime
: undefined;
this.listExportQuery.end = this.cp5endTime
? this.cp5endTime
this.listExportQuery.end = this.endTime
? this.endTime
: undefined;
if (this.startTime != "") {
this.listExportQuery.cp7begin = this.startTime; //CP7
}
if (this.endTime != "") {
this.listExportQuery.cp7end = this.endTime; //CP5
}
if (this.formCount.chassisNumber != "") {
this.listExportQuery.chassisNumber = this.formCount.chassisNumber; //
}
if (this.formCount.materialGroupValue != "") {
this.listExportQuery.materialGroup = this.getmaterialGroupValue; //
}
console.log(
"大众备件结算核对-导出条件:" + JSON.stringify(this.listExportQuery)
);
@ -1236,6 +1259,54 @@ export default {
}
});
},
//
saveNoBill() {
this.$refs.formNoBill.validate((valid) => {
if (valid) {
this.formNoBillLoading = true;
this.listNoBillExportQuery.version = this.formNoBill.versionValue; //
// if (this.formCount.materialCode != "") {
// this.listExportQuery.materialCode = this.formCount.materialCode; //
// }
if (this.formNoBill.sapCode != "") {
this.listNoBillExportQuery.sapCode = this.formNoBill.sapCode; //
}
this.listNoBillExportQuery.begin = this.startTimeNoBill
? this.startTimeNoBill
: undefined;
this.listNoBillExportQuery.end = this.endTimeNoBill
? this.endTimeNoBill
: undefined;
console.log(
"大众备件未结明细-导出条件:" + JSON.stringify(this.listNoBillExportQuery)
);
this.$axios
.gets(
"/api/settleaccount/ReportMakeService/SharePartUnSettledExport",
this.listExportQuery
)
.then((res) => {
let taskid = res;
if (Number.isInteger(taskid)) {
this.$notify({
title: "成功",
message: "任务生成成功!任务号:" + taskid,
type: "success",
duration: 2000,
});
}
this.getList();
this.formNoBillLoading = false;
this.dialogFormNoBillVisible = false;
})
.catch(() => {
this.formNoBillLoading = false;
this.dialogFormNoBillVisible = false;
});
}
});
},
handleCreate() {
// this.$nextTick(() => {
// this.$refs["formCount"].resetFields();
@ -1245,7 +1316,7 @@ export default {
}
this.formTitle = "报表统计";
this.isEdit = false;
this.form = {};
this.formCount = {};
this.datetime5 = [];
this.startTime = "";
this.endTime = "";
@ -1253,6 +1324,18 @@ export default {
this.cp5endTime = "";
this.dialogFormVisible = true;
},
//
handleCreateNoBill() {
if (this.$refs["formNoBill"] !== undefined) {
this.$refs["formNoBill"].resetFields();
}
this.formTitle = "无条码备件明细报表统计";
this.isEdit = false;
this.formNoBill = {};
this.startTimeNoBill = "";
this.endTimeNoBill = "";
this.dialogFormNoBillVisible = true;
},
filterHandler(value, row, column) {
const property = column["property"];
return row[property] === value;

Loading…
Cancel
Save