|
@@ -7,20 +7,19 @@
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<div class="add-customer-btn">
|
|
|
- <el-button class="el-button--small-yh" style="margin-left: 6px;"
|
|
|
- type="primary" size="small" v-if="editButton" @click="confirmEditing">编 辑
|
|
|
+ <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small"
|
|
|
+ v-if="editButton" @click="confirmEditing">编 辑
|
|
|
</el-button>
|
|
|
<el-button class="el-button--small-yh" v-else style="margin-left: 6px;" type="primary" size="small"
|
|
|
- @click="editCustomer">保 存
|
|
|
+ @click="editCustomer">保 存
|
|
|
</el-button>
|
|
|
- <el-button type="primary" icon="el-icon-printer" size="small" :disabled="!(form.orderItemsList.length != 0 && form.id)"
|
|
|
- @click="handlePrint">打印</el-button>
|
|
|
+ <el-button type="primary" icon="el-icon-printer" size="small"
|
|
|
+ :disabled="!(form.orderItemsList.length != 0 && form.id)" @click="handlePrint">打印</el-button>
|
|
|
<!--<el-button type="success" size="small" icon="el-icon-bottom"-->
|
|
|
<!-- :disabled="form.status == '已确认'" @click="excelBox = true">导入盘点结果-->
|
|
|
<!--</el-button>-->
|
|
|
- <el-button class="el-button--small-yh" style="margin-left: 6px;" type="success" size="small"
|
|
|
- v-if="form.id"
|
|
|
- :disabled="form.status == '已确认'" @click="generateOutbound">
|
|
|
+ <el-button class="el-button--small-yh" style="margin-left: 6px;" type="success" size="small" v-if="form.id"
|
|
|
+ :disabled="form.status == '已确认'" @click="generateOutbound">
|
|
|
提交盘点结果
|
|
|
</el-button>
|
|
|
</div>
|
|
@@ -28,27 +27,30 @@
|
|
|
<div style="margin-top: 50px">
|
|
|
<trade-card title="基础信息">
|
|
|
<avue-form :option="optionForm" v-model="form" ref="form">
|
|
|
-
|
|
|
</avue-form>
|
|
|
</trade-card>
|
|
|
|
|
|
<trade-card title="明细信息">
|
|
|
- <avue-crud :option="optionContacts" v-model="formContacts" ref="formContacts"
|
|
|
- :data="form.orderItemsList" :key="key" @row-save="rowSave" @row-update="rowUpdate"
|
|
|
- @row-close="rowClose" :before-close="beforeClose"
|
|
|
- @resetColumn="resetColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 269.4)"
|
|
|
- @saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 269.4)">
|
|
|
+ <avue-crud :option="optionContacts" v-model="formContacts" ref="formContacts" :data="form.orderItemsList"
|
|
|
+ :key="key" @row-save="rowSave" @row-update="rowUpdate" @row-close="rowClose" :before-close="beforeClose"
|
|
|
+ @resetColumn="resetColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 269.4)"
|
|
|
+ @saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 269.4)">
|
|
|
<template slot-scope="{scope,row}" slot="menuLeft">
|
|
|
<el-button type="primary" icon="el-icon-plus" size="small" :disabled="form.status == '已确认'"
|
|
|
- @click="rowAdd(row)">添加库存</el-button>
|
|
|
+ @click="rowAdd(row)">添加库存</el-button>
|
|
|
+ <el-button type="success" icon="el-icon-download" size="small" @click="outExport">导出</el-button>
|
|
|
+ <el-button type="warning" icon="el-icon-upload" size="small" @click="excelBox = true">导入</el-button>
|
|
|
</template>
|
|
|
-
|
|
|
<template slot="sendNum" slot-scope="{ row }">
|
|
|
- <el-input v-if="!mingxibaocun" size="small" v-model="row.sendNum" style="width: 100%" @blur="sendNumBlur(row)"></el-input>
|
|
|
- <span v-else :style="{color: Number(row.inventory) < Number(row.sendNum)?'#4c9e44':'#dd4b3a' }" >{{ row.sendNum }}</span>
|
|
|
+ <el-input v-if="!mingxibaocun" size="small" v-model="row.sendNum" style="width: 100%"
|
|
|
+ @blur="sendNumBlur(row)"></el-input>
|
|
|
+ <span v-else
|
|
|
+ :style="{ color: (Number(row.inventory) < Number(row.sendNum)) ? '#4c9e44' : '#dd4b3a' }">{{
|
|
|
+ row.sendNum }}</span>
|
|
|
</template>
|
|
|
<template slot="profitLossNum" slot-scope="{ row }">
|
|
|
- <span :style="{color: Number(row.inventory) < Number(row.sendNum)?'#4c9e44':'#dd4b3a' }" >{{ row.profitLossNum }}</span>
|
|
|
+ <span :style="{ color: (Number(row.inventory) < Number(row.sendNum)) ? '#4c9e44' : '#dd4b3a' }">{{
|
|
|
+ row.profitLossNum }}</span>
|
|
|
</template>
|
|
|
<template slot="remarks" slot-scope="{ row }">
|
|
|
<el-input v-if="!mingxibaocun" size="small" v-model="row.remarks" style="width: 100%"></el-input>
|
|
@@ -57,63 +59,66 @@
|
|
|
|
|
|
<template slot-scope="{type,size,row,index,disabled}" slot="menu">
|
|
|
<el-button v-if="mingxibaocun" :size="size" :type="type" :disabled="form.status == '已确认'"
|
|
|
- :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="hangeditBtn(row, index)">编辑
|
|
|
+ :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="hangeditBtn(row, index)">编辑
|
|
|
</el-button>
|
|
|
<el-button v-else :size="size" :type="type" :disabled="form.status == '已确认'"
|
|
|
- :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="hangbaocun(row, index)">保存
|
|
|
+ :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="hangbaocun(row, index)">保存
|
|
|
</el-button>
|
|
|
- <el-button icon="el-icon-delete" :size="size" :disabled="form.status == '已确认'"
|
|
|
- :type="type" @click="rowDelBox(row, index, 'orderItemsList')">删除
|
|
|
+ <el-button icon="el-icon-delete" :size="size" :disabled="form.status == '已确认'" :type="type"
|
|
|
+ @click="rowDelBox(row, index, 'orderItemsList')">删除
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</trade-card>
|
|
|
|
|
|
<el-dialog title="导入明细" append-to-body :visible.sync="excelBox" v-if="excelBox" width="555px"
|
|
|
- :close-on-click-modal="false" v-dialog-drag>
|
|
|
- <avue-form :option="excelOption" table-loading="excelLoading" :upload-before="uploadBefore"
|
|
|
- :upload-after="uploadAfter">
|
|
|
- </avue-form>
|
|
|
- <p style="text-align: center;color: #DC0505">
|
|
|
- 温馨提示 第一次导入时请先下载模板
|
|
|
- </p>
|
|
|
- </el-dialog>
|
|
|
+ :close-on-click-modal="false" v-dialog-drag>
|
|
|
+ <avue-form :option="excelOption" table-loading="excelLoading" :upload-before="uploadBefore"
|
|
|
+ :upload-after="uploadAfter">
|
|
|
+ </avue-form>
|
|
|
+ <p style="text-align: center;color: #DC0505">
|
|
|
+ 温馨提示 第一次导入时请先下载模板
|
|
|
+ </p>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
|
|
|
<el-dialog title="选择库存" append-to-body class="el-dialogDeep" :visible.sync="dialogVisible" width="80%"
|
|
|
- :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" :before-close="handleClose" >
|
|
|
+ :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false"
|
|
|
+ :before-close="handleClose">
|
|
|
<el-row :style="{ height: rowHeight }">
|
|
|
<el-col :span="4">
|
|
|
- <avue-tree ref="treeRef" :option="treeOption" :data="treeData" @node-click="nodeClick" style="height:73vh;">
|
|
|
+ <avue-tree ref="treeRef" :option="treeOption" :data="treeData" @node-click="nodeClick"
|
|
|
+ style="height:73vh;">
|
|
|
</avue-tree>
|
|
|
</el-col>
|
|
|
<el-col :span="20">
|
|
|
<avue-crud :option="inventoryOption" :search.sync="inventorySearch" v-model="inventoryForm"
|
|
|
- :table-loading="loading" :data="inventoryDataList" :page.sync="inventoryPage"
|
|
|
- ref="inventoryCrud" :key="key" @search-change="searchChange" @refresh-change="refreshChange"
|
|
|
- :cell-style="cellStyle" @search-criteria-switch="searchCriteriaSwitch" @selection-change="selectionChange"
|
|
|
- @current-change="currentCurrent" @size-change="sizeChange"
|
|
|
- @resetColumn="resetColumnTwo('inventoryCrud', 'inventoryOption', 'inventoryOptionList', 268)"
|
|
|
- @saveColumn="saveColumnTwo('inventoryCrud', 'inventoryOption', 'inventoryOptionList', 268)">
|
|
|
+ :table-loading="loading" :data="inventoryDataList" :page.sync="inventoryPage" ref="inventoryCrud"
|
|
|
+ :key="key" @search-change="searchChange" @refresh-change="refreshChange" :cell-style="cellStyle"
|
|
|
+ @search-criteria-switch="searchCriteriaSwitch" @selection-change="selectionChange"
|
|
|
+ @current-change="currentCurrent" @size-change="sizeChange"
|
|
|
+ @resetColumn="resetColumnTwo('inventoryCrud', 'inventoryOption', 'inventoryOptionList', 268)"
|
|
|
+ @saveColumn="saveColumnTwo('inventoryCrud', 'inventoryOption', 'inventoryOptionList', 268)">
|
|
|
</avue-crud>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="dialogVisible = false;inventorySearch={}" :loading="saveLoading">取 消</el-button>
|
|
|
- <el-button type="primary" @click="importGoods" v-if="commodityData !== true" :loading="saveLoading">导入</el-button>
|
|
|
- </span>
|
|
|
+ <el-button @click="dialogVisible = false; inventorySearch = {}" :loading="saveLoading">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="importGoods" v-if="commodityData !== true"
|
|
|
+ :loading="saveLoading">导入</el-button>
|
|
|
+ </span>
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
<report-dialog :switchDialog="switchDialog" reportName="轮胎商城--盘库单" :reportId="form.id"
|
|
|
- @onClose="onClose()"></report-dialog>
|
|
|
+ @onClose="onClose()"></report-dialog>
|
|
|
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { getDetails as getCustom } from "@/api/tirePartsMall/basicData/customerInformation"
|
|
|
-import {getDetails as getDetailsLT} from "@/api/tirePartsMall/basicData/commodityInformation/index"
|
|
|
+import { getDetails as getDetailsLT } from "@/api/tirePartsMall/basicData/commodityInformation/index"
|
|
|
import { dateFormat } from "@/util/date";
|
|
|
import { getToken } from "@/util/auth";
|
|
|
import {
|
|
@@ -135,19 +140,19 @@ import { dotList, goodsDetail } from "@/api/tirePartsMall/purchasingManagement/w
|
|
|
import reportDialog from "@/components/report-dialog/main";
|
|
|
import checkSchedule from "@/components/checkL/checkSchedule";
|
|
|
import check from "@/components/checkL/check";
|
|
|
-import {getCorpType} from "@/api/tirePartsMall/basicData/commodityInformation"
|
|
|
+import { getCorpType } from "@/api/tirePartsMall/basicData/commodityInformation"
|
|
|
import { getList as inventoryGetList } from "@/api/tirePartsMall/inventory";
|
|
|
import TicketDistribution from "../../../oceanShipping/maritimeExport/components/ticketDistribution.vue";
|
|
|
import M from "minimatch";
|
|
|
import da from "element-ui/src/locale/lang/da";
|
|
|
import { number } from "echarts";
|
|
|
-import {getDeptLazyTreeTwo} from "@/api/basicData/basicFeesDesc";
|
|
|
+import { getDeptLazyTreeTwo } from "@/api/basicData/basicFeesDesc";
|
|
|
import commodity from "../../configuration/commodity.json";
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
|
data() {
|
|
|
return {
|
|
|
- switchDialog:false, //打印
|
|
|
+ switchDialog: false, //打印
|
|
|
// 添加商品弹窗左侧配置
|
|
|
treeOption: {
|
|
|
addBtn: false,
|
|
@@ -160,15 +165,15 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
treeData: [], // 添加商品弹窗左侧数据
|
|
|
- inventorySearch: {whether:'0'}, // 弹窗表格检索条件
|
|
|
+ inventorySearch: { whether: '0' }, // 弹窗表格检索条件
|
|
|
inventoryForm: {}, // 弹窗条件
|
|
|
inventoryPage: {
|
|
|
pageSize: 20,
|
|
|
currentPage: 1,
|
|
|
total: 0,
|
|
|
- pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500,1000]
|
|
|
+ pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 1000]
|
|
|
},
|
|
|
- inventoryDataList:[], // 弹窗数据
|
|
|
+ inventoryDataList: [], // 弹窗数据
|
|
|
inventoryOption: {},
|
|
|
inventoryOptionList: {
|
|
|
viewBtn: false,
|
|
@@ -192,8 +197,8 @@ export default {
|
|
|
dialogWidth: "70%",
|
|
|
summaryText: "合计",
|
|
|
showSummary: true,
|
|
|
- selection:true,
|
|
|
- reserveSelection:true, // 保留之前选择的数据
|
|
|
+ selection: true,
|
|
|
+ reserveSelection: true, // 保留之前选择的数据
|
|
|
sumColumnList: [
|
|
|
{
|
|
|
name: 'balanceQuantity',
|
|
@@ -257,7 +262,7 @@ export default {
|
|
|
props: {
|
|
|
label: 'title',
|
|
|
value: 'value',
|
|
|
- children:'children'
|
|
|
+ children: 'children'
|
|
|
},
|
|
|
dicUrl: '/api/blade-sales-part/goodsType/tree?corpType=SP',
|
|
|
width: 100
|
|
@@ -317,7 +322,7 @@ export default {
|
|
|
hide: true,
|
|
|
width: 120,
|
|
|
searchLabelWidth: 120,
|
|
|
- searchValue:'0',
|
|
|
+ searchValue: '0',
|
|
|
dicData: [{
|
|
|
label: '是',
|
|
|
value: '1'
|
|
@@ -328,9 +333,9 @@ export default {
|
|
|
}]
|
|
|
},
|
|
|
// 编辑还是保存
|
|
|
- mingxibaocun:true,
|
|
|
+ mingxibaocun: true,
|
|
|
// 添加商品弹窗
|
|
|
- dialogVisible:false,
|
|
|
+ dialogVisible: false,
|
|
|
// 弹窗高度
|
|
|
rowHeight: '',
|
|
|
page: {
|
|
@@ -346,10 +351,10 @@ export default {
|
|
|
commodityData: false,
|
|
|
surplusRouteQuantityOption: [],
|
|
|
tableData: [],
|
|
|
- data:[],
|
|
|
+ data: [],
|
|
|
inventory: 0,
|
|
|
isStatus: 1,
|
|
|
- excelBox:false,
|
|
|
+ excelBox: false,
|
|
|
// 商品名称
|
|
|
goodsIdoptions: [],
|
|
|
dataList: [],
|
|
@@ -379,7 +384,7 @@ export default {
|
|
|
res: "data"
|
|
|
},
|
|
|
tip: "请上传 .xls,.xlsx 标准格式文件",
|
|
|
- action: "/api/blade-sales-part/ship/import-item"
|
|
|
+ action: "/api/blade-sales-part/inventory/import-item"
|
|
|
}
|
|
|
]
|
|
|
},
|
|
@@ -412,7 +417,7 @@ export default {
|
|
|
{
|
|
|
label: '业务日期',
|
|
|
prop: "businesDate",
|
|
|
- searchProp:"businesDateList",
|
|
|
+ searchProp: "businesDateList",
|
|
|
disabled: false,
|
|
|
type: "datetime",
|
|
|
value: dateFormat(new Date(), 'yyyy-MM-dd'),
|
|
@@ -500,8 +505,8 @@ export default {
|
|
|
// 保存按钮
|
|
|
editBtn: false,
|
|
|
// 航编辑开启
|
|
|
- cellBtn:true,
|
|
|
- rowKey:'ids',
|
|
|
+ cellBtn: true,
|
|
|
+ rowKey: 'ids',
|
|
|
delBtn: false,
|
|
|
menuWidth: 140,
|
|
|
dialogTop: 25,
|
|
@@ -512,7 +517,7 @@ export default {
|
|
|
name: "inventory",
|
|
|
type: "sum",
|
|
|
decimals: 0
|
|
|
- },{
|
|
|
+ }, {
|
|
|
name: "price",
|
|
|
type: "sum",
|
|
|
decimals: 2
|
|
@@ -528,7 +533,7 @@ export default {
|
|
|
name: "profitLossNum",
|
|
|
type: "sum",
|
|
|
decimals: 0
|
|
|
- },{
|
|
|
+ }, {
|
|
|
name: "profitLossAmount",
|
|
|
type: "sum",
|
|
|
decimals: 2
|
|
@@ -539,7 +544,7 @@ export default {
|
|
|
width: 200,
|
|
|
disabled: false,
|
|
|
remote: true,
|
|
|
- hide:true,
|
|
|
+ hide: true,
|
|
|
overHidden: true,
|
|
|
type: 'select',
|
|
|
// dicData: [],
|
|
@@ -550,7 +555,7 @@ export default {
|
|
|
// dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll?cname={{key}}'
|
|
|
dicUrl: "/api/blade-sales-part/goodsDesc/goodsListAll?cname={{key}}&enableOrNot=1"
|
|
|
// dicUrl: "/api/blade-sales-part/goodsDesc/goodsListXs?cname={{key}}"
|
|
|
- },{
|
|
|
+ }, {
|
|
|
label: '商品名称',
|
|
|
prop: 'goodsName',
|
|
|
width: 200,
|
|
@@ -572,8 +577,8 @@ export default {
|
|
|
}, {
|
|
|
label: '批次号',
|
|
|
prop: 'dot',
|
|
|
- cell:true,
|
|
|
- width:120,
|
|
|
+ cell: true,
|
|
|
+ width: 120,
|
|
|
type: "select",
|
|
|
disabled: true,
|
|
|
allowCreate: true,
|
|
@@ -585,7 +590,7 @@ export default {
|
|
|
},
|
|
|
dicUrl: "/api/blade-sales-part/stockDesc/dotList",
|
|
|
overHidden: true,
|
|
|
- },{
|
|
|
+ }, {
|
|
|
label: '库存单价',
|
|
|
prop: 'costprie',
|
|
|
overHidden: true,
|
|
@@ -597,13 +602,13 @@ export default {
|
|
|
overHidden: true,
|
|
|
disabled: false,
|
|
|
width: 100,
|
|
|
- },{
|
|
|
+ }, {
|
|
|
label: '账面金额',
|
|
|
prop: 'price',
|
|
|
overHidden: true,
|
|
|
width: 100,
|
|
|
disabled: false,
|
|
|
- cell:true,
|
|
|
+ cell: true,
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: " ",
|
|
@@ -619,72 +624,72 @@ export default {
|
|
|
trigger: "blur"
|
|
|
}]
|
|
|
},
|
|
|
- {
|
|
|
- label: '实际数量',
|
|
|
- prop: 'sendNum',
|
|
|
- overHidden: true,
|
|
|
- disabled: false,
|
|
|
- cell:true,
|
|
|
- width: 100,
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: " ",
|
|
|
- trigger: "blur"
|
|
|
- }, {
|
|
|
- validator: (rule, value, callback) => {
|
|
|
- console.log(this.formContacts.inventory);
|
|
|
- if (value < 0) {
|
|
|
- callback(new Error("数量不能小于0"));
|
|
|
- } else {
|
|
|
- callback();
|
|
|
- }
|
|
|
- },
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
- },
|
|
|
- {
|
|
|
- label: '实际金额',
|
|
|
- prop: 'subTotalMoney',
|
|
|
- overHidden: true,
|
|
|
- width: 100,
|
|
|
- disabled: false,
|
|
|
- cell:true,
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: " ",
|
|
|
- trigger: "blur"
|
|
|
- }, {
|
|
|
- validator: (rule, value, callback) => {
|
|
|
- if (value < 0) {
|
|
|
- callback(new Error("价格不能小于0"));
|
|
|
- } else {
|
|
|
- callback();
|
|
|
- }
|
|
|
- },
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
- },
|
|
|
- {
|
|
|
- label: '盈亏数量',
|
|
|
- prop: 'profitLossNum',
|
|
|
- overHidden: true,
|
|
|
- disabled: false,
|
|
|
- width: 100
|
|
|
- },
|
|
|
- {
|
|
|
- label: '盈亏金额',
|
|
|
- prop: 'profitLossAmount',
|
|
|
- overHidden: true,
|
|
|
- width: 100,
|
|
|
- disabled: false,
|
|
|
- },
|
|
|
- {
|
|
|
- label: '备注',
|
|
|
- prop: "remarks",
|
|
|
- overHidden: true,
|
|
|
- width: 100,
|
|
|
- disabled: false,
|
|
|
- }
|
|
|
+ {
|
|
|
+ label: '实际数量',
|
|
|
+ prop: 'sendNum',
|
|
|
+ overHidden: true,
|
|
|
+ disabled: false,
|
|
|
+ cell: true,
|
|
|
+ width: 100,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }, {
|
|
|
+ validator: (rule, value, callback) => {
|
|
|
+ console.log(this.formContacts.inventory);
|
|
|
+ if (value < 0) {
|
|
|
+ callback(new Error("数量不能小于0"));
|
|
|
+ } else {
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '实际金额',
|
|
|
+ prop: 'subTotalMoney',
|
|
|
+ overHidden: true,
|
|
|
+ width: 100,
|
|
|
+ disabled: false,
|
|
|
+ cell: true,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }, {
|
|
|
+ validator: (rule, value, callback) => {
|
|
|
+ if (value < 0) {
|
|
|
+ callback(new Error("价格不能小于0"));
|
|
|
+ } else {
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '盈亏数量',
|
|
|
+ prop: 'profitLossNum',
|
|
|
+ overHidden: true,
|
|
|
+ disabled: false,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '盈亏金额',
|
|
|
+ prop: 'profitLossAmount',
|
|
|
+ overHidden: true,
|
|
|
+ width: 100,
|
|
|
+ disabled: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注',
|
|
|
+ prop: "remarks",
|
|
|
+ overHidden: true,
|
|
|
+ width: 100,
|
|
|
+ disabled: false,
|
|
|
+ }
|
|
|
]
|
|
|
},
|
|
|
}
|
|
@@ -699,7 +704,7 @@ export default {
|
|
|
this.optionContacts = await this.getColumnData(this.getColumnName(269.4), this.optionContactsBack);
|
|
|
// 弹窗的配置
|
|
|
this.inventoryOption = await this.getColumnData(this.getColumnName(268), this.inventoryOptionList);
|
|
|
- if(this.detailData.id) {
|
|
|
+ if (this.detailData.id) {
|
|
|
this.editButton = true
|
|
|
this.refresh(this.detailData.id)
|
|
|
}
|
|
@@ -717,15 +722,40 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ outExport() {
|
|
|
+ if (!this.form.id) return this.$message.error("请保存单据");
|
|
|
+ let config = { params: { id:this.form.id } }
|
|
|
+ if (config.params) {
|
|
|
+ for (const propName of Object.keys(config.params)) {
|
|
|
+ const value = config.params[propName];
|
|
|
+ if (value !== null && typeof (value) !== "undefined") {
|
|
|
+ if (value instanceof Array) {
|
|
|
+ for (const key of Object.keys(value)) {
|
|
|
+ let params = propName + '[' + key + ']';
|
|
|
+ config.params[params] = value[key]
|
|
|
+ }
|
|
|
+ delete config.params[propName]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ const routeData = this.$router.resolve({
|
|
|
+ path: '/api/blade-sales-part/inventory/export', //跳转目标下载地址
|
|
|
+ query: {
|
|
|
+ ...config.params //括号内是要传递给新窗口的参数
|
|
|
+ }
|
|
|
+ })
|
|
|
+ window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
|
|
|
+ },
|
|
|
// 打印
|
|
|
- handlePrint(){
|
|
|
+ handlePrint() {
|
|
|
this.switchDialog = !this.switchDialog;
|
|
|
},
|
|
|
onClose(val) {
|
|
|
this.switchDialog = val;
|
|
|
},
|
|
|
- nodeClick(data){
|
|
|
- console.log(data,508)
|
|
|
+ nodeClick(data) {
|
|
|
+ console.log(data, 508)
|
|
|
},
|
|
|
// 添加商品左侧数据接口
|
|
|
getAllWorkDicts() {
|
|
@@ -737,9 +767,9 @@ export default {
|
|
|
//确认导入触发
|
|
|
async importGoods() {
|
|
|
this.surplusRouteQuantityOption.push({ storageQuantity: '0' });
|
|
|
- console.log(this.goodsListSave,'导入按钮')
|
|
|
- console.log(this.surplusRouteQuantityOption,'导入按钮2')
|
|
|
- console.log(this.tableData,'导入按钮3')
|
|
|
+ console.log(this.goodsListSave, '导入按钮')
|
|
|
+ console.log(this.surplusRouteQuantityOption, '导入按钮2')
|
|
|
+ console.log(this.tableData, '导入按钮3')
|
|
|
if (this.goodsListSave.length > 0) {
|
|
|
this.goodsListSaveHandle()
|
|
|
} else {
|
|
@@ -749,9 +779,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 导入按钮事件
|
|
|
- tableDataHandle(){
|
|
|
+ tableDataHandle() {
|
|
|
// 循环获取库存数量
|
|
|
- for(let item of this.tableData) {
|
|
|
+ for (let item of this.tableData) {
|
|
|
// brandId
|
|
|
// brandItem
|
|
|
// brandName
|
|
@@ -769,30 +799,30 @@ export default {
|
|
|
// 实际金额 = 实际数量 * 库存成本
|
|
|
// 盈亏 = 实际 - 库存
|
|
|
this.form.orderItemsList.push({
|
|
|
- brandId:item.brandId,
|
|
|
- brandItem:item.brandItem,
|
|
|
- brandName:item.brandName,
|
|
|
- goodsTypeId:item.goodsTypeId,
|
|
|
- goodsTypeName:item.goodsTypeName,
|
|
|
- goodsId:item.goodsId, // 商品名称id
|
|
|
- goodsName:item.cname, // 商品名称
|
|
|
- goodsNo:item.code, // 商品编码
|
|
|
- pattern:item.brandItem, // 花纹
|
|
|
- dot:item.dot, // 批次号
|
|
|
- costprie:item.inventoryCostPrice,// 库存成本
|
|
|
- inventory:item.balanceQuantity, // 账面数量
|
|
|
- price:item.inventoryAmount, // 账面金额
|
|
|
+ brandId: item.brandId,
|
|
|
+ brandItem: item.brandItem,
|
|
|
+ brandName: item.brandName,
|
|
|
+ goodsTypeId: item.goodsTypeId,
|
|
|
+ goodsTypeName: item.goodsTypeName,
|
|
|
+ goodsId: item.goodsId, // 商品名称id
|
|
|
+ goodsName: item.cname, // 商品名称
|
|
|
+ goodsNo: item.code, // 商品编码
|
|
|
+ pattern: item.brandItem, // 花纹
|
|
|
+ dot: item.dot, // 批次号
|
|
|
+ costprie: item.inventoryCostPrice,// 库存成本
|
|
|
+ inventory: item.balanceQuantity, // 账面数量
|
|
|
+ price: item.inventoryAmount, // 账面金额
|
|
|
})
|
|
|
}
|
|
|
this.dialogVisible = false
|
|
|
},
|
|
|
// 导入
|
|
|
- goodsListSaveHandle(){
|
|
|
+ goodsListSaveHandle() {
|
|
|
this.tableData = this.goodsListSave
|
|
|
this.tableDataHandle()
|
|
|
},
|
|
|
// 明细行编辑
|
|
|
- hangeditBtn(row,index){
|
|
|
+ hangeditBtn(row, index) {
|
|
|
this.mingxibaocun = false
|
|
|
console.log('明细编辑')
|
|
|
},
|
|
@@ -801,15 +831,15 @@ export default {
|
|
|
this.mingxibaocun = true
|
|
|
console.log('从表保存按钮')
|
|
|
},
|
|
|
- sendNumBlur(row){
|
|
|
+ sendNumBlur(row) {
|
|
|
if (Number(row.sendNum) < 0) {
|
|
|
- this.$set(row,'sendNum',0)
|
|
|
+ this.$set(row, 'sendNum', 0)
|
|
|
}
|
|
|
// 实际金额 = 实际数量 * 库存成本
|
|
|
- this.$set(row,'subTotalMoney',Number(row.sendNum) * Number(row.costprie))
|
|
|
+ this.$set(row, 'subTotalMoney', Number(row.sendNum) * Number(row.costprie))
|
|
|
// 盈亏 = 实际 - 库存
|
|
|
- this.$set(row,'profitLossNum',Number(row.sendNum) - Number(row.inventory))
|
|
|
- this.$set(row,'profitLossAmount',Number(row.subTotalMoney) - Number(row.price))
|
|
|
+ this.$set(row, 'profitLossNum', Number(row.sendNum) - Number(row.inventory))
|
|
|
+ this.$set(row, 'profitLossAmount', Number(row.subTotalMoney) - Number(row.price))
|
|
|
},
|
|
|
//表头编辑
|
|
|
confirmEditing() {
|
|
@@ -826,14 +856,14 @@ export default {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
- }).then(()=>{
|
|
|
+ }).then(() => {
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
text: '加载中',
|
|
|
spinner: 'el-icon-loading',
|
|
|
background: 'rgba(255,255,255,0.7)'
|
|
|
});
|
|
|
- confirmInventory(this.form).then(res=>{
|
|
|
+ confirmInventory(this.form).then(res => {
|
|
|
this.$message.success("操作成功");
|
|
|
this.refresh(res.data.data.id)
|
|
|
loading.close();
|
|
@@ -853,7 +883,7 @@ export default {
|
|
|
// return
|
|
|
// }
|
|
|
// }
|
|
|
- console.log(this.form,857)
|
|
|
+ console.log(this.form, 857)
|
|
|
// return
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
@@ -931,7 +961,7 @@ export default {
|
|
|
console.log(form);
|
|
|
},
|
|
|
rowUpdate(form, index, done, loading) {
|
|
|
- this.$set(form,'goodsName',form.$goodsId)
|
|
|
+ this.$set(form, 'goodsName', form.$goodsId)
|
|
|
console.log(form);
|
|
|
done(form)
|
|
|
},
|
|
@@ -949,11 +979,11 @@ export default {
|
|
|
this.inventorySearch.whether = '0'
|
|
|
this.inventorySearch.storageId = this.form.storageId
|
|
|
|
|
|
- this.inventoryOnLoad(this.inventoryPage, {...this.inventorySearch})
|
|
|
+ this.inventoryOnLoad(this.inventoryPage, { ...this.inventorySearch })
|
|
|
this.goodsListSave = [] // 多选的数据
|
|
|
this.dialogVisible = true
|
|
|
},
|
|
|
- handleClose(){
|
|
|
+ handleClose() {
|
|
|
this.inventorySearch = {}
|
|
|
this.dialogVisible = false
|
|
|
},
|
|
@@ -972,7 +1002,7 @@ export default {
|
|
|
// 弹窗表格数据获取
|
|
|
inventoryOnLoad(page, params = {}) {
|
|
|
params = {
|
|
|
- storageId:params.storageName,
|
|
|
+ storageId: params.storageName,
|
|
|
current: page.currentPage,
|
|
|
size: page.pageSize,
|
|
|
...Object.assign(params, this.inventorySearch)
|
|
@@ -990,18 +1020,18 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// 多选
|
|
|
- selectionChange(list){
|
|
|
+ selectionChange(list) {
|
|
|
this.goodsListSave = list
|
|
|
},
|
|
|
// 弹窗刷新
|
|
|
refreshChange() {
|
|
|
this.inventoryOnLoad(this.inventoryPage, this.inventorySearch)
|
|
|
},
|
|
|
- currentCurrent(val){
|
|
|
+ currentCurrent(val) {
|
|
|
this.inventoryPage.currentPage = val
|
|
|
this.inventoryOnLoad(this.inventoryPage, this.inventorySearch)
|
|
|
},
|
|
|
- sizeChange(val){
|
|
|
+ sizeChange(val) {
|
|
|
this.inventoryPage.pageSize = val
|
|
|
this.inventoryOnLoad(this.inventoryPage, this.inventorySearch)
|
|
|
},
|
|
@@ -1045,11 +1075,11 @@ export default {
|
|
|
this.$emit("backToList", type);
|
|
|
},
|
|
|
// 弹框的重置
|
|
|
- resetCrud(){
|
|
|
+ resetCrud() {
|
|
|
this.$message.success("重置成功");
|
|
|
},
|
|
|
// 弹窗的保存
|
|
|
- saveCrud(){
|
|
|
+ saveCrud() {
|
|
|
this.$message.success("保存成功");
|
|
|
}
|
|
|
}
|