作者 张晓杰

1. 库存管理和贸易库存管理追加BOH单挑更新和批量更新;

2. 基本表追加导入功能;
3. 贸易物料表追加导入功能;
4. 库存管理新增单独的库存表,不再使用视图
5. 追加原材料管理
NODE_ENV=production
VUE_APP_API_BASE_URL=http://factory.zgftlm.com/jeecg-boot
# VUE_APP_API_BASE_URL=http://factory.zgftlm.com/jeecg-boot
VUE_APP_API_BASE_URL=http://117.72.206.125/jeecg-boot
VUE_APP_CAS_BASE_URL=http://localhost:8888/cas
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
\ No newline at end of file
... ...
... ... @@ -4,6 +4,11 @@
<a-tab-pane key="1" tab="原物料管理" force-render>
<tbl-material-list></tbl-material-list>
</a-tab-pane>
<a-tab-pane key="6" tab="原材料管理">
<template v-if="TblRawMaterialsListFlag">
<tbl-rawMaterials-list></tbl-rawMaterials-list>
</template>
</a-tab-pane>
<a-tab-pane key="2" tab="半成品管理">
<template v-if="TblSemiFinishedListFlag">
<tbl-semi-finished-list></tbl-semi-finished-list>
... ... @@ -34,13 +39,15 @@ import TblMaterialList from './TblMaterialList'
import TblSemiFinishedList from './TblSemiFinishedList'
import TblConsumablesList from './TblConsumablesList.vue'
import TblProtectionList from './TblProtectionList.vue'
import TblRawMaterialsList from './TblRawMaterialsList.vue'
export default {
components: {
FinishProductManageList,
TblMaterialList,
TblSemiFinishedList,
TblConsumablesList,
TblProtectionList
TblProtectionList,
TblRawMaterialsList
},
data() {
return {
... ... @@ -48,7 +55,8 @@ export default {
TblMaterialListFlag: false,
TblSemiFinishedListFlag: false,
TblConsumablesListFlag: false,
TblProtectionListFlag: false
TblProtectionListFlag: false,
TblRawMaterialsListFlag: false
}
},
methods: {
... ... @@ -66,6 +74,8 @@ export default {
this.TblConsumablesListFlag = true;
case "5":
this.TblProtectionListFlag = true;
case "6":
this.TblRawMaterialsListFlag = true;
default:
break;
}
... ...
... ... @@ -22,6 +22,16 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-upload
name="file"
:showUploadList="false"
:multiple="false"
:headers="tokenHeader"
:action="importExcelUrl"
@change="handleImportExcel"
>
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
</div>
<!-- table区域-begin -->
... ... @@ -118,11 +128,17 @@ export default {
url: {
list: '/baseLibrary/baseLibraryInfo/list',
delete: "/baseLibrary/baseLibraryInfo/delete",
importExcelUrl: 'baseLibrary/baseLibraryInfo/importExcel',
},
visible: false,
imgUrl: '',
}
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
},
},
methods: {
getQRCode(record) {
this.visible = true
... ...
... ... @@ -24,6 +24,16 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-upload
name="file"
:showUploadList="false"
:multiple="false"
:headers="tokenHeader"
:action="importExcelUrl"
@change="handleImportExcel"
>
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel">
... ... @@ -187,6 +197,7 @@ export default {
list: '/meterial/consumables/list',
delete: '/meterial/consumables/delete',
deleteBatch: '/meterial/consumables/deleteBatch',
importExcelUrl: 'meterial/tblMaterial/importExcel',
},
dictOptions: {},
superFieldList: [],
... ...
... ... @@ -28,6 +28,16 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-upload
name="file"
:showUploadList="false"
:multiple="false"
:headers="tokenHeader"
:action="importExcelUrl"
@change="handleImportExcel"
>
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel">
... ...
... ... @@ -24,6 +24,16 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-upload
name="file"
:showUploadList="false"
:multiple="false"
:headers="tokenHeader"
:action="importExcelUrl"
@change="handleImportExcel"
>
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel">
... ... @@ -111,7 +121,7 @@ import '@/assets/less/TableExpand.less'
import VueQr from 'vue-qr'
export default {
name: 'TblMaterialList',
name: 'TblProtectionList',
mixins: [JeecgListMixin],
components: {
TblProtectionModal,
... ...
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="品名">
<j-input placeholder="请输入品名" v-model="queryParam.productName"></j-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<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>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-upload
name="file"
:showUploadList="false"
:multiple="false"
:headers="tokenHeader"
:action="importExcelUrl"
@change="handleImportExcel"
>
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel">
<a-icon type="delete" />删除
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">
批量操作
<a-icon type="down" />
</a-button>
</a-dropdown>
</div>
<!-- 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>
<a-table ref="table" size="middle" bordered rowKey="id" class="j-table-force-nowrap" :scroll="{ x: true }"
:columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading"
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" @change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text, record">
<span v-if="!text" style="font-size: 12px; font-style: italic">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt=""
style="max-width: 80px; font-size: 12px; font-style: italic" />
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px; font-style: italic">无文件</span>
<a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="getQRCode(record)">生成二维码</a>
<a-divider type="vertical" />
<a @click="handleEdit(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-raw-materials-model ref="modalForm" @ok="modalFormOk" />
<div>
<j-modal :width="250" :visible="visible" :maskClosable="false" switchFullscreen @cancel="handleCancel"
okText="打印完成" @ok="handleCancel">
<a-button v-print="'#printContent'" ghost type="primary">打印</a-button>
<section id="printContent">
<vue-qr :text="imgUrl" :size="200" :margin="21" :logoScale="0.2"> </vue-qr>
</section>
</j-modal>
</div>
</a-card>
</template>
<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TblRawMaterialsModel from './modules/TblRawMaterialsModel.vue'
import '@/assets/less/TableExpand.less'
import VueQr from 'vue-qr'
export default {
name: 'TblConsumablesList',
mixins: [JeecgListMixin],
components: {
TblRawMaterialsModel,
VueQr,
},
data() {
return {
visible: false,
imgUrl: '',
description: 'tbl_material管理页面',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
},
},
{
title: '编号',
align: 'center',
dataIndex: 'partNumber',
},
{
title: '品名',
align: 'center',
dataIndex: 'productName',
},
{
title: '型号',
align: 'center',
dataIndex: 'type',
},
{
title: '规格',
align: 'center',
dataIndex: 'spec',
},
{
title: '采购性质',
align: 'center',
dataIndex: 'buyingClassify',
},
{
title: '产品图片',
align: 'center',
dataIndex: 'pics',
scopedSlots: {
customRender: 'imgSlot',
},
},
{
title: '单位',
align: 'center',
dataIndex: 'unit',
},
{
title: '操作',
dataIndex: 'action',
align: 'center',
fixed: 'right',
width: 147,
scopedSlots: {
customRender: 'action',
},
},
],
url: {
list: '/meterial/tblMaterial/rawMaterialsList',
delete: '/meterial/tblMaterial/delete',
deleteBatch: '/meterial/tblMaterial/deleteBatch',
exportXlsUrl: '/meterial/tblMaterial/exportXls',
importExcelUrl: 'meterial/tblMaterial/importExcel',
},
dictOptions: {},
superFieldList: [],
}
},
created() {
this.getSuperFieldList()
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
},
},
methods: {
initDictConfig() { },
getSuperFieldList() {
let fieldList = []
fieldList.push({
type: 'string',
value: 'partNumber',
text: '编号',
dictCode: '',
})
fieldList.push({
type: 'string',
value: 'productName',
text: '品名',
dictCode: '',
})
fieldList.push({
type: 'string',
value: 'type',
text: '型号',
dictCode: '',
})
fieldList.push({
type: 'string',
value: 'spec',
text: '规格',
dictCode: '',
})
fieldList.push({
type: 'string',
value: 'buyingClassify',
text: '采购性质',
dictCode: 'buying_classify',
})
fieldList.push({
type: 'string',
value: 'supplierName',
text: '供应商名称',
dictCode: '',
})
fieldList.push({
type: 'string',
value: 'pics',
text: '产品图片',
dictCode: '',
})
this.superFieldList = fieldList
},
getQRCode(record) {
this.visible = true
this.imgUrl = record.partNumber;
//this.creatQrCode(record)
},
handleCancel() {
this.$emit('close')
this.visible = false
},
},
}
</script>
<style scoped>
@import '~@assets/less/common.less';
@page {
size: auto;
/* auto is the initial value */
margin: 3mm;
/* this affects the margin in the printer settings */
}
</style>
\ No newline at end of file
... ...
... ... @@ -28,6 +28,16 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-upload
name="file"
:showUploadList="false"
:multiple="false"
:headers="tokenHeader"
:action="importExcelUrl"
@change="handleImportExcel"
>
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel">
... ... @@ -184,7 +194,7 @@ export default {
delete: '/meterial/tblSemiFinished/delete',
deleteBatch: '/meterial/tblSemiFinished/deleteBatch',
exportXlsUrl: '/meterial/tblSemiFinished/exportXls',
importExcelUrl: 'meterial/tblSemiFinished/importExcel',
importExcelUrl: 'meterial/tblMaterial/importExcel',
},
dictOptions: {},
superFieldList: [],
... ...
<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="24">
<a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partNumber">
<a-input v-model="model.partNumber" placeholder="请输入编号" :disabled="this.excludeIds !== ''">
</a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="品名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productName">
<a-input v-model="model.productName" placeholder="请输入品名"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
<a-input v-model="model.type" placeholder="请输入型号"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spec">
<a-input v-model="model.spec" placeholder="请输入规格"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unit">
<!-- <j-dict-select-tag type="selectUnit" placeholder="请选择单位" v-model="model.unit" /> -->
<a-input v-model="model.unit" placeholder="请输入单位"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="供应商名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplierName">
<a-input v-model="model.supplierName" placeholder="请输入供应商名称"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产品图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pics">
<j-image-upload isMultiple v-model="model.pics"></j-image-upload>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js'
import JFormContainer from '@/components/jeecg/JFormContainer'
import { duplicateCheck } from '@/api/api'
import { httpAction } from '@/api/manage'
export default {
name: 'TblRawMaterialsForm',
mixins: [JVxeTableModelMixin],
components: {
JFormContainer,
},
props: ['excludeIds', 'disabled'],
data() {
return {
labelCol: {
xs: {
span: 24
},
sm: {
span: 5
},
},
wrapperCol: {
xs: {
span: 24
},
sm: {
span: 16
},
},
model: {
meterialType: "5",
buyingClassify: "P"
},
// 新增时子表默认添加几行空数据
addDefaultRowNum: 1,
validatorRules: {
partNumber: [
{ required: true, message: '请输入编号!' },
{ validator: this.validatePartNumber }
],
productName: [{ required: true, message: '请输入品名!' },],
type: [{ required: true, message: '请输入型号!' },],
spec: [{ required: true, message: '请输入规格!' },],
unit: [{ required: true, message: '请输入单位!' },],
supplierName: [{ required: true, message: '请输入供应商名称!' }],
pics: [{ required: true, message: '请上传产品图片!' }]
},
url: {
add: "/meterial/tblMaterial/add",
edit: "/meterial/tblMaterial/edit",
queryById: "/meterial/tblMaterial/queryById",
// tblPartSemifinished: {
// list: '/meterial/tblMaterial/queryTblPartSemifinishedByMainId'
// },
}
}
},
computed: {
formDisabled() {
return this.disabled
},
},
created() {
},
methods: {
add() {
console.log(456)
},
edit(record) {
this.model = record;
},
handleOk() {
const that = this
// 触发表单验证
this.$refs.form.validate((valid) => {
if (valid) {
that.confirmLoading = true
let httpurl = ''
let method = ''
if (!this.model.id) {
httpurl += this.url.add
method = 'post'
} else {
httpurl += this.url.edit
method = 'put'
}
httpAction(httpurl, this.model, method)
.then((res) => {
if (res.success) {
that.$message.success(res.message)
that.$emit('ok')
} else {
that.$message.warning(res.message)
}
})
.finally(() => {
that.confirmLoading = false
that.close()
})
} else {
return false
}
})
},
close() {
this.$emit('close');
this.visible = false;
this.$refs.form.clearValidate();
},
validateError(msg) {
this.$message.error(msg)
},
validatePartNumber(rule, value, callback) {
var params = {
tableName: "tbl_material",
fieldName: "part_number",
fieldVal: value,
dataId: this.model.id
};
duplicateCheck(params).then((res) => {
if (res.success) {
callback();
} else {
callback('编号已存在');
}
})
},
}
}
</script>
<style scoped></style>
\ No newline at end of file
... ...
<template>
<j-modal :title="title" :width="1200" :visible="visible" :maskClosable="false" switchFullscreen @ok="handleOk"
:okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel">
<tbl-raw-materials-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" :excludeIds="excludeIds" />
</j-modal>
</template>
<script>
import TblRawMaterialsForm from './TblRawMaterialsForm.vue'
export default {
name: 'TblRawMaterialsModel',
components: {
TblRawMaterialsForm
},
data() {
return {
title: '',
width: 800,
visible: false,
disableSubmit: false,
excludeIds: ''
}
},
methods: {
add() {
this.excludeIds = '';
this.visible = true
this.$nextTick(() => {
this.$refs.realForm.add();
})
},
edit(record) {
this.excludeIds = record.partNumber
this.visible = true
this.$nextTick(() => {
this.$refs.realForm.edit(record);
})
},
close() {
this.$emit('close');
this.visible = false;
},
handleOk() {
this.$refs.realForm.handleOk();
},
submitCallback() {
this.$emit('ok');
this.visible = false;
},
handleCancel() {
this.close()
}
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
... ...
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="品名">
<j-input placeholder="请输入品名" v-model="queryParam.productName"></j-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="采购性质">
<j-dict-select-tag placeholder="请选择采购性质" v-model="queryParam.buyingClassify" dictCode="buying_classify" />
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<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>
</span>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-button type="primary" icon="download" @click="handleExportXls('库存报表' + parseTime(new Date().getTime(),'{y}-{m}-{d} {h}:{i}:{s}'))" style="margin-right: 10px;">导出</a-button>
<a-button type="primary" icon="edit" @click="priceVisible = true">安全库存设置</a-button>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<!-- <a-button type="primary" icon="download" @click="handleExportXls('tbl_inventory')">导出</a-button> -->
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrlBoh" @change="handleImportExcel">
<a-button type="primary" icon="import">导入更新BOH</a-button>
</a-upload>
</div>
<!-- table区域-begin -->
<div>
<div style="margin-bottom: 16px;">
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
class="j-table-force-nowrap"
@change="handleTableChange" :rowClassName="tableRowClass">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="meterialTypeSlot" slot-scope="text, record">
<span v-if="text == 1">零件</span>
<span v-else-if="text == 2">半成品</span>
<span v-else-if="text == 3">耗材</span>
<span v-else>劳保</span>
</span>
<span slot="action" slot-scope="text, record">
<a @click="handleDetail(record)">库存明细</a> &nbsp;
<a @click="updateBoh(record)">更新BOH</a>
</span>
</a-table>
</div>
<!-- <tbl-inventory-modal ref="modalForm" @ok="modalFormOk"></tbl-inventory-modal> -->
<view-depot-stock-modal ref="modalForm" @ok="modalFormOk"></view-depot-stock-modal>
<template v-if="priceVisible">
<safety-stock-edit :visible.sync="priceVisible"></safety-stock-edit>
</template>
<j-modal
:title="title"
:width="width"
:visible="visibleBoh"
switchFullscreen
@ok="handleOkBohInfo"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancelBoh"
cancelText="关闭">
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="disabled">
<a-form-model ref="form" :model="model" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partNumber">
<a-input v-model="model.partNumber" placeholder="请输入编号" disabled="disabled"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="品名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productName">
<a-input v-model="model.productName" placeholder="请输入品名" disabled="disabled" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spec">
<a-input v-model="model.spec" placeholder="请输入规格" disabled="disabled" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
<a-input v-model="model.type" placeholder="请输入型号" disabled="disabled"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="采购性质" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="buyingClassify">
<a-input v-model="model.buyingClassify" placeholder="请输入采购性质" disabled="disabled"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="类别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="meterialType">
<a-input v-model="model.meterialType" placeholder="请输入类别" disabled="disabled"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="当前库存量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="currentInventory">
<a-input-number v-model="model.currentInventory" placeholder="请输入当前库存量" style="width: 100%" disabled="disabled"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="库存BOH" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inventoryBoh">
<a-input-number v-model="model.inventoryBoh" placeholder="请输入库存BOH" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</j-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TblInventoryModal from './modules/TblInventoryModal'
import ViewDepotStockModal from '../depot_stock/modules/ViewDepotStockModal'
import SafetyStockEdit from '../depot_stock/modules/SafetyStockEdit.vue';
import { getAction ,postAction} from '@/api/manage'
export default {
name: 'TblInventoryList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TblInventoryModal,
SafetyStockEdit,
ViewDepotStockModal
},
data () {
return {
confirmLoading: false,
description: 'tbl_inventory管理页面',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title: '编号',
align: "center",
dataIndex: 'partNumber',
// customRender: (text, record) => {//根据状态判断字体
// console.log(this.safetyStock)
// }
},
{
title:'品名',
align:"center",
dataIndex: 'productName'
},
{
title:'规格',
align:"center",
dataIndex: 'spec'
},
{
title:'型号',
align:"center",
dataIndex: 'type'
},
{
title:'采购性质',
align:"center",
dataIndex: 'buyingClassify'
},
{
title:'类别',
align:"center",
dataIndex: 'meterialType',
scopedSlots: { customRender: 'meterialTypeSlot' },
},
{
title:'当前库存量',
align:"center",
dataIndex: 'currentInventory'
},
{
title:'BOH',
align:"center",
dataIndex: 'inventoryBoh'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/depot/tblInventory/list",
delete: "/depot/tblInventory/delete",
deleteBatch: "/depot/tblInventory/deleteBatch",
exportXlsUrl: "/depot/tblInventory/exportXls",
importExcelUrl: "depot/tblInventory/importExcel",
importExcelUrlBoh:"depot/tblInventory/importExcelBoh",
updateBoh:"/depot/tblInventory/updateBoh"
},
dictOptions:{},
superFieldList:[],
priceVisible: false,
safetyStock: null,
model:{},
visibleBoh:false,
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
}
},
created() {
this.getSuperFieldList();
getAction("/safety/stock/getPrice").then(res => {
if (res.success) {
this.safetyStock = res.result.safetyStock;
}
})
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
importExcelUrlBoh: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrlBoh}`;
},
},
methods: {
tableRowClass(record) {
if (record.meterialType != "1" && record.meterialType != "2") {
if (record.currentInventory <= this.safetyStock) {
return "rowClass";
} else {
return "";
}
} else {
return "";
}
},
reSeach() {
this.loading = true;
let params = {}
getAction(this.url.list, params).then(res => {
this.loading = false;
if (res.success) {
this.dataSource = res.result.records;
}
})
},
updateBoh(recode){
console.log("..............",recode)
this.model= {}
this.model = recode;
this.visibleBoh = true;
},
handleOkBohInfo(){
this.$refs.form.validate((valid) => {
if (valid){
postAction(this.url.updateBoh,this.model).then(res=>{
this.reSeach();
if (res.success){
this.$message.success("更新成功")
}else {
this.$message.error(res.message)
}
})
console.log("提交表单内容")
this.visibleBoh = false
}
})
},
handleCancelBoh(){
this.visibleBoh = false;
this.model = {}
},
initDictConfig() {
},
getSuperFieldList() {
let fieldList = [];
fieldList.push({ type: 'string', value: 'partNumber', text: '编号', dictCode: '' })
fieldList.push({ type: 'string', value: 'productName', text: '品名', dictCode: '' })
fieldList.push({ type: 'string', value: 'type', text: '型号', dictCode: '' })
fieldList.push({ type: 'string', value: 'spec', text: '规格', dictCode: '' })
fieldList.push({ type: 'string', value: 'buyingClassify', text: '采购性质', dictCode: 'buying_classify' })
fieldList.push({ type: 'string', value: 'meterialType', text: 'meterialType', dictCode: '' })
fieldList.push({ type: 'BigDecimal', value: 'operNumber', text: 'operNumber', dictCode: '' })
this.superFieldList = fieldList
}
}
}
</script>
<style >
.rowClass {
background-color: red;
/* color: white; */
}
@import '~@assets/less/common.less';
</style>
\ No newline at end of file
... ...
... ... @@ -252,6 +252,7 @@ export default {
this.model.spec = res.result.spec
this.model.type = res.result.type
this.model.buyingClassify = res.result.buyingClassify
this.model.meterialType = res.result.meterialType
this.model.depotType = '入库'
this.confirmLoading = false
this.isShow = false
... ...
<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="24">
<a-form-model-item label="品名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productName">
<a-input v-model="model.productName" placeholder="请输入品名" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spec">
<a-input v-model="model.spec" placeholder="请输入规格" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
<a-input v-model="model.type" placeholder="请输入型号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="采购性质 M:加工,P:采购" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="buyingClassify">
<a-input v-model="model.buyingClassify" placeholder="请输入采购性质 M:加工,P:采购" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="类别 1-零件 2-半成品 3-耗材" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="meterialType">
<a-input v-model="model.meterialType" placeholder="请输入类别 1-零件 2-半成品 3-耗材" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="当前库存量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="currentInventory">
<a-input-number v-model="model.currentInventory" placeholder="请输入当前库存量" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="初始库存" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inventoryBoh">
<a-input-number v-model="model.inventoryBoh" placeholder="请输入初始库存" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TblInventoryForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/org.jeecg.modules.erp.depot_stock/tblInventory/add",
edit: "/org.jeecg.modules.erp.depot_stock/tblInventory/edit",
queryById: "/org.jeecg.modules.erp.depot_stock/tblInventory/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
// 触发表单验证
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>
\ No newline at end of file
... ...
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<tbl-inventory-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tbl-inventory-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import TblInventoryForm from './TblInventoryForm'
export default {
name: 'TblInventoryModal',
components: {
TblInventoryForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>
\ No newline at end of file
... ...
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<tbl-inventory-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tbl-inventory-form>
</j-modal>
</template>
<script>
import TblInventoryForm from './TblInventoryForm'
export default {
name: 'TblInventoryModal',
components: {
TblInventoryForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>
\ No newline at end of file
... ...
... ... @@ -61,6 +61,7 @@
<span slot="action" slot-scope="text, record">
<a @click="handleDetail(record)">库存明细</a>
<!-- <a @click="updateBoh(record)">更新BOH</a> -->
</span>
</a-table>
</div>
... ... @@ -92,16 +93,16 @@ export default {
description: 'view_depot_stock管理页面',
// 表头
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: '编号',
align: "center",
... ... @@ -110,7 +111,7 @@ export default {
// console.log(this.safetyStock)
// }
},
{
{
title: '品名',
align: "center",
dataIndex: 'productName'
... ... @@ -160,7 +161,9 @@ export default {
dictOptions: {},
superFieldList: [],
priceVisible: false,
safetyStock: null
safetyStock: null,
model:{},
visibleBoh:false
}
},
created() {
... ... @@ -189,6 +192,13 @@ export default {
return "";
}
},
// updateBoh(recode){
// console.log("..............",recode)
// this.model= {}
// this.model = recode;
// // this.model.materialDescription = recode.materialReview;
// this.visibleBoh = true;
// },
initDictConfig() {
},
getSuperFieldList() {
... ...
... ... @@ -17,6 +17,7 @@
<a-select-option value="">请选择</a-select-option>
<a-select-option value="入库">入库</a-select-option>
<a-select-option value="出库">出库</a-select-option>
<a-select-option value="更新">更新</a-select-option>
</a-select>
</a-form-item>
</a-col>
... ...
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<div class="align-colon">
<p style="margin-bottom: -5px; margin-left: 50px">
<span>订单号:</span
><a-input v-model="model.orderId" style="width: 200px; border: 0px; font-weight: bold"></a-input>
</p>
<p style="margin-bottom: -5px; margin-left: 50px">
<span>订货单位:</span
><a-input v-model="model.orderCompany" style="width: 200px; border: 0px; font-weight: bold"></a-input>
</p>
<p style="margin-bottom: -5px; margin-left: 50px">
<span>工作令:</span
><a-input v-model="model.workOrder" style="width: 200px; border: 0px; font-weight: bold"></a-input>
</p>
<p style="margin-bottom: -5px; margin-left: 50px">
<span>产品名称:</span
><a-input v-model="model.productName" style="width: 200px; border: 0px; font-weight: bold"></a-input>
</p>
<p style="margin-bottom: -5px; margin-left: 50px">
<span>产品类型:</span
><a-input v-model="this.productType" style="width: 200px; border: 0px; font-weight: bold"></a-input>
</p>
<p style="margin-bottom: -5px; margin-left: 50px">
<span>任务下达时间:</span
><a-input v-model="model.orderDate" style="width: 200px; border: 0px; font-weight: bold"></a-input>
</p>
<p style="margin-bottom: -5px; margin-left: 50px">
<span>派工时间:</span
><a-input v-model="model.dispatchDate" style="width: 200px; border: 0px; font-weight: bold"></a-input>
</p>
<p style="margin-bottom: -5px; margin-left: 50px">
<span>交货时间:</span
><a-input v-model="model.deliveryDate" style="width: 200px; border: 0px; font-weight: bold"></a-input>
</p>
<p style="margin-bottom: -5px; margin-left: 50px">
<span>数量(套):</span
><a-input v-model="model.quantity" style="width: 200px; border: 0px; font-weight: bold"></a-input>
</p>
<p style="margin-bottom: -5px; margin-left: 50px">
<span>总工时:</span
><a-input v-model="model.totalWorkingHours" style="width: 200px; border: 0px; font-weight: bold"></a-input>
</p>
<p style="margin-left: 50px">
<span>已派发工时:</span><a-input v-model="model.dispatchedWorkingHours" style="width: 200px; border: 0px; font-weight: bold"></a-input>
</p>
<!-- 图片容器 -->
<!-- <div class="image-container-wrapper">
<div style="display: inline-block; width: 45%">
<div class="show">
<img :src="getImgView(show)" :preview="num" alt="" height="100px" />
</div>
<div class="imgBox">
<div
:class="[num == index ? 'borderShow' : '']"
v-for="(item, index) of picList"
:key="index"
@click="onImg(index)"
>
<img :src="getImgView(item)" height="25px" alt="" style="margin-left: 20px" />
</div>
</div>
</div>
</div> -->
<div image-container-wrapper>
<div v-if="model.pics != null" style="margin-top: 50px;">
<a-carousel arrows>
<div
slot="prevArrow"
slot-scope="props"
class="custom-slick-arrow"
style="left: 10px;zIndex: 1"
>
<a-icon type="left-circle" />
</div>
<div slot="nextArrow" slot-scope="props" class="custom-slick-arrow" style="right: 10px">
<a-icon type="right-circle" />
</div>
<div v-for="(item, index) in picList" :key="index" @click="onImg(index)">
<img :src="getImgView(item)" alt="" class="imgg" :preview="num"/>
</div>
</a-carousel>
<div class="tipCss">设计图</div>
</div>
</div>
</div>
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
class="j-table-force-nowrap"
:scroll="{ x: true }"
:columns="columns"
:dataSource="res"
:pagination="false"
>
</a-table>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import Axios from 'axios'
import { queryBynumber, querygx } from '../../../api/manage'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
export default {
name: 'TblProductionPlanForm',
mixins: [JeecgListMixin],
components: {},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false,
},
},
data() {
return {
productType:'',
picList: '',
show: '',
num: 0,
imageSrc: '',
files: '',
model: {},
res: [],
columns: [
{
title: '工序',
align: 'center',
dataIndex: 'workingProcedure',
},
{
title: '承接人',
align: 'center',
dataIndex: 'undertaker',
},
{
title: '工时',
align: 'center',
dataIndex: 'workHours',
},
{
title: '派发时间',
align: 'center',
dataIndex: 'dispatchTime',
customRender: function (text) {
return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
},
},
{
title: '派发人',
align: 'center',
dataIndex: 'dispatchRen',
},
{
title: '验收时间',
align: 'center',
dataIndex: 'yanTime',
customRender: function (text) {
return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
},
},
{
title: '验收人',
align: 'center',
dataIndex: 'yanRen',
},
{
title: '验收结果',
align: 'center',
dataIndex: 'yanResult',
},
{
title: '备注',
align: 'center',
dataIndex: 'notes',
},
],
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
pai: [{ required: true, message: '请输入已派发工时!' }],
totalWork: [{ required: true, message: '请输入总工时!' }],
deliveryTime: [{ required: true, message: '请输入交货时间!' }],
dispatchTime: [{ required: true, message: '请输入派工时间!' }],
workTime: [{ required: true, message: '请输入任务下达时间!' }],
productType: [{ required: true, message: '请输入产品类型!' }],
productName: [{ required: true, message: '请输入产品名称!' }],
workOrder: [{ required: true, message: '请输入工作令!' }],
danwei: [{ required: true, message: '请输入订货单位!' }],
orderNumber: [{ required: true, message: '请输入订单号!' }],
num: [{ required: true, message: '请输入数量(套)!' }],
},
url: {
add: '/production/tblProductionPlan/add',
edit: '/production/tblProductionPlan/edit',
queryById: '/production/tblProductionPlan/queryById',
queryBynumber: '/production/tblProductionPlan/queryBynumber',
querygx: '/production/tblProductionPlan/querygx',
list: "/order_form/tblOrderForm/list",
queryByType: '/production/tblProductTypeGongxu/queryByType',
},
}
},
computed: {
formDisabled() {
return this.disabled
},
},
created() {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model))
},
methods: {
onImg(e) {
this.show = this.picList[e]
this.num = e
},
querygx(orderId, productType) {
if(this.model.productType === '接地'){
this.model.productType='JD'
}else if(this.model.productType === '线槽'){
this.model.productType= 'XC'
}else if(this.model.productType === '卡子'){
this.model.productType= 'QZ'
}else if(this.model.productType === '司机室'){
this.model.productType= 'SJ'
}else if(this.model.productType === '柜、箱、盒'){
this.model.productType= 'GX'
}else if(this.model.productType === '附属钢'){
this.model.productType= 'FS'
}
// gongxuList(this.url.queryByType, { productTypeId: productType }).then((ress) => {
// if(ress){
// }
// })
querygx(this.url.querygx, this.model).then((res) => {
console.log('工序订单号:', orderId)
console.log('工序产品类型:', productType)
console.log('工序查询:', res)
this.res = res.result
})
},
queryBynumber(orderId) {
console.log('1订单号:', orderId)
if(this.model.productType === '接地'){
this.productType='接地'
}else if(this.model.productType === '线槽'){
this.productType= '线槽'
}else if(this.model.productType === '卡子'){
this.productType= '卡子'
}else if(this.model.productType === '司机室'){
this.productType= '司机室'
}else if(this.model.productType === '柜、箱、盒'){
this.productType= '柜、箱、盒'
}else if(this.model.productType === '附属钢'){
this.productType= '附属钢'
}
queryBynumber(this.url.queryBynumber, { orderId: orderId }).then((res) => {
if (res.result) {
const result = res.result;
if (result.designPic) {
this.imageSrc = result.designPic;
this.picList = result.designPic.split(',');
this.show = this.picList[0];
}
if (result.designFile) {
this.designFile = result.designFile;
console.log('files:', this.designFile);
}
} else {
console.log('Response result or required properties are missing.');
}
})
.catch((error) => {
console.error('Error while fetching data:', error);
});
},
add() {
this.edit(this.modelDefault)
},
edit(record) {
this.model = Object.assign({}, record)
if(this.model.productType === 'JD'){
this.model.productType='接地'
}else if(this.model.productType === 'XC'){
this.model.productType= '线槽'
}else if(this.model.productType === 'QZ'){
this.model.productType= '卡子'
}else if(this.model.productType === 'SJ'){
this.model.productType= '司机室'
}else if(this.model.productType === 'GX'){
this.model.productType= '柜、箱、盒'
}else if(this.model.productType === 'FS'){
this.model.productType= '附属钢'
}
this.visible = true
},
submitForm() {
const that = this
// 触发表单验证
this.$refs.form.validate((valid) => {
if (valid) {
that.confirmLoading = true
let httpurl = ''
let method = ''
if (!this.model.id) {
httpurl += this.url.add
method = 'post'
} else {
httpurl += this.url.edit
method = 'put'
}
httpAction(httpurl, this.model, method)
.then((res) => {
if (res.success) {
that.$message.success(res.message)
that.$emit('ok')
} else {
that.$message.warning(res.message)
}
})
.finally(() => {
that.confirmLoading = false
})
}
})
},
},
}
</script>
<style scoped>
.ant-carousel >>> .slick-slide {
text-align: center;
height: 200px;
line-height: 200px;
/* background: #e7e7e8d2; */
overflow: hidden;
}
.ant-carousel >>> .custom-slick-arrow {
width: 25px;
height: 25px;
font-size: 25px;
color: #cbc9c9;
/* background-color: rgba(31, 45, 61, 0.11); */
opacity: 0.3;
}
.ant-carousel >>> .custom-slick-arrow:before {
display: none;
}
.ant-carousel >>> .custom-slick-arrow:hover {
opacity: 0.5;
}
.ant-carousel >>> .slick-slide h3 {
color: #cbc9c9;
}
.imgg{
/* width: 200px; */
height: 160px;
margin: auto
}
.imgg:hover{
cursor: pointer;
}
.align-colon{
display:inline-block;width:50%;margin: auto;
}
.align-colon p {
display: flex;
align-items: center;
}
.align-colon p span {
width: 100px; /* 固定文本部分的宽度 */
text-align: right; /* 文本右对齐 */
margin-right: -0px; /* 调整冒号后的空白间距 */
font-weight: bold; /* 将文本加粗 */
}
.imgDiv{
display:inline-block;
width:40%;
}
/* 图片容器及其包裹器的样式 */
/* .image-container-wrapper {
width: 50%; 将图片容器包裹器宽度设置为一半
float: right; 右浮动
margin-top: -300px; 调整顶部外边距以与其他内容对齐
} */
.imgBox {
display: flex;
}
.imgBox img {
width: 50px;
height: 50px;
margin: 10px;
}
.show img{
margin-bottom: 10px;
height: 200px;
width: 200px;
}
.imgBox div {
margin: 5px;
}
.borderShow {
border: 2px solid rgb(141, 134, 134);
}
.image-container {
margin-bottom: -10px; /* 图片容器下边距 */
}
.custom-image {
width: 500px; /* 设置图片宽度为200像素 */
height: auto; /* 自动调整高度以保持宽高比 */
}
</style>
\ No newline at end of file
... ...
... ... @@ -4,9 +4,9 @@
<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-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialCode">
<a-input
v-model="model.meterialCode"
v-model="model.materialCode"
placeholder="请输入物料编码"
readonly
></a-input>
... ... @@ -26,9 +26,9 @@
<!-- <a >查询</a>-->
<!-- </a-col>-->
<a-col :span="12">
<a-form-model-item label="物料长描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="meterialReview">
<a-form-model-item label="物料长描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialReview">
<a-input
v-model="model.meterialReview"
v-model="model.materialReview"
placeholder="请输入物料长描述"
></a-input>
... ... @@ -144,7 +144,7 @@ export default {
components: {},
props: {
materialCode: String, //物料编码
meterialReview: String, //物料长描述
materialReview: String, //物料长描述
unit: String, //计量单位
brand: String, //品牌
//表单禁用
... ... @@ -173,9 +173,9 @@ export default {
sm: { span: 16 },
},
validatorRules: {
meterialCode: [{ required: true, message: '请输入物料编码!' },],
materialCode: [{ required: true, message: '请输入物料编码!' },],
hth: [{ required: true, message: '请输入合同/订单号!' },],
meterialReview: [{ required: true, message: '请输入物料长描述!' },],
materialReview: [{ required: true, message: '请输入物料长描述!' },],
wldh: [{ required: true, message: '请输入物流单号!' },],
unit: [{ required: true, message: '请输入单位!' },],
iszt: [{ required: true, message: '请选择是否在途!' },],
... ... @@ -194,8 +194,8 @@ export default {
},
},
created() {
this.model.meterialCode = this.materialCode
this.model.meterialReview = this.meterialReview
this.model.materialCode = this.materialCode
this.model.materialReview = this.materialReview
this.model.unit = this.unit
this.model.brand = this.brand
},
... ...
... ... @@ -44,6 +44,16 @@
<a-button @click="handleInventoryIn" type="primary" >入库记录</a-button>
<a-button @click="handleInventoryOut" type="primary" >出库记录</a-button>
<a-button @click="handleInventoryDefective" type="primary" >不良品库</a-button>
<a-upload
name="file"
:showUploadList="false"
:multiple="false"
:headers="tokenHeader"
:action="importExcelUrlBoh"
@change="handleImportExcel"
>
<a-button type="primary" icon="import">更新BOH</a-button>
</a-upload>
<!-- 高级查询区域 -->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> -->
<a-dropdown v-if="selectedRowKeys.length > 0">
... ... @@ -95,9 +105,10 @@
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleInventoryInfoIn(record)">入库</a> &nbsp
<a @click="handleInventoryInfoOut(record)">出库</a> &nbsp
<a @click="handleInventoryInfo(record)">库存明细</a>
<a @click="handleInventoryInfoIn(record)">入库</a> &nbsp;
<a @click="handleInventoryInfoOut(record)">出库</a> &nbsp;
<a @click="handleInventoryInfo(record)">库存明细</a>&nbsp;
<a @click="updateInventoryBoh(record)">更新BOH</a>
</span>
</a-table>
... ... @@ -145,7 +156,7 @@
@ok="handleCancelInfo"
@cancel="handleCancelInfo"
cancelText="关闭">
<TblTradeInventoryInfoList :materialCode="meterialCode"></TblTradeInventoryInfoList>
<TblTradeInventoryInfoList :materialCode="materialCode"></TblTradeInventoryInfoList>
</j-modal>
... ... @@ -175,9 +186,9 @@
<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-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialCode">
<a-input
v-model="model.meterialCode"
v-model="model.materialCode"
placeholder="请输入物料编码"
disabled="disabled"
></a-input>
... ... @@ -197,9 +208,9 @@
<!-- <a >查询</a>-->
<!-- </a-col>-->
<a-col :span="12">
<a-form-model-item label="物料长描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="meterialReview">
<a-form-model-item label="物料长描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialReview">
<a-input
v-model="model.meterialReview"
v-model="model.materialReview"
placeholder="请输入物料长描述"
disabled="disabled"
></a-input>
... ... @@ -323,9 +334,9 @@
<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-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialCode">
<a-input
v-model="model2.meterialCode"
v-model="model2.materialCode"
placeholder="请输入物料编码"
disabled="disabled"
></a-input>
... ... @@ -342,9 +353,9 @@
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="物料长描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="meterialReview">
<a-form-model-item label="物料长描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialReview">
<a-input
v-model="model2.meterialReview"
v-model="model2.materialReview"
placeholder="请输入物料长描述"
disabled="disabled"
></a-input>
... ... @@ -422,6 +433,82 @@
</a-spin>
</j-modal>
<j-modal
:title="title"
:width="width"
:visible="visibleBoh"
switchFullscreen
@ok="handleOkBohInfo"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancelBoh"
cancelText="关闭">
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model2" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="12">
<a-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialCode">
<a-input
v-model="model2.materialCode"
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="materialReview">
<a-input
v-model="model2.materialReview"
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="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="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="actualInventory">
<a-input
v-model="model2.actualInventory"
placeholder="请输入入库数量"
disabled="disabled"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="BOH" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inventoryBoh">
<a-input
v-model="model2.inventoryBoh"
placeholder="请输入BOH"
></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</j-modal>
</a-card>
</template>
... ... @@ -471,12 +558,12 @@
{
title:'物料编码',
align:"center",
dataIndex: 'meterialCode'
dataIndex: 'materialCode'
},
{
title:'物料长描述',
align:"center",
dataIndex: 'meterialReview'
dataIndex: 'materialReview'
},
{
title:'计量单位',
... ... @@ -489,6 +576,11 @@
dataIndex: 'brand'
},
{
title:'BOH',
align:"center",
dataIndex: 'inventoryBoh'
},
{
title:'实际库存量',
align:"center",
dataIndex: 'actualInventory'
... ... @@ -498,11 +590,11 @@
align:"center",
dataIndex: 'quantityInTransit'
},
{
title:'总数量',
align:"center",
dataIndex: 'totalQuantity'
},
// {
// title:'总数量',
// align:"center",
// dataIndex: 'totalQuantity'
// },
// {
// title:'单价(不含税,元)',
// align:"center",
... ... @@ -557,6 +649,8 @@
deleteBatch: "/trade/tblTradeInventory/deleteBatch",
exportXlsUrl: "/trade/tblTradeInventory/exportXls",
importExcelUrl: "trade/tblTradeInventory/importExcel",
importExcelUrlBoh: 'trade/tblTradeInventory/importExcelBoh',
updateBoh: '/trade/tblTradeInventory/updateBoh'
},
dictOptions:{},
... ... @@ -569,8 +663,8 @@
model2: {
},
meterialCode:'',
meterialReview:'',
materialCode:'',
materialReview:'',
unit:'',
brand:'',
width:896,
... ... @@ -581,6 +675,7 @@
visibleInfo:false,
visibleInfoIn:false,
visibleInfoOut:false,
visibleBoh:false,
disableSubmit: false,
title: '入库',
titleOut: '出库',
... ... @@ -593,9 +688,9 @@
sm: { span: 16 },
},
validatorRules: {
meterialCode: [{ required: true, message: '请输入物料编码!' },],
materialCode: [{ required: true, message: '请输入物料编码!' },],
hth: [{ required: true, message: '请输入合同/订单号!' },],
meterialReview: [{ required: true, message: '请输入物料长描述!' },],
materialReview: [{ required: true, message: '请输入物料长描述!' },],
wldh: [{ required: true, message: '请输入物流单号!' },],
unit: [{ required: true, message: '请输入单位!' },],
// iszt: [{ required: true, message: '请选择是否在途!' },],
... ... @@ -606,9 +701,9 @@
operator: [{ required: true, message: '请输入采购员!' },],
},
validatorOutRules: {
meterialCode: [{ required: true, message: '请输入物料编码!' },],
materialCode: [{ required: true, message: '请输入物料编码!' },],
expressDeliveryNumber: [{ required: true, message: '请输入供应商合同号/订单号!' },],
meterialReview: [{ required: true, message: '请输入物料长描述!' },],
materialReview: [{ required: true, message: '请输入物料长描述!' },],
deliveryContractNumber: [{ required: true, message: '请输入中标合同编号!' },],
unit: [{ required: true, message: '请输入单位!' },],
demandUnit: [{ required: true, message: '请输入需求单位!' },],
... ... @@ -631,6 +726,9 @@
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
importExcelUrlBoh: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrlBoh}`;
},
},
methods: {
reSeach() {
... ... @@ -647,7 +745,7 @@
searchHth(){
getAction(this.url.searchHth,{
hth: this.model.hth,
wlbm: this.model.meterialCode
wlbm: this.model.materialCode
}).then(res=>{
if (res.success){
if (res.result.sl == null || res.result.supplier == null || res.result.wldh == null){
... ... @@ -672,15 +770,22 @@
handleInventoryDefective(){
this.visibleDefective = true;
},
updateInventoryBoh(recode){
console.log("..............",recode)
this.model2= {}
this.model2 = recode;
this.model2.materialDescription = recode.materialReview;
this.visibleBoh = true;
},
handleInventoryInfo(recode){
this.meterialCode = recode.meterialCode;
this.materialCode = recode.materialCode;
this.visibleInfo = true;
},
handleInventoryInfoIn(recode){
this.model = {}
console.log(recode)
this.model.meterialCode = recode.meterialCode;
this.model.meterialReview = recode.meterialReview;
this.model.materialCode = recode.materialCode;
this.model.materialReview = recode.materialReview;
this.model.unit = recode.unit;
this.model.brand = recode.brand;
this.visibleInfoIn = true;
... ... @@ -688,8 +793,8 @@
handleInventoryInfoOut(recode){
this.model2= {}
console.log("..............",recode)
this.model2.meterialCode = recode.meterialCode;
this.model2.meterialReview = recode.meterialReview;
this.model2.materialCode = recode.materialCode;
this.model2.materialReview = recode.materialReview;
this.model2.unit = recode.unit;
this.model2.brand = recode.brand;
this.visibleInfoOut = true;
... ... @@ -709,8 +814,8 @@
},
// 出库页面确认
handleOkInfoOut(){
this.model2.materialCode = this.model2.meterialCode
this.model2.materialDescription = this.model2.meterialReview
this.model2.materialCode = this.model2.materialCode
this.model2.materialDescription = this.model2.materialReview
this.model2.measurementUnit = this.model2.unit
postAction(this.url.out,this.model2).then(res=>{
this.reSeach();
... ... @@ -726,16 +831,33 @@
handleCancelInfoOut(){
this.reSeach();
this.visibleInfoOut = false
}
,
},
handleOkBohInfo(){
this.$refs.form.validate((valid) => {
if (valid){
postAction(this.url.updateBoh,this.model2).then(res=>{
this.reSeach();
if (res.success){
this.$message.success("更新成功")
}else {
this.$message.error(res.message)
}
})
console.log("提交表单内容")
this.visibleBoh = false
}
})
},
handleCancelBoh(){
this.visibleBoh = false;
this.model2 = {}
},
handleOkInfoIn(){
this.$refs.form.validate((valid) => {
if (valid){
postAction(this.url.store,{
materialCode: this.model.meterialCode, //物料编码
materialDescription: this.model.meterialReview, //长描述
materialCode: this.model.materialCode, //物料编码
materialDescription: this.model.materialReview, //长描述
measurementUnit: this.model.unit, //单位
brand: this.model.brand,//品牌
hth: this.model.hth, //合同号
... ... @@ -783,8 +905,8 @@
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'meterialCode',text:'物料编码',dictCode:''})
fieldList.push({type:'string',value:'meterialReview',text:'物料长描述',dictCode:''})
fieldList.push({type:'string',value:'materialCode',text:'物料编码',dictCode:''})
fieldList.push({type:'string',value:'materialReview',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:''})
... ...
... ... @@ -6,13 +6,13 @@
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="物料编码">
<a-input placeholder="请输入物料编码" v-model="queryParam.meterialCode"></a-input>
<a-input placeholder="请输入物料编码" v-model="queryParam.materialCode"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="物料长描述">
<a-input placeholder="请输入物料长描述" v-model="queryParam.meterialReview"></a-input>
<a-input placeholder="请输入物料长描述" v-model="queryParam.materialReview"></a-input>
</a-form-item>
</a-col>
... ... @@ -35,7 +35,16 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-upload
name="file"
:showUploadList="false"
:multiple="false"
:headers="tokenHeader"
:action="importExcelUrl"
@change="handleImportExcel"
>
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
</div>
<!-- table区域-begin -->
... ... @@ -134,12 +143,12 @@
{
title:'物料编码',
align:"center",
dataIndex: 'meterialCode'
dataIndex: 'materialCode'
},
{
title:'物料长描述',
align:"center",
dataIndex: 'meterialReview'
dataIndex: 'materialReview'
},
{
title:'单位',
... ... @@ -277,8 +286,8 @@
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'meterialCode',text:'物料编码',dictCode:''})
fieldList.push({type:'string',value:'meterialReview',text:'物料长描述',dictCode:''})
fieldList.push({type:'string',value:'materialCode',text:'物料编码',dictCode:''})
fieldList.push({type:'string',value:'materialReview',text:'物料长描述',dictCode:''})
fieldList.push({type:'string',value:'unit',text:'单位',dictCode:''})
fieldList.push({type:'string',value:'brand',text:'品牌',dictCode:''})
fieldList.push({type:'string',value:'modelChange',text:'型号变更说明',dictCode:''})
... ...
... ... @@ -148,10 +148,10 @@
methods: {
searchMaterialCode(){
getAction(this.url.queryByMaterialCode,{
meterialCode: this.model.materialCode
materialCode: this.model.materialCode
}).then((res)=>{
if(res.success){
this.$set(this.model, "materialDescription", res.result.meterialReview);
this.$set(this.model, "materialDescription", res.result.materialReview);
this.$set(this.model, "measurementUnit", res.result.unit);
this.$set(this.model, "brand", res.result.brand);
}else{
... ...
... ... @@ -4,13 +4,13 @@
<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="请输入物料编码" ></a-input>
<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="meterialReview">
<a-input v-model="model.meterialReview" placeholder="请输入物料长描述" ></a-input>
<a-form-model-item label="物料长描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialReview">
<a-input v-model="model.materialReview" placeholder="请输入物料长描述" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
... ... @@ -18,6 +18,11 @@
<a-input v-model="model.unit" placeholder="请输入单位" ></a-input>
</a-form-model-item>
</a-col>
<!-- <a-col :span="12">
<a-form-model-item label="BOH" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inventoryBoh">
<a-input-number v-model="model.inventoryBoh" placeholder="请输入BOH" ></a-input-number>
</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>
... ... @@ -90,13 +95,13 @@
},
confirmLoading: false,
validatorRules: {
// meterialCode: [
// materialCode: [
// { required: false},
// { validator: (rule, value, callback) => validateDuplicateValue('tbl_trade_meterial', 'meterial_code', value, this.model.id, callback)},
// ],
meterialCode: [{ required: true, message: '请输入物料编码!' }],
meterialReview: [{ required: true, message: '请输入物料长描述!' }],
materialCode: [{ required: true, message: '请输入物料编码!' }],
materialReview: [{ required: true, message: '请输入物料长描述!' }],
unit: [{ required: true, message: '请输入单位!' }],
brand: [{ required: true, message: '请输入品牌!' }],
// modelChange: [{ required: true, message: '请输入型号变更说明!' }],
... ...