|
@@ -3,25 +3,28 @@
|
|
|
<div class="customer-head">
|
|
|
<div class="customer-back">
|
|
|
<el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
|
|
|
- @click="backToList">返回列表
|
|
|
+ @click="backToList">返回列表
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<div class="add-customer-btn">
|
|
|
<el-button type="info" @click="getData" size="small">刷新资料
|
|
|
</el-button>
|
|
|
<el-button type="primary" size="small" :disabled="form.status>0" v-if="detailData.status == 3"
|
|
|
- class="el-button--small-yh " @click.stop="openEdit">编辑
|
|
|
+ class="el-button--small-yh " @click.stop="openEdit">编辑
|
|
|
</el-button>
|
|
|
<el-button type="primary" @click="editCustomer" :loading="subLoading" v-if="detailData.status != 3"
|
|
|
- size="small">保存数据
|
|
|
+ size="small">保存数据
|
|
|
</el-button>
|
|
|
<el-dropdown style="padding: 0 6px;line-height: 0">
|
|
|
<el-button type="primary" size="small" :loading="subLoading" :disabled="!form.id">
|
|
|
审核处理<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
</el-button>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item :disabled="!(form.status == 0 || form.status == 2)" @click.native="auditCheck">提交审核</el-dropdown-item>
|
|
|
- <el-dropdown-item v-if="roleName=='admin'" :disabled="!(form.status==8 || form.status==5)" @click.native="revokeCheck">撤销审核</el-dropdown-item>
|
|
|
+ <el-dropdown-item :disabled="!(form.status == 0 || form.status == 2)" @click.native="auditCheck">提交审核
|
|
|
+ </el-dropdown-item>
|
|
|
+ <el-dropdown-item v-if="roleName=='admin'" :disabled="!(form.status==8 || form.status==5)"
|
|
|
+ @click.native="revokeCheck">撤销审核
|
|
|
+ </el-dropdown-item>
|
|
|
<el-dropdown-item :disabled="form.status<1" @click.native="checkScheduleDialog = true">审核进度
|
|
|
</el-dropdown-item>
|
|
|
<el-dropdown-item v-if="$route.query.check" :disabled="form.status == 0" @click.native="check">审批数据
|
|
@@ -35,52 +38,53 @@
|
|
|
<avue-form ref="form" class="trading-form" v-model="form" :option="option">
|
|
|
<template slot="purchaserId">
|
|
|
<crop-select ref="purchaser" v-model="form.purchaserId" corpType="KH" :refresh="false"
|
|
|
- @getCorpData="getKHData" :disabled="form.status > 0"></crop-select>
|
|
|
+ @getCorpData="getKHData" :disabled="form.status > 0"></crop-select>
|
|
|
</template>
|
|
|
<template slot="corpId">
|
|
|
<crop-select ref="corpId" v-model="form.corpId" corpType="GYS" :refresh="false" @getCorpData="getGYSData"
|
|
|
- :disabled="form.status > 0"></crop-select>
|
|
|
+ :disabled="form.status > 0"></crop-select>
|
|
|
</template>
|
|
|
<template slot="storageId">
|
|
|
<el-cascader v-model="form.storageId" :options="storagetreeList" :show-all-levels="false"
|
|
|
- :disabled="form.status > 0" :props="{ checkStrictly: true, emitPath: false, label: 'title' }"
|
|
|
- clearable @change="storagetreeChange">
|
|
|
+ :disabled="form.status > 0" :props="{ checkStrictly: true, emitPath: false, label: 'title' }"
|
|
|
+ clearable @change="storagetreeChange">
|
|
|
</el-cascader>
|
|
|
</template>
|
|
|
<template slot-scope="{column}" slot="purchaserIdLabel">
|
|
|
- <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{column.label}}</span>
|
|
|
+ <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{ column.label }}</span>
|
|
|
</template>
|
|
|
<template slot-scope="{column}" slot="corpIdLabel">
|
|
|
- <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{column.label}}</span>
|
|
|
+ <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{ column.label }}</span>
|
|
|
</template>
|
|
|
<template slot-scope="{column}" slot="storageIdLabel">
|
|
|
- <span style="color: #409EFF;cursor: pointer" @click.stop="addData('storage')">{{column.label}}</span>
|
|
|
+ <span style="color: #409EFF;cursor: pointer" @click.stop="addData('storage')">{{ column.label }}</span>
|
|
|
</template>
|
|
|
</avue-form>
|
|
|
</trade-card>
|
|
|
<trade-card title="出库明细">
|
|
|
<avue-crud ref="crud" :data="itemsVOList" :option="tableOption" @row-del="rowDel" @saveColumn="saveColumn"
|
|
|
- @resetColumn="resetColumn" :cell-style="cellStyle" @row-save="rowSave" @row-update="addUpdate">
|
|
|
+ @resetColumn="resetColumn" :cell-style="cellStyle" @row-save="rowSave" @row-update="addUpdate">
|
|
|
<template slot="menuLeft">
|
|
|
-<!-- <el-button type="primary" icon="el-icon-plus" size="small" :disabled="form.status > 0"-->
|
|
|
-<!-- @click.stop="addRow">录入明细-->
|
|
|
-<!-- </el-button>-->
|
|
|
-<!-- <el-button type="success" icon="el-icon-bottom" size="small" @click.stop="getTemplate">下载模板-->
|
|
|
-<!-- </el-button>-->
|
|
|
+ <el-button type="primary" icon="el-icon-plus" size="small"
|
|
|
+ :disabled="!(!form.status || form.status == 0 || form.status == 8)"
|
|
|
+ @click.stop="addRow">导入
|
|
|
+ </el-button>
|
|
|
+ <!-- <el-button type="success" icon="el-icon-bottom" size="small" @click.stop="getTemplate">下载模板-->
|
|
|
+ <!-- </el-button>-->
|
|
|
<!-- <el-button type="info" icon="el-icon-top" size="small" :disabled="detailData.status == 3"
|
|
|
@click.stop="addRow">导入
|
|
|
</el-button> -->
|
|
|
<el-button type="info" icon="el-icon-printer" size="small" @click.stop="openReport()">报表打印</el-button>
|
|
|
</template>
|
|
|
-<!-- <template slot="headerSerial">-->
|
|
|
-<!-- <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"-->
|
|
|
-<!-- :disabled="detailData.status == 3" circle></el-button>-->
|
|
|
-<!-- </template>-->
|
|
|
+ <!-- <template slot="headerSerial">-->
|
|
|
+ <!-- <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"-->
|
|
|
+ <!-- :disabled="detailData.status == 3" circle></el-button>-->
|
|
|
+ <!-- </template>-->
|
|
|
<template slot="storageIdHeader" slot-scope="{column}">
|
|
|
- <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{column.label}}</span>
|
|
|
+ <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{ column.label }}</span>
|
|
|
</template>
|
|
|
<template slot="itemIdHeader" slot-scope="{column}">
|
|
|
- <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{column.label}}</span>
|
|
|
+ <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{ column.label }}</span>
|
|
|
</template>
|
|
|
<template slot="oneCode" slot-scope="{ row, index }">
|
|
|
<el-popover placement="right" width="160" trigger="click">
|
|
@@ -96,24 +100,29 @@
|
|
|
</template>
|
|
|
<template slot="storageInQuantityForm" slot-scope="{ row,disabled }">
|
|
|
<el-input-number size="small" v-model="row.storageInQuantity" @change="calculateChange(row)"
|
|
|
- :controls="false" style="width:100%" placeholder="请输入"></el-input-number>
|
|
|
+ :controls="false" style="width:100%" placeholder="请输入"></el-input-number>
|
|
|
</template>
|
|
|
<template slot="priceForm" slot-scope="{ row,disabled }">
|
|
|
<el-input-number size="small" v-model="row.price" @change="calculateChange(row)" :controls="false"
|
|
|
- style="width:100%" placeholder="请输入"></el-input-number>
|
|
|
+ style="width:100%" placeholder="请输入"></el-input-number>
|
|
|
</template>
|
|
|
<template slot="menu" slot-scope="{ row, index }">
|
|
|
<div style="display:flex;justify-content: center;">
|
|
|
- <el-button size="small" icon="el-icon-edit" type="text" @click="rowCell(row, index)" :disabled="form.status > 0">{{ row.$cellEdit ? "保存" : "编辑" }}</el-button>
|
|
|
- <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)" :disabled="form.status > 0">删除</el-button>
|
|
|
+ <el-button size="small" icon="el-icon-edit" type="text" @click="rowCell(row, index)"
|
|
|
+ :disabled="!(!form.status || form.status == 0 || form.status == 8)">
|
|
|
+ {{ row.$cellEdit ? "保存" : "编辑" }}
|
|
|
+ </el-button>
|
|
|
+ <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)"
|
|
|
+ :disabled="!(!form.status || form.status == 0 || form.status == 8)">删除
|
|
|
+ </el-button>
|
|
|
<!-- <el-button size="small" icon="el-icon-printer" type="text" @click="rowPrint(row, index)" :disabled="!row.id">
|
|
|
打印</el-button> -->
|
|
|
<div style="display:flex;flex-direction: column;justify-content: center;margin-left: 10px;">
|
|
|
<el-tooltip effect="dark" content="向上移动" placement="top">
|
|
|
<i v-if="index != 0&&detailData.status != 3" :disabled="detailData.status == 3"
|
|
|
- class="el-icon-arrow-up" @click="moveUp(row, index)" style="color:#409EFF;"></i>
|
|
|
+ class="el-icon-arrow-up" @click="moveUp(row, index)" style="color:#409EFF;"></i>
|
|
|
</el-tooltip>
|
|
|
- <el-tooltip effect="dark" content="向下移动" placement="bottom"> <i
|
|
|
+ <el-tooltip effect="dark" content="向下移动" placement="bottom"><i
|
|
|
v-if="index != (itemsVOList.length - 1)&&detailData.status != 3" :disabled="detailData.status == 3"
|
|
|
class="el-icon-arrow-down" @click="moveDown(row, index)" style="color:#409EFF;"></i></el-tooltip>
|
|
|
</div>
|
|
@@ -121,49 +130,79 @@
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</trade-card>
|
|
|
- <fee-info ref="feeInfo" :orderFeesList="orderFeesList" :disabled="!(form.status == 2 || form.status == 0)"
|
|
|
- feeUrl="/blade-purchase-sales/entranceOrder/removeOrderFees" :optionType="'CMY'" :itemType="'D'"
|
|
|
- :inCropId="true" @beforeFinance="beforeFinance" :delType="2" :billingShow="false" />
|
|
|
+ <fee-info ref="feeInfo" :orderFeesList="orderFeesList" :disabled="!(form.status == 2 || form.status == 0 || !form.status)"
|
|
|
+ feeUrl="/blade-purchase-sales/entranceOrder/removeOrderFees" :optionType="'CMY'" :itemType="'D'"
|
|
|
+ :inCropId="true" @beforeFinance="beforeFinance" :delType="2" :billingShow="false"/>
|
|
|
<!-- <upload-file ref="uploadFile" title="合同附件" :disabled="detailData.status == 3" :orderFilesList="orderFilesList"
|
|
|
delUrl="" /> -->
|
|
|
<containerTitle title="上传附件"></containerTitle>
|
|
|
<c-upload typeUpload="CD" deleteUrl="/api/trade-purchase/woodHarvestingCloud/removeByFileId"
|
|
|
- :data="orderFilesList" display :enumerationValue="85.6" :disabled="!(form.status == 2 || form.status == 0)"></c-upload>
|
|
|
-
|
|
|
+ :data="orderFilesList" display :enumerationValue="85.6"
|
|
|
+ :disabled="!(form.status == 2 || form.status == 0 || !form.status)"></c-upload>
|
|
|
<el-dialog append-to-body title="审核进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
|
|
|
- :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
|
|
|
+ :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
|
|
|
<check-schedule :checkId="form.id" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun">
|
|
|
</check-schedule>
|
|
|
</el-dialog>
|
|
|
<el-dialog append-to-body title="审批" class="el-dialogDeep" :visible.sync="checkDialog" width="50%"
|
|
|
- :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
|
|
|
+ :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
|
|
|
<check :checkData="checkData" :checkDetail="false" :idList="[]" @choceCheckFun="choceCheckFun">
|
|
|
</check>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
+ <el-dialog
|
|
|
+ title="选择明细"
|
|
|
+ class="el-dialogDeep"
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+ append-to-body
|
|
|
+ width="80%">
|
|
|
+ <span>
|
|
|
+ <avue-crud :option="tableOptionTwo" ref="crudTwo" :data="dialogList" @selection-change="selectionChange" @saveColumn="saveColumnTwo" @resetColumn="resetColumnTwo"></avue-crud>
|
|
|
+ </span>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="confirmImport">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { detail, submit, checkWarehousing, getStoragetree, getStorage, getAllgoods, financingExcess, revokeWarehousing,delItem } from "@/api/purchasingManagement/inStock";
|
|
|
+import {
|
|
|
+ detail,
|
|
|
+ submit,
|
|
|
+ checkWarehousing,
|
|
|
+ getStoragetree,
|
|
|
+ getStorage,
|
|
|
+ getAllgoods,
|
|
|
+ financingExcess,
|
|
|
+ revokeWarehousing,
|
|
|
+ delItem,
|
|
|
+ scanningCodeAddPc
|
|
|
+} from "@/api/purchasingManagement/inStock";
|
|
|
import tableOption from "./config/customerContact.json";
|
|
|
+import tableOptionTwo from "./config/customerContactTwo.json";
|
|
|
import feeInfo from "@/components/fee-info/main";
|
|
|
import checkSchedule from "../../../components/check/checkSchedule";
|
|
|
import uploadFile from "@/components/upload-file/main";
|
|
|
-import { getToken } from "@/util/auth";
|
|
|
-import { contrastObj, contrastList, contrastList2 } from "@/util/contrastData";
|
|
|
-import { getCurrentDate } from "@/util/date";
|
|
|
-import {validatenull } from '@/util/validate'
|
|
|
+import {getToken} from "@/util/auth";
|
|
|
+import {contrastObj, contrastList, contrastList2} from "@/util/contrastData";
|
|
|
+import {getCurrentDate} from "@/util/date";
|
|
|
+import {validatenull} from '@/util/validate'
|
|
|
import check from "@/components/check/check";
|
|
|
+
|
|
|
export default {
|
|
|
name: "detailsPageEdit",
|
|
|
data() {
|
|
|
return {
|
|
|
checkData: {},
|
|
|
+ dialogVisible: false,
|
|
|
+ dialogList:[],
|
|
|
checkDialog: false,
|
|
|
form: {},
|
|
|
checkScheduleDialog: false,
|
|
|
tableOption: {},
|
|
|
+ tableOptionTwo: {},
|
|
|
option: {
|
|
|
disabled: false,
|
|
|
menuBtn: false,
|
|
@@ -229,7 +268,7 @@ export default {
|
|
|
label: "车船号",
|
|
|
prop: "vehicleShipNumber",
|
|
|
span: 6
|
|
|
- },{
|
|
|
+ }, {
|
|
|
label: "审核状态",
|
|
|
prop: "status",
|
|
|
type: "select",
|
|
@@ -252,7 +291,19 @@ export default {
|
|
|
prop: "sysNo",
|
|
|
disabled: true,
|
|
|
span: 6
|
|
|
- },{
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "库管员",
|
|
|
+ prop: "stockUser",
|
|
|
+ span: 6,
|
|
|
+ dataType: "number",
|
|
|
+ type: 'select',
|
|
|
+ dicUrl: "/api/blade-user/MCSelectList",
|
|
|
+ props: {
|
|
|
+ label: "realName",
|
|
|
+ value: "id"
|
|
|
+ }
|
|
|
+ }, {
|
|
|
label: "是否融资",
|
|
|
prop: "arrival",
|
|
|
type: "select",
|
|
@@ -273,7 +324,7 @@ export default {
|
|
|
prop: "orderRemark",
|
|
|
type: "textarea",
|
|
|
minRows: 1,
|
|
|
- span: 12
|
|
|
+ span: 24
|
|
|
},
|
|
|
]
|
|
|
},
|
|
@@ -288,7 +339,8 @@ export default {
|
|
|
olditemsVOList: [],
|
|
|
oldorderFeesList: [],
|
|
|
oldorderFilesList: [],
|
|
|
- roleName:localStorage.getItem("roleName")
|
|
|
+ roleName: localStorage.getItem("roleName"),
|
|
|
+ selectionList:[]
|
|
|
};
|
|
|
},
|
|
|
props: {
|
|
@@ -302,14 +354,14 @@ export default {
|
|
|
uploadFile,
|
|
|
check
|
|
|
},
|
|
|
- watch:{
|
|
|
- form:{
|
|
|
- handler(){
|
|
|
+ watch: {
|
|
|
+ form: {
|
|
|
+ handler() {
|
|
|
if (this.form.status > 0) {
|
|
|
- this.$set(this.option,'disabled',true)
|
|
|
- this.$set(this.findObject(this.tableOption.column, "remarks"),'disabled',true)
|
|
|
- }else {
|
|
|
- this.$set(this.option,'disabled',false)
|
|
|
+ this.$set(this.option, 'disabled', true)
|
|
|
+ // this.$set(this.findObject(this.tableOption.column, "remarks"),'disabled',true)
|
|
|
+ } else {
|
|
|
+ this.$set(this.option, 'disabled', false)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -321,20 +373,18 @@ export default {
|
|
|
if (this.detailData.id) {
|
|
|
this.getDetail(this.detailData.id);
|
|
|
}
|
|
|
- this.tableOption = await this.getColumnData(
|
|
|
- this.getColumnName(191),
|
|
|
- tableOption
|
|
|
- );
|
|
|
+ this.tableOption = await this.getColumnData(this.getColumnName(191),tableOption);
|
|
|
+ this.tableOptionTwo = await this.getColumnData(this.getColumnName(191.1),tableOptionTwo);
|
|
|
getStoragetree().then(res => {
|
|
|
this.storagetreeList = res.data.data;
|
|
|
})
|
|
|
this.getWorkDicts("approval_status").then(res => {
|
|
|
this.findObject(this.option.column, "status").dicData =
|
|
|
- res.data.data;
|
|
|
+ res.data.data;
|
|
|
});
|
|
|
this.getWorkDicts("CMY_business_type").then(res => {
|
|
|
this.findObject(this.option.column, "businessType").dicData =
|
|
|
- res.data.data;
|
|
|
+ res.data.data;
|
|
|
});
|
|
|
if (this.$route.query.generateId) {
|
|
|
this.getGenerate(this.$route.query.generateId);
|
|
@@ -342,6 +392,24 @@ export default {
|
|
|
this.getAllWorkDicts()
|
|
|
},
|
|
|
methods: {
|
|
|
+ selectionChange(list){
|
|
|
+ this.selectionList = list
|
|
|
+ },
|
|
|
+ confirmImport(){
|
|
|
+ for (let item in this.selectionList){
|
|
|
+ for (let li of this.itemsVOList){
|
|
|
+ if (this.selectionList[item].billNo == li.billNo) return this.$message.warning('第'+Number(Number(item)+1)+'条已存在,请勿重复导入!')
|
|
|
+ }
|
|
|
+ this.itemsVOList.push({
|
|
|
+ ...this.selectionList[item],
|
|
|
+ srcItemId:this.selectionList[item].id,
|
|
|
+ $cellEdit: true
|
|
|
+ })
|
|
|
+ delete this.itemsVOList[this.itemsVOList.length-1].id
|
|
|
+ }
|
|
|
+ this.selectionList = []
|
|
|
+ this.dialogVisible = false
|
|
|
+ },
|
|
|
check() {
|
|
|
this.checkData = this.$route.query.check
|
|
|
this.checkDialog = true
|
|
@@ -353,7 +421,9 @@ export default {
|
|
|
getData() {
|
|
|
getAllgoods().then(res => {
|
|
|
this.findObject(this.tableOption.column, "itemId").dicData =
|
|
|
- res.data.data;
|
|
|
+ res.data.data;
|
|
|
+ this.findObject(this.tableOptionTwo.column, "itemId").dicData =
|
|
|
+ res.data.data;
|
|
|
})
|
|
|
getStoragetree().then(res => {
|
|
|
this.storagetreeList = res.data.data;
|
|
@@ -365,18 +435,20 @@ export default {
|
|
|
getAllWorkDicts() {
|
|
|
getAllgoods().then(res => {
|
|
|
this.findObject(this.tableOption.column, "itemId").dicData =
|
|
|
- res.data.data;
|
|
|
+ res.data.data;
|
|
|
+ this.findObject(this.tableOptionTwo.column, "itemId").dicData =
|
|
|
+ res.data.data;
|
|
|
})
|
|
|
this.getWorkDicts("unit").then(res => {
|
|
|
this.findObject(this.tableOption.column, "unit").dicData =
|
|
|
- res.data.data;
|
|
|
+ res.data.data;
|
|
|
});
|
|
|
},
|
|
|
cellStyle() {
|
|
|
return "padding:0;height:40px;";
|
|
|
},
|
|
|
getStorage() {
|
|
|
- getStorage({ storageTypeId: this.form.storageId }).then(res => {
|
|
|
+ getStorage({storageTypeId: this.form.storageId}).then(res => {
|
|
|
this.findObject(this.tableOption.column, "storageId").dicData = res.data;
|
|
|
})
|
|
|
},
|
|
@@ -413,8 +485,15 @@ export default {
|
|
|
this.$refs["form"].validate((valid, done) => {
|
|
|
done();
|
|
|
if (valid) {
|
|
|
- this.itemsVOList.push({ $cellEdit: true });
|
|
|
- this.getStorage()
|
|
|
+ scanningCodeAddPc({
|
|
|
+ storageId:this.form.storageId,
|
|
|
+ purchaserId:this.form.purchaserId
|
|
|
+ }).then(res=>{
|
|
|
+ this.dialogList = res.data.data.records
|
|
|
+ this.dialogVisible = true
|
|
|
+ })
|
|
|
+ // this.itemsVOList.push({$cellEdit: true});
|
|
|
+ // this.getStorage()
|
|
|
} else {
|
|
|
return false;
|
|
|
}
|
|
@@ -437,7 +516,7 @@ export default {
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
if (row.id) {
|
|
|
- delItem({ itemId: row.id }).then(res => {
|
|
|
+ delItem({itemId: row.id, type: "CK"}).then(res => {
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
message: "删除成功!"
|
|
@@ -456,44 +535,45 @@ export default {
|
|
|
getDetail(id) {
|
|
|
this.pageLoading = true;
|
|
|
detail(id)
|
|
|
- .then(res => {
|
|
|
- this.form = res.data.data;
|
|
|
- this.itemsVOList = res.data.data.itemsVOList;
|
|
|
- this.orderFeesList = res.data.data.orderFeesList;
|
|
|
- this.orderFilesList = res.data.data.orderFilesList;
|
|
|
- this.oldform = this.deepClone(res.data.data);
|
|
|
- this.olditemsVOList = this.deepClone(res.data.data.itemsVOList);
|
|
|
- this.oldorderFeesList = this.deepClone(res.data.data.orderFeesList);
|
|
|
- this.oldorderFilesList = this.deepClone(res.data.data.orderFilesList);
|
|
|
- this.getStorage()
|
|
|
- })
|
|
|
- .finally(() => {
|
|
|
- this.pageLoading = false;
|
|
|
- });
|
|
|
+ .then(res => {
|
|
|
+ this.form = res.data.data;
|
|
|
+ this.itemsVOList = res.data.data.itemsVOList;
|
|
|
+ this.orderFeesList = res.data.data.orderFeesList;
|
|
|
+ this.orderFilesList = res.data.data.orderFilesList;
|
|
|
+ this.oldform = this.deepClone(res.data.data);
|
|
|
+ this.olditemsVOList = this.deepClone(res.data.data.itemsVOList);
|
|
|
+ this.oldorderFeesList = this.deepClone(res.data.data.orderFeesList);
|
|
|
+ this.oldorderFilesList = this.deepClone(res.data.data.orderFilesList);
|
|
|
+ this.getStorage()
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.pageLoading = false;
|
|
|
+ });
|
|
|
},
|
|
|
getGenerate(id) {
|
|
|
this.pageLoading = true;
|
|
|
detail(id)
|
|
|
- .then(res => {
|
|
|
- delete res.data.data.id
|
|
|
- delete res.data.data.createTime
|
|
|
- delete res.data.data.createUser
|
|
|
- delete res.data.data.createUserName
|
|
|
- delete res.data.data.sysNo
|
|
|
- delete res.data.data.status
|
|
|
- res.data.data.stockTime = getCurrentDate()
|
|
|
- res.data.data.itemsVOList.forEach(e => {
|
|
|
- e.storageInQuantity=e.balanceNumber
|
|
|
- delete e.id
|
|
|
- })
|
|
|
- this.form = res.data.data;
|
|
|
- this.itemsVOList = res.data.data.itemsVOList.filter(item => item.isIssue == 3);
|
|
|
- this.oldform = this.deepClone(res.data.data);
|
|
|
- this.olditemsVOList = this.deepClone(res.data.data.itemsVOList.filter(item => item.isIssue == 3));
|
|
|
- this.getStorage()
|
|
|
- }).finally(() => {
|
|
|
- this.pageLoading = false;
|
|
|
- });
|
|
|
+ .then(res => {
|
|
|
+ delete res.data.data.id
|
|
|
+ delete res.data.data.createTime
|
|
|
+ delete res.data.data.createUser
|
|
|
+ delete res.data.data.createUserName
|
|
|
+ delete res.data.data.sysNo
|
|
|
+ delete res.data.data.status
|
|
|
+ res.data.data.stockTime = getCurrentDate()
|
|
|
+ res.data.data.itemsVOList.forEach(e => {
|
|
|
+ e.storageInQuantity = e.balanceNumber
|
|
|
+ e.srcItemId = e.id
|
|
|
+ delete e.id
|
|
|
+ })
|
|
|
+ this.form = res.data.data;
|
|
|
+ this.itemsVOList = res.data.data.itemsVOList.filter(item => item.isIssue == 3);
|
|
|
+ this.oldform = this.deepClone(res.data.data);
|
|
|
+ this.olditemsVOList = this.deepClone(res.data.data.itemsVOList.filter(item => item.isIssue == 3));
|
|
|
+ this.getStorage()
|
|
|
+ }).finally(() => {
|
|
|
+ this.pageLoading = false;
|
|
|
+ });
|
|
|
},
|
|
|
//修改提交触发
|
|
|
editCustomer(status) {
|
|
@@ -501,32 +581,32 @@ export default {
|
|
|
done();
|
|
|
if (valid) {
|
|
|
for (let i = 0; i < this.itemsVOList.length; i++) {
|
|
|
- if(validatenull(this.itemsVOList[i].storageId)){
|
|
|
- return this.$message.error('请完善第'+(i+1)+'行的库区')
|
|
|
+ if (validatenull(this.itemsVOList[i].storageId)) {
|
|
|
+ return this.$message.error('请完善第' + (i + 1) + '行的库区')
|
|
|
}
|
|
|
- if(validatenull(this.itemsVOList[i].itemId)){
|
|
|
- return this.$message.error('请完善第'+(i+1)+'行的品名')
|
|
|
+ if (validatenull(this.itemsVOList[i].itemId)) {
|
|
|
+ return this.$message.error('请完善第' + (i + 1) + '行的品名')
|
|
|
}
|
|
|
- if(validatenull(this.itemsVOList[i].itemType)){
|
|
|
- return this.$message.error('请完善第'+(i+1)+'行的品牌')
|
|
|
+ if (validatenull(this.itemsVOList[i].itemType)) {
|
|
|
+ return this.$message.error('请完善第' + (i + 1) + '行的品牌')
|
|
|
}
|
|
|
- if(validatenull(this.itemsVOList[i].grade)){
|
|
|
- return this.$message.error('请完善第'+(i+1)+'行的等级')
|
|
|
+ if (validatenull(this.itemsVOList[i].grade)) {
|
|
|
+ return this.$message.error('请完善第' + (i + 1) + '行的等级')
|
|
|
}
|
|
|
- if(validatenull(this.itemsVOList[i].billNo)){
|
|
|
- return this.$message.error('请完善第'+(i+1)+'行的捆包号')
|
|
|
+ if (validatenull(this.itemsVOList[i].billNo)) {
|
|
|
+ return this.$message.error('请完善第' + (i + 1) + '行的捆包号')
|
|
|
}
|
|
|
- if(validatenull(this.itemsVOList[i].sliceNumber)){
|
|
|
- return this.$message.error('请完善第'+(i+1)+'行的片数')
|
|
|
+ if (validatenull(this.itemsVOList[i].sliceNumber)) {
|
|
|
+ return this.$message.error('请完善第' + (i + 1) + '行的片数')
|
|
|
}
|
|
|
- if(validatenull(this.itemsVOList[i].storageInQuantity)){
|
|
|
- return this.$message.error('请完善第'+(i+1)+'行的入库量')
|
|
|
+ if (validatenull(this.itemsVOList[i].storageInQuantity)) {
|
|
|
+ return this.$message.error('请完善第' + (i + 1) + '行的入库量')
|
|
|
}
|
|
|
- if(validatenull(this.itemsVOList[i].unit)){
|
|
|
- return this.$message.error('请完善第'+(i+1)+'行的入库单位')
|
|
|
+ if (validatenull(this.itemsVOList[i].unit)) {
|
|
|
+ return this.$message.error('请完善第' + (i + 1) + '行的入库单位')
|
|
|
}
|
|
|
- if(validatenull(this.itemsVOList[i].price)){
|
|
|
- return this.$message.error('请完善第'+(i+1)+'行的入库单价')
|
|
|
+ if (validatenull(this.itemsVOList[i].price)) {
|
|
|
+ return this.$message.error('请完善第' + (i + 1) + '行的入库单价')
|
|
|
}
|
|
|
}
|
|
|
this.itemsVOList.forEach((e, index) => {
|
|
@@ -558,9 +638,9 @@ export default {
|
|
|
this.$emit("goBack");
|
|
|
}
|
|
|
})
|
|
|
- .finally(() => {
|
|
|
- this.subLoading = false;
|
|
|
- });
|
|
|
+ .finally(() => {
|
|
|
+ this.subLoading = false;
|
|
|
+ });
|
|
|
} else {
|
|
|
return false;
|
|
|
}
|
|
@@ -575,7 +655,7 @@ export default {
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
- financingExcess({ id: this.form.purchaserId }).then(res => {
|
|
|
+ financingExcess({id: this.form.purchaserId}).then(res => {
|
|
|
if (res.data.data == '操作成功') {
|
|
|
this.$confirm("确定审核此订单?", {
|
|
|
confirmButtonText: "确定",
|
|
@@ -586,7 +666,7 @@ export default {
|
|
|
const data = {
|
|
|
id: this.form.id,
|
|
|
checkType: 'CK',
|
|
|
- status:this.form.status,
|
|
|
+ status: this.form.status,
|
|
|
url: '/salesManagement/outStock/index',
|
|
|
pageStatus: "this.$store.getters.entranceXsStatus",
|
|
|
pageLabel: "出库管理",
|
|
@@ -613,7 +693,7 @@ export default {
|
|
|
const data = {
|
|
|
id: this.form.id,
|
|
|
checkType: 'CK',
|
|
|
- status:this.form.status,
|
|
|
+ status: this.form.status,
|
|
|
url: '/salesManagement/outStock/index',
|
|
|
pageStatus: "this.$store.getters.entranceXsStatus",
|
|
|
pageLabel: "出库管理",
|
|
@@ -634,7 +714,7 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
} else {
|
|
|
- financingExcess({ id: this.form.purchaserId }).then(res => {
|
|
|
+ financingExcess({id: this.form.purchaserId}).then(res => {
|
|
|
if (res.data.data == '操作成功') {
|
|
|
this.$confirm("确定审核此订单?", {
|
|
|
confirmButtonText: "确定",
|
|
@@ -645,7 +725,7 @@ export default {
|
|
|
const data = {
|
|
|
id: this.form.id,
|
|
|
checkType: 'CK',
|
|
|
- status:this.form.status,
|
|
|
+ status: this.form.status,
|
|
|
url: '/salesManagement/outStock/index',
|
|
|
pageStatus: "this.$store.getters.entranceXsStatus",
|
|
|
pageLabel: "出库管理",
|
|
@@ -672,7 +752,7 @@ export default {
|
|
|
const data = {
|
|
|
id: this.form.id,
|
|
|
checkType: 'CK',
|
|
|
- status:this.form.status,
|
|
|
+ status: this.form.status,
|
|
|
url: '/salesManagement/outStock/index',
|
|
|
pageStatus: "this.$store.getters.entranceXsStatus",
|
|
|
pageLabel: "出库管理",
|
|
@@ -725,22 +805,22 @@ export default {
|
|
|
backToList() {
|
|
|
let orderFeesList = this.$refs.feeInfo.submitData();
|
|
|
if (
|
|
|
- contrastObj(this.form, this.oldform) ||
|
|
|
- contrastList(this.itemsVOList, this.olditemsVOList) ||
|
|
|
- contrastList2(orderFeesList, this.oldorderFeesList) ||
|
|
|
- contrastList(this.orderFilesList, this.oldorderFilesList)
|
|
|
+ contrastObj(this.form, this.oldform) ||
|
|
|
+ contrastList(this.itemsVOList, this.olditemsVOList) ||
|
|
|
+ contrastList2(orderFeesList, this.oldorderFeesList) ||
|
|
|
+ contrastList(this.orderFilesList, this.oldorderFilesList)
|
|
|
) {
|
|
|
this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
})
|
|
|
- .then(() => {
|
|
|
- this.editCustomer("goBack");
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- this.$emit("goBack");
|
|
|
- });
|
|
|
+ .then(() => {
|
|
|
+ this.editCustomer("goBack");
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$emit("goBack");
|
|
|
+ });
|
|
|
} else {
|
|
|
this.$emit("goBack");
|
|
|
}
|
|
@@ -784,8 +864,8 @@ export default {
|
|
|
},
|
|
|
async saveColumn() {
|
|
|
const inSave = await this.saveColumnData(
|
|
|
- this.getColumnName(191),
|
|
|
- this.tableOption
|
|
|
+ this.getColumnName(191),
|
|
|
+ this.tableOption
|
|
|
);
|
|
|
if (inSave) {
|
|
|
this.$nextTick(() => {
|
|
@@ -799,8 +879,8 @@ export default {
|
|
|
async resetColumn() {
|
|
|
this.tableOption = tableOption;
|
|
|
const inSave = await this.delColumnData(
|
|
|
- this.getColumnName(191),
|
|
|
- tableOption
|
|
|
+ this.getColumnName(191),
|
|
|
+ tableOption
|
|
|
);
|
|
|
if (inSave) {
|
|
|
this.$nextTick(() => {
|
|
@@ -814,6 +894,29 @@ export default {
|
|
|
this.$refs.crud.$refs.dialogColumn.columnBox = false;
|
|
|
}, 1000);
|
|
|
}
|
|
|
+ },
|
|
|
+ async saveColumnTwo() {
|
|
|
+ const inSave = await this.saveColumnData(
|
|
|
+ this.getColumnName(191.1),
|
|
|
+ this.tableOptionTwo
|
|
|
+ );
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ //关闭窗口
|
|
|
+ this.$refs.crudTwo.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async resetColumnTwo() {
|
|
|
+ this.tableOptionTwo = tableOptionTwo;
|
|
|
+ const inSave = await this.delColumnData(
|
|
|
+ this.getColumnName(191.1),
|
|
|
+ tableOptionTwo
|
|
|
+ );
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("重置成功");
|
|
|
+ //关闭窗口
|
|
|
+ this.$refs.crudTwo.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
};
|