|
|
@@ -16,9 +16,15 @@
|
|
|
<el-button v-if="form.statusName == '待领料'" class="el-button--small-yh" style="margin-left: 6px;" type="success"
|
|
|
size="small" :disabled="!form.id || editButton" @click="confirmPicking">确认领料
|
|
|
</el-button>
|
|
|
- <el-button v-if="form.statusName == '已领料'" class="el-button--small-yh" style="margin-left: 6px;" type="danger"
|
|
|
+ <el-button v-if="form.statusName == '待确认'" class="el-button--small-yh" style="margin-left: 6px;" type="danger"
|
|
|
size="small" :disabled="!form.id || editButton" @click="revokePicking">撤销领料
|
|
|
</el-button>
|
|
|
+ <el-button v-if="form.statusName == '待确认'&&(roleName=='admin'||roleName=='库管')" class="el-button--small-yh" style="margin-left: 6px;" type="success"
|
|
|
+ size="small" :disabled="!form.id || editButton" @click="confirm">确 认
|
|
|
+ </el-button>
|
|
|
+ <el-button v-if="form.statusName == '已确认'&&(roleName=='admin'||roleName=='库管')" class="el-button--small-yh" style="margin-left: 6px;" type="danger"
|
|
|
+ size="small" :disabled="!form.id || editButton" @click="revokeConfirm">撤销确认
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="margin-top: 50px">
|
|
|
@@ -28,12 +34,12 @@
|
|
|
<dic-select v-model="form.customerName" placeholder="客户" key="id" label="cname" res="records"
|
|
|
url="/blade-sales-part/corpsDesc/list?current=1&size=10&corpType=KH" :filterable="true" :remote="true"
|
|
|
dataName="cname" @selectChange="dicChange('customerName', $event)"
|
|
|
- :disabled="editButton || form.statusName == '已领料'"></dic-select>
|
|
|
+ :disabled="editButton || form.statusName == '待确认' || form.statusName == '已确认'"></dic-select>
|
|
|
</tempalte>
|
|
|
<template slot-scope="{row,index}" slot="contacts">
|
|
|
<el-select v-model="form.contacts" placeholder="请选择" size="small" style="width:60%" clearable filterable
|
|
|
allow-create default-first-option @change="contactsChange($event)"
|
|
|
- :disabled="editButton || form.statusName == '已领料'">
|
|
|
+ :disabled="editButton || form.statusName == '待确认' || form.statusName == '已确认'">
|
|
|
<el-option v-for="item in contactsOption" :key="item.id" :label="item.contacts" :value="item.contacts" />
|
|
|
</el-select>
|
|
|
</template>
|
|
|
@@ -46,16 +52,28 @@
|
|
|
@saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 442)">
|
|
|
<template slot-scope="{scope,row}" slot="menuLeft">
|
|
|
<el-button type="primary" icon="el-icon-plus" size="small"
|
|
|
- :disabled="editButton || form.statusName == '已领料'" @click="rowAdd(row, 1)">添加商品</el-button>
|
|
|
+ :disabled="editButton || form.statusName == '待确认' || form.statusName == '已确认'"
|
|
|
+ @click="rowAdd(row, 1)">添加商品</el-button>
|
|
|
<el-popover placement="top" width="400" trigger="click" @show="inventoryShow2()">
|
|
|
<avue-crud :data="inventoryList" :option="inventoryOption">
|
|
|
</avue-crud>
|
|
|
<el-button slot="reference" type="primary" plain size="small"
|
|
|
:disabled="selectionMultilist.length != 1 || form.businessSource == '外部销售'">查看库存</el-button>
|
|
|
</el-popover>
|
|
|
- <el-button type="primary" icon="el-icon-printer" size="small" @click="handlePrint">打印</el-button>
|
|
|
+ <!-- <el-button type="primary" icon="el-icon-printer" size="small" @click="handlePrint">打印</el-button> -->
|
|
|
<el-button type="danger" plain size="small" @click="batchDelete"
|
|
|
- :disabled="editButton || form.statusName == '已领料'">一键删除</el-button>
|
|
|
+ :disabled="editButton || form.statusName == '待确认' || form.statusName == '已确认'">一键删除</el-button>
|
|
|
+ <el-popover width="600" trigger="click">
|
|
|
+ <avue-crud :data="inventoryData2" :option="inventoryOption2">
|
|
|
+ <template slot-scope="{row}" slot="menu">
|
|
|
+ <el-button type="text" icon="el-icon-refresh" size="small" :disabled="row.storageId != form.storageId"
|
|
|
+ @click.stop="synchronous(row)">更新库存
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ <el-button type="primary" plain size="small" slot="reference" @click="viewInventory2"
|
|
|
+ :disabled="selectionMultilist.length != 1 || isAddBtn">同步库存</el-button>
|
|
|
+ </el-popover>
|
|
|
</template>
|
|
|
<template slot="goodsNum" slot-scope="{ row }">
|
|
|
<el-input-number v-if="row.$cellEdit" size="small" v-model="row.goodsNum" :precision="numberDecimal"
|
|
|
@@ -63,19 +81,22 @@
|
|
|
<span v-else>{{ row.goodsNum }}</span>
|
|
|
</template>
|
|
|
<template slot-scope="{type,size,row,index,disabled}" slot="menu">
|
|
|
- <el-button v-if="!row.$cellEdit" :size="size" :disabled="editButton || form.statusName == '已领料'"
|
|
|
- :type="type" icon="el-icon-edit" @click="rowCell(row, index)">编辑
|
|
|
+ <el-button v-if="!row.$cellEdit" :size="size"
|
|
|
+ :disabled="editButton || form.statusName == '待确认' || form.statusName == '已确认'" :type="type"
|
|
|
+ icon="el-icon-edit" @click="rowCell(row, index)">编辑
|
|
|
</el-button>
|
|
|
- <el-button v-else :size="size" :disabled="editButton || form.statusName == '已领料'" :type="type"
|
|
|
+ <el-button v-else :size="size"
|
|
|
+ :disabled="editButton || form.statusName == '待确认' || form.statusName == '已确认'" :type="type"
|
|
|
icon="el-icon-plus" @click="rowSave(row, index)">保存
|
|
|
</el-button>
|
|
|
- <el-button icon="el-icon-delete" :size="size" :disabled="editButton || form.statusName == '已领料'"
|
|
|
- :type="type" @click="rowDelBox(row, index, 'shipItemsList')">删除
|
|
|
+ <el-button icon="el-icon-delete" :size="size"
|
|
|
+ :disabled="editButton || form.statusName == '待确认' || form.statusName == '已确认'" :type="type"
|
|
|
+ @click="rowDelBox(row, index, 'shipItemsList')">删除
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</trade-card>
|
|
|
- <report-dialog :switchDialog="switchDialog" :reportName="reportName" :reportId="form.id"
|
|
|
+ <report-dialog :switchDialog="switchDialog" reportName="生产订单-领料明细" :reportId="form.ordNo"
|
|
|
@onClose="onClose()"></report-dialog>
|
|
|
</div>
|
|
|
|
|
|
@@ -138,10 +159,11 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getDetail, submit, itemsRemove, confirmPicking, revokePicking } from "@/api/tirePartsMall/productionManagement/productionPicking";
|
|
|
+import { getDetail, submit, itemsRemove, confirmPicking, revokePicking, confirm, revokeConfirm } from "@/api/tirePartsMall/productionManagement/productionPicking";
|
|
|
import {
|
|
|
goodsPageXs,
|
|
|
} from "@/api/tirePartsMall/salesManagement/saleOrder";
|
|
|
+import { getList } from "@/api/tirePartsMall/basicData/commodityInformation"
|
|
|
import { dotList, goodsDetail } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
|
|
|
import reportDialog from "@/components/report-dialog/main";
|
|
|
import { dateFormat } from "@/util/date";
|
|
|
@@ -162,11 +184,14 @@ import {
|
|
|
} from "@/api/tirePartsMall/basicData/customerInformation";
|
|
|
import { getToken } from "@/util/auth";
|
|
|
import { isProcurement } from "@/api/basicData/configuration";
|
|
|
+import { getList as inventoryList } from "@/api/tirePartsMall/inventory";
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
|
|
|
|
data() {
|
|
|
return {
|
|
|
+ roleName: localStorage.getItem("roleName"),
|
|
|
+ inventoryData2: [],
|
|
|
sharedCompany: null,
|
|
|
distributeVisible: false,
|
|
|
numberDecimal: 0,
|
|
|
@@ -328,6 +353,32 @@ export default {
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
+ inventoryOption2: {
|
|
|
+ header: false,
|
|
|
+ menu: true,
|
|
|
+ menuWidth: 90,
|
|
|
+ editBtn: false,
|
|
|
+ delBtn: false,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: '商品名称',
|
|
|
+ prop: 'cname',
|
|
|
+ overHidden: true,
|
|
|
+ }, {
|
|
|
+ label: '仓库',
|
|
|
+ prop: 'storageName',
|
|
|
+ overHidden: true,
|
|
|
+ }, {
|
|
|
+ label: '库存数量',
|
|
|
+ prop: 'balanceQuantity',
|
|
|
+ overHidden: true,
|
|
|
+ }, {
|
|
|
+ label: '批次号',
|
|
|
+ prop: 'dot',
|
|
|
+ overHidden: true,
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
loading: false,
|
|
|
// 商品列表数据合计
|
|
|
goodsListShow: [],
|
|
|
@@ -488,7 +539,11 @@ export default {
|
|
|
},
|
|
|
dicUrl: '/api/blade-sales-part/productionPicking/selectPicking?statusName=生产中&bizTypeName=SCDD&ordNo={{key}}'
|
|
|
},
|
|
|
-
|
|
|
+ {
|
|
|
+ label: '商品名称',
|
|
|
+ prop: "goodsName",
|
|
|
+ disabled: true
|
|
|
+ },
|
|
|
{
|
|
|
label: '配送方式',
|
|
|
prop: "shipType",
|
|
|
@@ -560,7 +615,7 @@ export default {
|
|
|
dialogTop: 25,
|
|
|
dialogWidth: "80%",
|
|
|
showSummary: true,
|
|
|
- tip:false,
|
|
|
+ tip: false,
|
|
|
selection: true,
|
|
|
saveBtn: false, // 表格弹窗保存按钮
|
|
|
cellBtn: false, // 行编辑
|
|
|
@@ -568,10 +623,8 @@ export default {
|
|
|
{
|
|
|
name: 'goodsNum',
|
|
|
type: 'sum',
|
|
|
- }, {
|
|
|
- name: 'sendNum',
|
|
|
- type: 'sum',
|
|
|
- }],
|
|
|
+ }
|
|
|
+ ],
|
|
|
column: [
|
|
|
{
|
|
|
label: '商品名称',
|
|
|
@@ -664,31 +717,8 @@ export default {
|
|
|
if (name == 'customerName') {
|
|
|
if (row) {
|
|
|
this.$set(this.form, 'customerId', row.id)
|
|
|
- getCustom({ id: row.id }).then(res => {
|
|
|
- if (res.data.data) {
|
|
|
- this.dicUrlWithCustomId = res.data.data.id ? res.data.data.id : ''
|
|
|
- this.form.storageId = res.data.data.deliveryWarehouseId
|
|
|
- this.form.storageName = res.data.data.deliveryWarehouseName
|
|
|
- this.form.contacts = res.data.data.corpsAttnList[0].cname
|
|
|
- this.form.phone = res.data.data.corpsAttnList[0].tel
|
|
|
- this.contactsOption = res.data.data.corpsAddrList
|
|
|
- this.form.recAddress = res.data.data.corpsAddrList[0].belongtoarea + res.data.data.corpsAddrList[0].detailedAddress
|
|
|
- this.form.salerId = res.data.data.salesmanId
|
|
|
- this.form.salerName = res.data.data.salesmanName
|
|
|
- }
|
|
|
- })
|
|
|
} else {
|
|
|
- this.form.customerId = ''
|
|
|
- this.form.customerName = ''
|
|
|
- this.dicUrlWithCustomId = ''
|
|
|
- this.form.storageId = ''
|
|
|
- this.form.contacts = ''
|
|
|
- this.form.phone = ''
|
|
|
- this.contactsOption = ''
|
|
|
- this.form.recAddress = ''
|
|
|
- this.form.salerId = ''
|
|
|
- this.form.salerName = ''
|
|
|
- this.form.storageName = ''
|
|
|
+ this.form.customerId = null
|
|
|
}
|
|
|
}
|
|
|
if (name == 'sharedCompany') {
|
|
|
@@ -815,6 +845,19 @@ export default {
|
|
|
removeStagList(row, index, type) {
|
|
|
this.goodsListSave.splice(row.$index, 1)
|
|
|
},
|
|
|
+ viewInventory2() {
|
|
|
+ inventoryList({ cname: this.selectionMultilist[0].goodsName }).then(res => [
|
|
|
+ this.inventoryData2 = res.data.data.records
|
|
|
+ ])
|
|
|
+ },
|
|
|
+ synchronous(row) {
|
|
|
+ this.form.shipItemsList.forEach(e => {
|
|
|
+ if (e.goodsName == this.selectionMultilist[0].goodsName) {
|
|
|
+ e.inventory = row.balanceQuantity
|
|
|
+ e.dot = row.dot
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
//确认导入触发
|
|
|
importGoods() {
|
|
|
if (this.goodsListSave.length == 0) {
|
|
|
@@ -865,7 +908,7 @@ export default {
|
|
|
//导入商品弹窗列表查询
|
|
|
onLoad(page, params = {}) {
|
|
|
this.loading = true;
|
|
|
- goodsPageXs({
|
|
|
+ getList({
|
|
|
current: page.currentPage,
|
|
|
size: page.pageSize,
|
|
|
customId: this.form.customerId,
|
|
|
@@ -921,6 +964,7 @@ export default {
|
|
|
})
|
|
|
getDetail({ id: id }).then(res => {
|
|
|
this.form = res.data.data
|
|
|
+ this.$refs.formContacts.refreshTable();
|
|
|
}).finally(() => {
|
|
|
loading.close();
|
|
|
})
|
|
|
@@ -948,6 +992,52 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ confirm() {
|
|
|
+ this.$confirm("是否确认?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ confirm({ id: this.form.id }).then(res => {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.getDetails(res.data.data.id)
|
|
|
+ this.editButton = true
|
|
|
+ this.editDisabled = true
|
|
|
+ this.optionForm.disabled = true
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ revokeConfirm() {
|
|
|
+ this.$confirm("是否撤销确认?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ revokeConfirm({ id: this.form.id }).then(res => {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.getDetails(res.data.data.id)
|
|
|
+ this.editButton = true
|
|
|
+ this.editDisabled = true
|
|
|
+ this.optionForm.disabled = true
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
revokePicking() {
|
|
|
this.$confirm("是否撤销领料?", {
|
|
|
confirmButtonText: "确定",
|