作者 lixiang

1、修改入库记录功能

2、修改出库记录功能
3、修改不良品库,增加退换货功能
4、新增入库、出库功能,修改库存明细
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="12">
<a-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="meterialCode">
<a-input
v-model="model.meterialCode"
placeholder="请输入物料编码"
readonly
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="合同/订单号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hth">
<a-input-search
v-model="model.hth"
placeholder="请输入合同/订单号"
@search="searchHth"
/>
</a-form-model-item>
</a-col>
<!-- <a-col :span="1">-->
<!-- <a >查询</a>-->
<!-- </a-col>-->
<a-col :span="12">
<a-form-model-item label="物料长描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="meterialReview">
<a-input
v-model="model.meterialReview"
placeholder="请输入物料长描述"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="物流单号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="wldh">
<a-input
v-model="model.wldh"
placeholder="请输入物流单号"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unit">
<a-input
v-model="model.unit"
placeholder="请输入单位"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="是否在途" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="iszt">
<a-select
ref="select"
v-model:value="model.iszt"
>
<a-select-option value="1">在途</a-select-option>
<a-select-option value="2">到库</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="供货商名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cs">
<a-input
v-model="model.cs"
placeholder="请输入供货商名称"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brand">
<a-input
v-model="model.brand"
placeholder="请输入品牌"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="仓库" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="warehouse">
<a-input
v-model="model.warehouse"
placeholder="请输入仓库"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="入库数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="rksl">
<a-input
v-model="model.rksl"
placeholder="请输入入库数量"
@blur="changeRksl(model.rksl)"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="采购员" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator">
<a-input
v-model="model.operator"
placeholder="请输入采购员"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="不良品数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="blpsl">
<a-input type="number"
v-model="model.blpsl"
placeholder="请输入不良品数量"
@blur="changeBlpsl(model.blpsl)"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="异常原因" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ycyy">
<a-input
v-model="model.ycyy"
placeholder="请输入异常原因"
></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction, selectUp } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TblTradInventoryIn',
components: {},
props: {
materialCode: String, //物料编码
meterialReview: String, //物料长描述
unit: String, //计量单位
brand: String, //品牌
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false,
},
},
data() {
return {
url:{
searchHth: '/trade/tblTradeBidSub/queryHtInfoByHthAndWlbm'
},
model: {
iszt: '1',
operator: this.$store.state.user.info.realname,
blpsl: 0,
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
validatorRules: {
meterialCode: [{ required: true, message: '请输入物料编码!' },],
hth: [{ required: true, message: '请输入合同/订单号!' },],
meterialReview: [{ required: true, message: '请输入物料长描述!' },],
wldh: [{ required: true, message: '请输入物流单号!' },],
unit: [{ required: true, message: '请输入单位!' },],
iszt: [{ required: true, message: '请选择是否在途!' },],
cs: [{ required: true, message: '请输入供货商名称!' },],
brand: [{ required: true, message: '请输入品牌!' },],
warehouse: [{ required: true, message: '请输入仓库!' },],
rksl: [{ required: true, message: '请输入入库数量!' },],
operator: [{ required: true, message: '请输入采购员!' },],
},
confirmLoading: false,
}
},
computed: {
formDisabled() {
return this.disabled
},
},
created() {
this.model.meterialCode = this.materialCode
this.model.meterialReview = this.meterialReview
this.model.unit = this.unit
this.model.brand = this.brand
},
methods: {
changeRksl(rksl){
console.log(" this.model.sl", this.model.sl)
console.log(" rksl", rksl)
if (rksl < 0 ){
this.$message.error("请输入正确的入库数量")
return
}
this.model.blpsl = this.model.sl-rksl
},
changeBlpsl(blpsl){
if (!this.model.hth){
this.$message.error("请先查询合同/订单号信息")
}
if (blpsl < 0){
this.$message.error("请输入正确的不良品数量")
}
//如果不良品数量大于0,增加对不良品的规则校验
console.log("this.model.sl",this.model.sl)
if (blpsl < this.model.sl){
if (!this.model.ycyy){
this.$message.error("请输入异常原因")
}
}
},
searchHth(){
getAction(this.url.searchHth,{
hth: this.model.hth,
wlbm: this.materialCode
}).then(res=>{
if (res.success){
// console.log(this.$store.state.user.info.realname)
this.$set(this.model, "wldh", res.result.wldh);
this.$set(this.model, "cs", res.result.cs);
this.$set(this.model, "rksl", res.result.sl);
this.$set(this.model, "sl", res.result.sl);
// this.$set(this.model, "operator", this.$store.state.user.info.realname);
}
})
console.log('根据订单号查询订单信息')
}
},
}
</script>
\ No newline at end of file
... ...
... ... @@ -28,10 +28,10 @@
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">-->
<!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项-->
<!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>-->
<!-- </div>-->
<a-table
ref="table"
... ... @@ -43,7 +43,6 @@
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
... ... @@ -68,28 +67,66 @@
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a @click="exchange(record)">退换货</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<tbl-trade-inventory-defective-product-modal ref="modalForm" @ok="modalFormOk"></tbl-trade-inventory-defective-product-modal>
<j-modal
:title="title"
:width="width"
:visible="visibleInfo"
switchFullscreen
@ok="handleOkInfoIn"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancelInfoIn"
cancelText="关闭">
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="退/换货" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="thFlag">
<a-radio-group v-model="model.thFlag" >
<a-radio :value="1">
退货
</a-radio>
<a-radio :value="2">
换货
</a-radio>
</a-radio-group>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="退换货单号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="thNum">
<a-input
v-model="model.thNum"
placeholder="请输入退换货单号"
></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</j-modal>
</a-card>
</template>
... ... @@ -99,6 +136,7 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TblTradeInventoryDefectiveProductModal from './modules/TblTradeInventoryDefectiveProductModal'
import { postAction } from '@api/manage'
export default {
name: 'TblTradeInventoryDefectiveProductList',
... ... @@ -108,21 +146,45 @@
},
data () {
return {
validatorRules:{
thFlag: [
{ required: true, message: '请选择退/换货', trigger: 'change' }
],
thNum: [
{ required: true, message: '请输入退换货单号', trigger: 'blur' }
]
},
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
disableSubmit: false,
title: '退换货',
width: 896,
visibleInfo: false,
description: '不良品库管理页面',
// 表头
columns: [
// {
// title: '#',
// dataIndex: '',
// key:'rowIndex',
// width:60,
// align:"center",
// customRender:function (t,r,index) {
// return parseInt(index)+1;
// }
// },
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'单号',
title:'不良品单号',
align:"center",
dataIndex: 'waybillNum'
},
... ... @@ -132,12 +194,12 @@
dataIndex: 'materialCode'
},
{
title:'物料描述',
title:'物料描述',
align:"center",
dataIndex: 'materialDescription'
},
{
title:'计量单位',
title:'单位',
align:"center",
dataIndex: 'measurementUnit'
},
... ... @@ -147,27 +209,45 @@
dataIndex: 'brand'
},
{
title:'实际库存量',
title:'不良品数量',
align:"center",
dataIndex: 'actualInventory'
dataIndex: 'blpsl'
},
{
title:'出库数量',
title:'异常原因',
align:"center",
dataIndex: 'outboundQuantity'
dataIndex: 'ycyy',
customRender: function (text) {
var str = '';
if(text === 1){
str = '来料不良';
}else if(text === 2){
str = '货损';
}else if(text === 3){
str = '来料少件';
}else if(text === 4){
str = '发错货';
}
return str;
},
},
{
title:'操作时间',
align:"center",
dataIndex: 'createTime'
},
{
title:'操作人',
align:"center",
dataIndex: 'operator'
dataIndex: 'createBy'
},
{
title:'合同单号/快递单号',
title:'供应商合同号/订单号',
align:"center",
dataIndex: 'expressDeliveryNumber'
},
{
title:'交货合同编号',
title:'中标合同编号',
align:"center",
dataIndex: 'deliveryContractNumber'
},
... ... @@ -181,21 +261,32 @@
align:"center",
dataIndex: 'warehouse'
},
{
title:'销售员',
title:'销售员',
align:"center",
dataIndex: 'salesman'
},
{
title:'审核人',
title:'退/换货',
align:"center",
dataIndex: 'reviewer'
dataIndex: 'thFlag',
customRender: function (text) {
var str = '';
if(text === 1){
str = '退货';
}else if(text === 2){
str = '换货';
}
return str;
},
},
{
title:'合同单号/快递单号(退换)',
title:'退换货单号',
align:"center",
dataIndex: 'exchangeExpressDeliveryNumber'
dataIndex: 'thNum'
},
{
title: '操作',
dataIndex: 'action',
... ... @@ -207,6 +298,7 @@
],
url: {
list: "/trade/tblTradeInventoryDefectiveProduct/list",
edit: "/trade/tblTradeInventoryDefectiveProduct/edit",
delete: "/trade/tblTradeInventoryDefectiveProduct/delete",
deleteBatch: "/trade/tblTradeInventoryDefectiveProduct/deleteBatch",
exportXlsUrl: "/trade/tblTradeInventoryDefectiveProduct/exportXls",
... ... @@ -221,11 +313,38 @@
this.getSuperFieldList();
},
computed: {
formDisabled(){
return this.disabled
},
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
handleCancelInfoIn(){
this.visibleInfo = false
},
handleOkInfoIn(){
postAction(this.url.edit,{
id: this.model.id,
thFlag:this.model.thFlag,
thNum:this.model.thNum
}).then(res=>{
if(res.success){
this.$message.success('操作成功')
this.searchQuery();
}else{
this.$message.error(res.message)
}
})
this.visibleInfo = false
},
exchange(record){
this.model.id = record.id;
this.$set(this.model, "thFlag", record.thFlag);
this.$set(this.model, "thNum", record.thNum);
this.visibleInfo = true
},
initDictConfig(){
},
getSuperFieldList(){
... ...
... ... @@ -173,7 +173,12 @@
},
{
title:'合同单号/快递单号',
title:'合同单号/订单号',
align:"center",
dataIndex: 'deliveryContractNumber'
},
{
title:'物流单号',
align:"center",
dataIndex: 'expressDeliveryNumber'
},
... ... @@ -197,11 +202,11 @@
align:"center",
dataIndex: 'warehouse'
},
{
title:'审核人',
align:"center",
dataIndex: 'reviewer'
},
// {
// title:'审核人',
// align:"center",
// dataIndex: 'reviewer'
// },
// {
// title:'出库/入库',
// align:"center",
... ... @@ -240,6 +245,12 @@
},
},
methods: {
searchReset(){
this.queryParam = {}
this.getSuperFieldList();
this.queryParam.type='入库'
this.searchQuery(this.queryParam)
},
initDictConfig(){
},
getSuperFieldList(){
... ...
... ... @@ -140,6 +140,11 @@
// }
// },
{
title:'入库/出库单号',
align:"center",
dataIndex: 'waybillNum'
},
{
title:'物料编码',
align:"center",
dataIndex: 'materialCode'
... ...
... ... @@ -13,10 +13,10 @@
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
<!-- <a @click="handleToggleSearch" style="margin-left: 8px">-->
<!-- {{ toggleSearchStatus ? '收起' : '展开' }}-->
<!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
<!-- </a>-->
</span>
</a-col>
</a-row>
... ... @@ -85,22 +85,9 @@
</template>
<span slot="action" slot-scope="text, record">
<!-- <a @click="handleEdit(record)">库存明细</a> -->
<a @click="handleInventoryInfoIn(record)">入库</a> &nbsp
<a @click="handleInventoryInfoOut(record)">出库</a> &nbsp
<a @click="handleInventoryInfo(record)">库存明细</a>
<!-- <a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown> -->
</span>
</a-table>
... ... @@ -138,19 +125,293 @@
@ok="handleCancelDefective"
@cancel="handleCancelDefective"
cancelText="关闭">
<TblTradeInventoryDefectiveProductList></TblTradeInventoryDefectiveProductList>
<TblTradeInventoryDefectiveProductList ></TblTradeInventoryDefectiveProductList>
</j-modal>
<j-modal
title="库存明细"
:width="width"
:width="kcmxWidth"
:visible="visibleInfo"
@ok="handleCancelInfo"
@cancel="handleCancelInfo"
cancelText="关闭">
<TblTradeInventoryInfoList :materialCode="materialCode"></TblTradeInventoryInfoList>
<TblTradeInventoryInfoList :materialCode="meterialCode"></TblTradeInventoryInfoList>
</j-modal>
<!-- <j-modal-->
<!-- -->
<!-- title="入库"-->
<!-- :width="width"-->
<!-- :visible="visibleInfoIn"-->
<!-- @ok="handleCancelInfo"-->
<!-- @cancel="handleCancelInfoIn"-->
<!-- cancelText="关闭">-->
<!-- <TblTradInventoryIn ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></TblTradInventoryIn>-->
<!-- </j-modal>-->
<j-modal
:title="title"
:width="width"
:visible="visibleInfoIn"
switchFullscreen
@ok="handleOkInfoIn"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancelInfoIn"
cancelText="关闭">
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="12">
<a-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="meterialCode">
<a-input
v-model="model.meterialCode"
placeholder="请输入物料编码"
disabled="disabled"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="合同/订单号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hth">
<a-input-search
v-model="model.hth"
placeholder="请输入合同/订单号"
@search="searchHth"
/>
</a-form-model-item>
</a-col>
<!-- <a-col :span="1">-->
<!-- <a >查询</a>-->
<!-- </a-col>-->
<a-col :span="12">
<a-form-model-item label="物料长描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="meterialReview">
<a-input
v-model="model.meterialReview"
placeholder="请输入物料长描述"
disabled="disabled"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="物流单号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="wldh">
<a-input
v-model="model.wldh"
placeholder="请输入物流单号"
disabled="disabled"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unit">
<a-input
v-model="model.unit"
placeholder="请输入单位"
disabled="disabled"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="供货商名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cs">
<a-input
v-model="model.cs"
placeholder="请输入供货商名称"
disabled="disabled"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brand">
<a-input
v-model="model.brand"
placeholder="请输入品牌"
disabled="disabled"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="仓库" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="warehouse">
<a-input
v-model="model.warehouse"
placeholder="请输入仓库"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="入库数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="rksl">
<a-input
v-model="model.rksl"
placeholder="请输入入库数量"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="采购员" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator">
<a-input
v-model="model.operator"
placeholder="请输入采购员"
></a-input>
</a-form-model-item>
</a-col>
<!-- <a-col :span="12">-->
<!-- <a-form-model-item label="不良品数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="blpsl">-->
<!-- <a-input type="number"-->
<!-- v-model="model.blpsl"-->
<!-- placeholder="请输入不良品数量"-->
<!-- ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="12">-->
<!-- <a-form-model-item label="异常原因" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="iszt">-->
<!-- <a-select-->
<!-- ref="select"-->
<!-- v-model:value="model.ycyy"-->
<!-- >-->
<!-- <a-select-option value="1">来料不良</a-select-option>-->
<!-- <a-select-option value="2">货损</a-select-option>-->
<!-- <a-select-option value="3">来料少件</a-select-option>-->
<!-- <a-select-option value="4">发错货</a-select-option>-->
<!-- </a-select>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</j-modal>
<!-- 出库表单-->
<j-modal
:title="titleOut"
:width="width"
:visible="visibleInfoOut"
switchFullscreen
@ok="handleOkInfoOut"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancelInfoOut"
cancelText="关闭">
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model2" :rules="validatorOutRules" slot="detail">
<a-row>
<a-col :span="12">
<a-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="meterialCode">
<a-input
v-model="model2.meterialCode"
placeholder="请输入物料编码"
disabled="disabled"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="供应商合同号/订单号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="expressDeliveryNumber">
<a-input
v-model="model2.expressDeliveryNumber"
placeholder="请输入供应商合同号/订单号"
/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="物料长描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="meterialReview">
<a-input
v-model="model2.meterialReview"
placeholder="请输入物料长描述"
disabled="disabled"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="中标合同编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryContractNumber">
<a-input
v-model="model2.deliveryContractNumber"
placeholder="请输入中标合同编号"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unit">
<a-input
v-model="model2.unit"
placeholder="请输入单位"
disabled="disabled"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="需求单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="demandUnit">
<a-input
v-model="model2.demandUnit"
placeholder="请输入需求单位"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brand">
<a-input
v-model="model2.brand"
placeholder="请输入品牌"
disabled="disabled"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="仓库" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="warehouse">
<a-input
v-model="model2.warehouse"
placeholder="请输入仓库"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="出库数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outboundQuantity">
<a-input
v-model="model2.outboundQuantity"
placeholder="请输入出库数量"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="销售员" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="salesman">
<a-input
v-model="model2.salesman"
placeholder="请输入销售员"
></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</j-modal>
</a-card>
</template>
... ... @@ -164,18 +425,26 @@
import TblTradeInventoryOutList from './TblTradeInventoryOutList.vue'
import TblTradeInventoryDefectiveProductList from './TblTradeInventoryDefectiveProductList.vue'
import TblTradeInventoryInfoList from './TblTradeInventoryInfoList.vue'
import TblTradInventoryIn from './TblTradInventoryIn.vue'
import TblTradBaseForm from '@views/trad/modules/base/TblTradBaseForm.vue'
import { getAction, postAction } from '@api/manage'
export default {
name: 'TblTradeInventoryList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TblTradBaseForm,
TblTradeInventoryModal,
TblTradeInventoryInList,
TblTradeInventoryOutList,
TblTradeInventoryDefectiveProductList,
TblTradeInventoryInfoList,
TblTradInventoryIn
},
data () {
return {
confirmLoading: false,
description: '贸易库存表管理页面',
// 表头
columns: [
... ... @@ -192,17 +461,17 @@
{
title:'物料编码',
align:"center",
dataIndex: 'materialCode'
dataIndex: 'meterialCode'
},
{
title:'物料长描述',
align:"center",
dataIndex: 'materialDescription'
dataIndex: 'meterialReview'
},
{
title:'计量单位',
align:"center",
dataIndex: 'measurementUnit'
dataIndex: 'unit'
},
{
title:'品牌',
... ... @@ -224,21 +493,21 @@
align:"center",
dataIndex: 'totalQuantity'
},
{
title:'单价(不含税,元)',
align:"center",
dataIndex: 'unitPrice'
},
{
title:'税率(%)',
align:"center",
dataIndex: 'taxRate'
},
{
title:'总价(不含税,元)',
align:"center",
dataIndex: 'totalPrice'
},
// {
// title:'单价(不含税,元)',
// align:"center",
// dataIndex: 'unitPrice'
// },
// {
// title:'税率(%)',
// align:"center",
// dataIndex: 'taxRate'
// },
// {
// title:'总价(不含税,元)',
// align:"center",
// dataIndex: 'totalPrice'
// },
{
title:'首次入库时间',
align:"center",
... ... @@ -270,6 +539,9 @@
}
],
url: {
out: '/trade/tblTradeInventory/out',
searchHth: '/trade/tblTradeBidSub/queryHtInfoByHthAndWlbm',
store: '/trade/tblTradeInventory/add',
list: "/trade/tblTradeInventory/list",
delete: "/trade/tblTradeInventory/delete",
deleteBatch: "/trade/tblTradeInventory/deleteBatch",
... ... @@ -279,24 +551,99 @@
},
dictOptions:{},
superFieldList:[],
model: {
iszt: '1',
// operator: this.$store.state.user.info.realname,
blpsl: 0,
},
model2: {
materialCode:'',
},
meterialCode:'',
meterialReview:'',
unit:'',
brand:'',
width:896,
kcmxWidth: 1000,
visible:false,
visibleOut:false,
visibleDefective:false,
visibleInfo:false,
visibleInfoIn:false,
visibleInfoOut:false,
disableSubmit: false,
title: '入库',
titleOut: '出库',
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
validatorRules: {
meterialCode: [{ required: true, message: '请输入物料编码!' },],
hth: [{ required: true, message: '请输入合同/订单号!' },],
meterialReview: [{ required: true, message: '请输入物料长描述!' },],
wldh: [{ required: true, message: '请输入物流单号!' },],
unit: [{ required: true, message: '请输入单位!' },],
// iszt: [{ required: true, message: '请选择是否在途!' },],
cs: [{ required: true, message: '请输入供货商名称!' },],
brand: [{ required: true, message: '请输入品牌!' },],
warehouse: [{ required: true, message: '请输入仓库!' },],
rksl: [{ required: true, message: '请输入入库数量!' },],
operator: [{ required: true, message: '请输入采购员!' },],
},
validatorOutRules: {
meterialCode: [{ required: true, message: '请输入物料编码!' },],
expressDeliveryNumber: [{ required: true, message: '请输入供应商合同号/订单号!' },],
meterialReview: [{ required: true, message: '请输入物料长描述!' },],
deliveryContractNumber: [{ required: true, message: '请输入中标合同编号!' },],
unit: [{ required: true, message: '请输入单位!' },],
demandUnit: [{ required: true, message: '请输入需求单位!' },],
brand: [{ required: true, message: '请输入品牌!' },],
warehouse: [{ required: true, message: '请输入仓库!' },],
outboundQuantity: [{ required: true, message: '请输入出库数量!' },],
salesman: [{ required: true, message: '请输入销售员!' },],
},
}
},
created() {
this.getSuperFieldList();
},
computed: {
formDisabled() {
return this.disabled
},
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
searchHth(){
getAction(this.url.searchHth,{
hth: this.model.hth,
wlbm: this.model.meterialCode
}).then(res=>{
if (res.success){
if (res.result.sl == null || res.result.cs == null || res.result.wldh == null){
// this.model = {
// iszt: '1',
// operator: this.$store.state.user.info.realname,
// blpsl: 0,
// }
this.$message.error("未查询到订单信息!")
}else {
this.$set(this.model, "wldh", res.result.wldh);
this.$set(this.model, "cs", res.result.cs);
this.$set(this.model, "rksl", res.result.sl);
this.$set(this.model, "sl", res.result.sl);
this.$message.success("查询订单信息成功!")
}
}
})
},
handleInventoryIn(){
this.visible = true;
},
... ... @@ -307,10 +654,29 @@
this.visibleDefective = true;
},
handleInventoryInfo(recode){
this.materialCode = recode.materialCode;
this.meterialCode = recode.meterialCode;
this.visibleInfo = true;
},
handleInventoryInfoIn(recode){
this.model = {}
console.log(recode)
this.model.meterialCode = recode.meterialCode;
this.model.meterialReview = recode.meterialReview;
this.model.unit = recode.unit;
this.model.brand = recode.brand;
this.visibleInfoIn = true;
},
handleInventoryInfoOut(recode){
this.model2= {}
console.log("..............",recode)
this.model2.meterialCode = recode.meterialCode;
this.model2.meterialReview = recode.meterialReview;
this.model2.unit = recode.unit;
this.model2.brand = recode.brand;
this.visibleInfoOut = true;
},
handleCancel(){
this.searchQuery();
this.visible = false;
},
handleCancelOut(){
... ... @@ -322,20 +688,95 @@
handleCancelInfo(){
this.visibleInfo = false;
},
// 出库页面确认
handleOkInfoOut(){
this.model2.materialCode = this.model2.meterialCode
this.model2.materialDescription = this.model2.meterialReview
this.model2.measurementUnit = this.model2.unit
postAction(this.url.out,this.model2).then(res=>{
if (res.success){
this.$message.success("提交成功")
}else{
this.$message.error(res.message)
}
})
console.log("11111111111111111111111")
this.searchQuery();
console.log("222222222222222222")
this.visibleInfoOut = false
},
// 关闭出库页面
handleCancelInfoOut(){
this.searchQuery();
this.visibleInfoOut = false
}
,
handleOkInfoIn(){
this.$refs.form.validate((valid) => {
if (valid){
postAction(this.url.store,{
materialCode: this.model.meterialCode, //物料编码
materialDescription: this.model.meterialReview, //长描述
measurementUnit: this.model.unit, //单位
brand: this.model.brand,//品牌
hth: this.model.hth, //合同号
wldh: this.model.wldh, //物流单号
warehouse: this.model.warehouse, //仓库
operator: this.model.operator, //采购员
rksl: this.model.rksl, //入库数量
cs: this.model.cs, //厂商
}).then(res=>{
if (res.success){
this.$message.success("提交成功")
}else {
this.$message.error(res.message)
}
})
console.log("提交表单内容")
this.visibleInfoIn = false
}
})
console.log("33333")
this.loadData(1);
this.searchQuery();
console.log("4444")
},
handleCancelInfoIn(){
this.visibleInfoIn = false
this.model = {}
this.model = {
iszt: '1',
operator: this.$store.state.user.info.realname,
blpsl: 0,
}
this.searchQuery();
},
initDictConfig(){
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'materialCode',text:'物料编码',dictCode:''})
fieldList.push({type:'string',value:'materialDescription',text:'物料描述',dictCode:''})
fieldList.push({type:'string',value:'measurementUnit',text:'计量单位',dictCode:''})
fieldList.push({type:'string',value:'meterialCode',text:'物料编码',dictCode:''})
fieldList.push({type:'string',value:'meterialReview',text:'物料长描述',dictCode:''})
fieldList.push({type:'string',value:'unit',text:'单位',dictCode:''})
fieldList.push({type:'string',value:'brand',text:'品牌',dictCode:''})
fieldList.push({type:'int',value:'actualInventory',text:'实际库存量',dictCode:''})
fieldList.push({type:'int',value:'quantityInTransit',text:'在途数量',dictCode:''})
fieldList.push({type:'int',value:'totalQuantity',text:'总数量',dictCode:''})
fieldList.push({type:'BigDecimal',value:'unitPrice',text:'单价(不含税,元)',dictCode:''})
fieldList.push({type:'string',value:'taxRate',text:'税率(%)',dictCode:''})
fieldList.push({type:'BigDecimal',value:'totalPrice',text:'总价(不含税,元)',dictCode:''})
// fieldList.push({type:'BigDecimal',value:'unitPrice',text:'单价(不含税,元)',dictCode:''})
// fieldList.push({type:'string',value:'taxRate',text:'税率(%)',dictCode:''})
// fieldList.push({type:'BigDecimal',value:'totalPrice',text:'总价(不含税,元)',dictCode:''})
fieldList.push({type:'date',value:'firstStorageTime',text:'首次入库时间'})
fieldList.push({type:'date',value:'lastOutboundTime',text:'最后一次出库时间'})
fieldList.push({type:'string',value:'daysInStock',text:'在库天数',dictCode:''})
... ...
... ... @@ -13,10 +13,10 @@
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
<!-- <a @click="handleToggleSearch" style="margin-left: 8px">-->
<!-- {{ toggleSearchStatus ? '收起' : '展开' }}-->
<!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
<!-- </a>-->
</span>
</a-col>
</a-row>
... ... @@ -132,7 +132,7 @@
// }
// },
{
title:'单号',
title:'出库单号',
align:"center",
dataIndex: 'waybillNum'
},
... ... @@ -147,7 +147,7 @@
dataIndex: 'materialDescription'
},
{
title:'计量单位',
title:'单位',
align:"center",
dataIndex: 'measurementUnit'
},
... ... @@ -167,17 +167,22 @@
dataIndex: 'inventoryQuantity'
},
{
title:'出库时间',
align:"center",
dataIndex: 'createTime'
},
{
title:'操作人',
align:"center",
dataIndex: 'createBy'
},
{
title:'合同单号/快递单号',
title:'供应商合同号/订单号',
align:"center",
dataIndex: 'expressDeliveryNumber'
},
{
title:'交货合同编号',
title:'中标合同编号',
align:"center",
dataIndex: 'deliveryContractNumber'
},
... ... @@ -187,38 +192,15 @@
dataIndex: 'demandUnit'
},
{
title:'时间日期',
align:"center",
dataIndex: 'createTime'
},
{
title:'销售',
align:"center",
dataIndex: 'operator'
},
{
title:'仓库',
align:"center",
dataIndex: 'warehouse'
},
{
title:'审核人',
title:'销售员',
align:"center",
dataIndex: 'reviewer'
},
// {
// title:'出库/入库',
// align:"center",
// dataIndex: 'type'
// },
// {
// title: '操作',
// dataIndex: 'action',
// align:"center",
// fixed:"right",
// width:147,
// scopedSlots: { customRender: 'action' }
// }
dataIndex: 'salesman'
}
],
url: {
list: "/trade/tblTradeInventoryIn/list",
... ... @@ -244,6 +226,12 @@
},
},
methods: {
searchReset(){
this.queryParam = {
type : '出库'
};
this.searchQuery(this.queryParam)
},
initDictConfig(){
},
getSuperFieldList(){
... ...
... ... @@ -3,81 +3,81 @@
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="12">
<a-form-model-item label="单号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="waybillNum">
<a-input v-model="model.waybillNum" placeholder="请输入单号" ></a-input>
</a-form-model-item>
</a-col>
<!-- <a-col :span="12">-->
<!-- <a-form-model-item label="单号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="waybillNum">-->
<!-- <a-input v-model="model.waybillNum" placeholder="请输入单号" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="12">
<a-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialCode">
<a-input v-model="model.materialCode" placeholder="请输入物料编码" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="物料描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialDescription">
<a-input v-model="model.materialDescription" placeholder="请输入物料描述" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="计量单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="measurementUnit">
<a-input v-model="model.measurementUnit" placeholder="请输入计量单位" ></a-input>
<a-input-search
v-model="model.materialCode" placeholder="请输入物料编码"
@search="searchMaterialCode"
></a-input-search>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brand">
<a-input v-model="model.brand" placeholder="请输入品牌" ></a-input>
<a-form-model-item label="供应商合同号/订单号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="expressDeliveryNumber">
<a-input v-model="model.expressDeliveryNumber" placeholder="请输入供应商合同号/订单号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="实际库存量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="actualInventory">
<a-input v-model="model.actualInventory" placeholder="请输入实际库存量" ></a-input>
<a-form-model-item label="物料长描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialDescription">
<a-input v-model="model.materialDescription" placeholder="请输入物料长描述" disabled="disabled"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="出库数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outboundQuantity">
<a-input v-model="model.outboundQuantity" placeholder="请输入出库数量" ></a-input>
<a-form-model-item label="中标合同编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryContractNumber">
<a-input v-model="model.deliveryContractNumber" placeholder="请输入中标合同编号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="操作人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator">
<a-input v-model="model.operator" placeholder="请输入操作人" ></a-input>
<a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="measurementUnit">
<a-input v-model="model.measurementUnit" placeholder="请输入单位" disabled="disabled"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="合同单号/快递单号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="expressDeliveryNumber">
<a-input v-model="model.expressDeliveryNumber" placeholder="请输入合同单号/快递单号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="交货合同编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryContractNumber">
<a-input v-model="model.deliveryContractNumber" placeholder="请输入交货合同编号" ></a-input>
<a-form-model-item label="需求单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="demandUnit">
<a-input v-model="model.demandUnit" placeholder="请输入需求单位" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="需求单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="demandUnit">
<a-input v-model="model.demandUnit" placeholder="请输入需求单位" ></a-input>
<a-form-model-item label="品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brand">
<a-input v-model="model.brand" placeholder="请输入品牌" disabled="disabled" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="仓库" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="warehouse">
<a-input v-model="model.warehouse" placeholder="请输入仓库" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="销售人员" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="salesman">
<a-input v-model="model.salesman" placeholder="请输入销售人员" ></a-input>
<a-form-model-item label="不良品数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="blpsl">
<a-input v-model="model.blpsl" placeholder="请输入不良品数量" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="审核人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="reviewer">
<a-input v-model="model.reviewer" placeholder="请输入审核人" ></a-input>
<a-form-model-item label="销售员" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="salesman">
<a-input v-model="model.salesman" placeholder="请输入销售员" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="合同单号/快递单号(退换)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="exchangeExpressDeliveryNumber">
<a-input v-model="model.exchangeExpressDeliveryNumber" placeholder="请输入合同单号/快递单号(退换)" ></a-input>
<a-form-model-item label="异常原因" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ycyy">
<a-select
ref="select"
v-model:value="model.ycyy"
>
<a-select-option value="1">来料不良</a-select-option>
<a-select-option value="2">货损</a-select-option>
<a-select-option value="3">来料少件</a-select-option>
<a-select-option value="4">发错货</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
... ... @@ -104,6 +104,7 @@
data () {
return {
model:{
ycyy: '1'
},
labelCol: {
xs: { span: 24 },
... ... @@ -115,8 +116,20 @@
},
confirmLoading: false,
validatorRules: {
materialCode: [{ required: true, message: '物料编码不能为空', trigger: 'blur' }],
expressDeliveryNumber: [{ required: true, message: '供应商合同号/订单号不能为空', trigger: 'blur' }],
materialDescription: [{ required: true, message: '物料长描述不能为空', trigger: 'blur' }],
deliveryContractNumber: [{ required: true, message: '中标合同编号不能为空', trigger: 'blur' }],
measurementUnit: [{ required: true, message: '单位不能为空', trigger: 'blur' }],
demandUnit: [{ required: true, message: '需求单位不能为空', trigger: 'blur' }],
brand: [{ required: true, message: '品牌不能为空', trigger: 'blur' }],
warehouse: [{ required: true, message: '仓库不能为空', trigger: 'blur' }],
blpsl: [{ required: true, message: '不良品数量不能为空', trigger: 'blur' }],
salesman: [{ required: true, message: '销售员不能为空', trigger: 'blur' }],
ycyy: [{ required: true, message: '异常原因不能为空', trigger: 'blur' }],
},
url: {
queryByMaterialCode: "/trade/tblTradeMeterial/queryByMaterialCode",
add: "/trade/tblTradeInventoryDefectiveProduct/add",
edit: "/trade/tblTradeInventoryDefectiveProduct/edit",
queryById: "/trade/tblTradeInventoryDefectiveProduct/queryById"
... ... @@ -133,6 +146,19 @@
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
searchMaterialCode(){
getAction(this.url.queryByMaterialCode,{
meterialCode: this.model.materialCode
}).then((res)=>{
if(res.success){
this.$set(this.model, "materialDescription", res.result.meterialReview);
this.$set(this.model, "measurementUnit", res.result.unit);
this.$set(this.model, "brand", res.result.brand);
}else{
this.$message.warning(res.message);
}
})
},
add () {
this.edit(this.modelDefault);
},
... ...