作者 张晓杰

采购申请管理

... ... @@ -13,6 +13,20 @@ export function listProductType(parameter) {
return axios({
url: '/order_form/tblOrderForm/queryById/'+id,
method: 'get',
})
}
export function listDesign(parameter) {
return axios({
url: '/trad/tblBiddingShenq/listDesign',
method: 'get',
params:parameter
})
}
export function getUserRoleTreeList() {
return axios({
url: '/sys/role/getUserRoleTreeList',
method: 'get'
})
}
\ No newline at end of file
... ...
... ... @@ -73,7 +73,7 @@ export const JeecgListMixin = {
},
methods: {
loadData(arg) {
console.log('this.url:',this.url)
// console.log('this.url:',this.url)
if (!this.url.list) {
this.$message.error("请设置url.list属性!")
return
... ...
... ... @@ -13,11 +13,13 @@ const getters = {
userInfo: state => {state.user.info = Vue.ls.get(USER_INFO); return state.user.info},
addRouters: state => state.permission.addRouters,
onlAuthFields: state => {return state.online.authFields },
enhanceJs:(state) => (code) => {
enhanceJs:(state) => (code) => {
state.enhance.enhanceJs[code] = Vue.ls.get(ENHANCE_PRE+code);
return state.enhance.enhanceJs[code]
},
sysSafeMode: state => state.user.sysSafeMode,
roles: state => state.user.roles,
// userInfo: state => {state.user.roles = Vue.ls.get(USER_INFO); return state.user.info},
}
... ...
import Vue from 'vue'
import { login, logout, phoneLogin, thirdLogin } from "@/api/login"
import { ACCESS_TOKEN, USER_NAME,USER_INFO,USER_AUTH,SYS_BUTTON_AUTH,UI_CACHE_DB_DICT_DATA,TENANT_ID,CACHE_INCLUDED_ROUTES } from "@/store/mutation-types"
import { ACCESS_TOKEN, USER_NAME,USER_INFO,USER_AUTH,ROLES,SYS_BUTTON_AUTH,UI_CACHE_DB_DICT_DATA,TENANT_ID,CACHE_INCLUDED_ROUTES } from "@/store/mutation-types"
import { welcome } from "@/utils/util"
import { queryPermissionsByUser } from '@/api/api'
import { getAction } from '@/api/manage'
... ... @@ -37,6 +37,10 @@ const user = {
SET_INFO: (state, info) => {
state.info = info
},
SET_ROLE: (state, roles) => {
// console.log('roles',roles)
state.roles = roles
},
SET_TENANT: (state, id) => {
state.tenantid = id
},
... ... @@ -79,16 +83,22 @@ const user = {
return new Promise((resolve, reject) => {
login(userInfo).then(response => {
if(response.code =='200'){
console.log('-----------登录------------',response)
const result = response.result
const userInfo = result.userInfo
const roles = result.roles
console.log('roles---',roles)
Vue.ls.set(ACCESS_TOKEN, result.token, 7 * 24 * 60 * 60 * 1000)
Vue.ls.set(USER_NAME, userInfo.username, 7 * 24 * 60 * 60 * 1000)
Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000)
// Vue.ls.set(ROLES, roles, 7 * 24 * 60 * 60 * 1000)
Vue.ls.set(UI_CACHE_DB_DICT_DATA, result.sysAllDictItems, 7 * 24 * 60 * 60 * 1000)
commit('SET_TOKEN', result.token)
commit('SET_INFO', userInfo)
commit('SET_ROLE', roles)
commit('SET_NAME', { username: userInfo.username,realname: userInfo.realname, welcome: welcome() })
commit('SET_AVATAR', userInfo.avatar)
sessionStorage.setItem(ROLES,JSON.stringify(roles));
resolve(response)
}else{
reject(response)
... ... @@ -171,6 +181,7 @@ const user = {
Vue.ls.remove(UI_CACHE_DB_DICT_DATA)
Vue.ls.remove(CACHE_INCLUDED_ROUTES)
Vue.ls.remove(TENANT_ID)
sessionStorage.setItem(ROLES,null);
//console.log('logoutToken: '+ logoutToken)
logout(logoutToken).then(() => {
if (process.env.VUE_APP_SSO == 'true') {
... ...
... ... @@ -20,6 +20,7 @@ export const INDEX_MAIN_PAGE_PATH = '/dashboard/analysis'
export const OAUTH2_LOGIN_PAGE_PATH = '/oauth2-app/login'
export const TENANT_ID = 'TENANT_ID'
export const ONL_AUTH_FIELDS = 'ONL_AUTH_FIELDS'
export const ROLES = 'ROLES'
//路由缓存问题,关闭了tab页时再打开就不刷新 #842
export const CACHE_INCLUDED_ROUTES = 'CACHE_INCLUDED_ROUTES'
export const CONTENT_WIDTH_TYPE = {
... ...
<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="品名">
<a-input placeholder="请输入品名" v-model="queryParam.productName"></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.workOrder"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="使用日期">
<j-date v-model="queryParam.deliveryTime" placeholder="请选择使用日期" />
</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 -->
<!-- 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"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
class="j-table-force-nowrap"
@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>
<template slot="chooseStatusSlot" slot-scope="text, record">
<span v-if="record.chooseStatus == 0">是</span>
<span v-if="record.chooseStatus == 1">否</span>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleApproval1(record)">审批</a>
</span>
</a-table>
</div>
<TblBiddingShenqApproval1Model ref="TblBiddingShenqApproval1Model" @ok="modalFormOk"></TblBiddingShenqApproval1Model>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TblBiddingShenqModal from './modules/TblBiddingShenqModal'
import store from '@/store/'
import { ROLES } from "@/store/mutation-types"
import TblBiddingShenqApproval1Model from './modules/TblBiddingShenqApproval1Model'
export default {
name: 'TblBiddingShenqList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TblBiddingShenqApproval1Model
},
data () {
return {
description: 'tbl_bidding_shenq管理页面',
// 表头
columns: [
{
title: '序号',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'品名',
align:"center",
dataIndex: 'productName'
},
{
title:'规格',
align:"center",
dataIndex: 'specifications'
},
{
title:'数量',
align:"center",
dataIndex: 'num'
},
{
title:'单位',
align:"center",
dataIndex: 'danwei'
},
{
title:'物料类别',
align:"center",
dataIndex: 'wuType'
},
{
title:'工作令',
align:"center",
dataIndex: 'workOrder'
},
{
title:'用途',
align:"center",
dataIndex: 'purpose'
},
{
title:'当前库存',
align:"center",
dataIndex: 'operNumber'
},
{
title:'是否从基础表选择',
align:"center",
dataIndex: 'chooseStatus',
scopedSlots: { customRender: 'chooseStatusSlot' }
},
{
title:'使用日期',
align:"center",
dataIndex: 'deliveryTime',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'品牌',
align:"center",
dataIndex: 'brand'
},
{
title:'备注',
align:"center",
dataIndex: 'notes'
},
{
title:'申请人',
align:"center",
dataIndex: 'applicant'
},
{
title:'一级审批人',
align:"center",
dataIndex: 'spOne'
},
{
title:'二级审批人',
align:"center",
dataIndex: 'spTwo'
},
{
title:'不同意备注',
align:"center",
dataIndex: 'noNotes'
},
{
title:'申请日期',
align:"center",
dataIndex: 'sqTime',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/trad/biddingSq/list",
delete: "/trad/tblBiddingShenq/delete",
deleteBatch: "/trad/tblBiddingShenq/deleteBatch",
exportXlsUrl: "/trad/tblBiddingShenq/exportXls",
importExcelUrl: "trad/tblBiddingShenq/importExcel",
},
dictOptions:{},
superFieldList:[],
roleList:[],
roleCodeList:[],
cgzg:false,
cjgly:false,
}
},
created() {
// console.log('store.getters.roles',JSON.parse(sessionStorage.getItem(ROLES)))
this.loadRoles()
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
loadRoles(){
this.roleList = JSON.parse(sessionStorage.getItem(ROLES))
for(let i = 0;i<this.roleList.length; i++){
this.roleCodeList.push(this.roleList[i].role_code)
}
//采购主管
const cgzg = this.roleCodeList.includes('ProcurementSupervisor')
this.cgzg = cgzg
//车间管理员
const cjgly = this.roleCodeList.includes('WorkshopDirector')
this.cjgly = cjgly
},
handleApproval1(record){
this.$refs.TblBiddingShenqApproval1Model.edit(record);
this.$refs.TblBiddingShenqApproval1Model.disableSubmit = false;
},
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'productName',text:'品名'})
fieldList.push({type:'string',value:'specifications',text:'规格'})
fieldList.push({type:'int',value:'num',text:'数量'})
fieldList.push({type:'string',value:'brand',text:'品牌'})
fieldList.push({type:'string',value:'notes',text:'备注'})
fieldList.push({type:'string',value:'applicant',text:'申请人'})
fieldList.push({type:'string',value:'spOne',text:'一级审批人'})
fieldList.push({type:'string',value:'spTwo',text:'二级审批人'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</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="品名">
<a-input placeholder="请输入品名" v-model="queryParam.productName"></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.workOrder"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="使用日期">
<j-date v-model="queryParam.deliveryTime" placeholder="请选择使用日期" />
</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-button type="primary" icon="download" @click="handleExportXls('tbl_bidding_shenq')">导出</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> -->
<!-- 高级查询区域 -->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<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"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@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>
<template slot="chooseStatusSlot" slot-scope="text, record">
<span v-if="record.chooseStatus == 0">是</span>
<span v-if="record.chooseStatus == 1">否</span>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a @click="handleEdit(record)" v-if="cgzg || cjgly">审批</a>
<a-divider type="vertical" v-if="cgzg || cjgly"/>
<!-- <a @click="handleDetail(record)">详情</a>
<a-divider type="vertical" v-if="record.chooseStatus == 1"/>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)" v-if="record.chooseStatus == 1">
<a>删除</a>
</a-popconfirm> -->
<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 v-if="record.chooseStatus == 1">
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<tbl-bidding-shenq-modal ref="modalForm" @ok="modalFormOk"></tbl-bidding-shenq-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TblBiddingShenqModal from './modules/TblBiddingShenqModal'
import store from '@/store/'
import { ROLES } from "@/store/mutation-types"
export default {
name: 'TblBiddingShenqList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TblBiddingShenqModal
},
data () {
return {
description: 'tbl_bidding_shenq管理页面',
// 表头
columns: [
{
title: '序号',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'品名',
align:"center",
dataIndex: 'productName'
},
{
title:'规格',
align:"center",
dataIndex: 'specifications'
},
{
title:'数量',
align:"center",
dataIndex: 'num'
},
{
title:'单位',
align:"center",
dataIndex: 'danwei'
},
{
title:'物料类别',
align:"center",
dataIndex: 'wuType'
},
{
title:'工作令',
align:"center",
dataIndex: 'workOrder'
},
{
title:'用途',
align:"center",
dataIndex: 'purpose'
},
{
title:'当前库存',
align:"center",
dataIndex: 'operNumber'
},
{
title:'是否从基础表选择',
align:"center",
dataIndex: 'chooseStatus',
scopedSlots: { customRender: 'chooseStatusSlot' }
},
{
title:'使用日期',
align:"center",
dataIndex: 'deliveryTime',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'品牌',
align:"center",
dataIndex: 'brand'
},
{
title:'备注',
align:"center",
dataIndex: 'notes'
},
{
title:'申请人',
align:"center",
dataIndex: 'applicant'
},
{
title:'一级审批人',
align:"center",
dataIndex: 'spOne'
},
{
title:'二级审批人',
align:"center",
dataIndex: 'spTwo'
},
{
title:'不同意备注',
align:"center",
dataIndex: 'noNotes'
},
{
title:'申请日期',
align:"center",
dataIndex: 'sqTime',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/trad/biddingSq/list",
delete: "/trad/tblBiddingShenq/delete",
deleteBatch: "/trad/tblBiddingShenq/deleteBatch",
exportXlsUrl: "/trad/tblBiddingShenq/exportXls",
importExcelUrl: "trad/tblBiddingShenq/importExcel",
},
dictOptions:{},
superFieldList:[],
roleList:[],
roleCodeList:[],
cgzg:false,
cjgly:false,
}
},
created() {
// console.log('store.getters.roles',JSON.parse(sessionStorage.getItem(ROLES)))
this.loadRoles()
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
loadRoles(){
this.roleList = JSON.parse(sessionStorage.getItem(ROLES))
for(let i = 0;i<this.roleList.length; i++){
this.roleCodeList.push(this.roleList[i].role_code)
}
//采购主管
const cgzg = this.roleCodeList.includes('ProcurementSupervisor')
this.cgzg = cgzg
//车间管理员
const cjgly = this.roleCodeList.includes('WorkshopDirector')
this.cjgly = cjgly
},
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'productName',text:'品名'})
fieldList.push({type:'string',value:'specifications',text:'规格'})
fieldList.push({type:'int',value:'num',text:'数量'})
fieldList.push({type:'string',value:'brand',text:'品牌'})
fieldList.push({type:'string',value:'notes',text:'备注'})
fieldList.push({type:'string',value:'applicant',text:'申请人'})
fieldList.push({type:'string',value:'spOne',text:'一级审批人'})
fieldList.push({type:'string',value:'spTwo',text:'二级审批人'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
\ No newline at end of file
... ...
... ... @@ -6,21 +6,21 @@
<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-input placeholder="请输入品名" v-model="queryParam.productName"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="申请日期">
<j-date v-model="queryParam.sqTime" placeholder="请选择申请日期" />
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="工作令">
<a-input placeholder="请输入工作令" v-model="queryParam.workOrder"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="使用日期">
<j-date v-model="queryParam.deliveryTime" placeholder="请选择使用日期" />
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: right; overflow: hidden" class="table-page-search-submitButtons">
<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>
... ... @@ -33,18 +33,18 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('tbl_bidding_shenq')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<!-- <a-button type="primary" icon="download" @click="handleExportXls('tbl_bidding_shenq')">导出</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-upload> -->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<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>
</a-dropdown> -->
</div>
<!-- table区域-begin -->
... ... @@ -68,13 +68,13 @@
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<!-- <template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
</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> -->
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
... ... @@ -87,18 +87,25 @@
下载
</a-button>
</template>
<template slot="chooseStatusSlot" slot-scope="text, record">
<span v-if="record.chooseStatus == 0">是</span>
<span v-if="record.chooseStatus == 1">否</span>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<!-- <a @click="handleDetail(record)">详情</a>
<a-divider type="vertical" v-if="record.chooseStatus == 1"/>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)" v-if="record.chooseStatus == 1">
<a>删除</a>
</a-popconfirm> -->
<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-menu-item v-if="record.chooseStatus == 1">
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
... ... @@ -120,7 +127,8 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TblBiddingShenqModal from './modules/TblBiddingShenqModal'
import store from '@/store/'
import { ROLES } from "@/store/mutation-types"
export default {
name: 'TblBiddingShenqList',
mixins:[JeecgListMixin, mixinDevice],
... ... @@ -180,7 +188,13 @@
{
title:'当前库存',
align:"center",
dataIndex: 'ku'
dataIndex: 'operNumber'
},
{
title:'是否从基础表选择',
align:"center",
dataIndex: 'chooseStatus',
scopedSlots: { customRender: 'chooseStatusSlot' }
},
{
title:'使用日期',
... ... @@ -238,7 +252,7 @@
}
],
url: {
list: "/trad/tblBiddingShenq/list",
list: "/trad/biddingSq/list",
delete: "/trad/tblBiddingShenq/delete",
deleteBatch: "/trad/tblBiddingShenq/deleteBatch",
exportXlsUrl: "/trad/tblBiddingShenq/exportXls",
... ... @@ -247,10 +261,14 @@
},
dictOptions:{},
superFieldList:[],
roleList:[],
roleCodeList:[],
cgzg:false,
cjgly:false,
}
},
created() {
this.getSuperFieldList();
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
... ... @@ -258,6 +276,7 @@
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
... ...
<template>
<j-modal :title="title" :width="width" :visible="visible" :confirmLoading="confirmLoading" :maskClosable="false"
switchFullscreen @ok="handleOk" @cancel="handleCancel" cancelText="关闭">
<a-spin :spinning="confirmLoading">
<!-- <j-form-container :disabled="formDisabled"> -->
<a-form-model ref="form" :model="model" :rules="validatorRules">
<a-row>
<a-col :span="24">
<a-form-model-item label="是否同意" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isagree">
<a-radio-group v-model="value" @change="onChange">
<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="approvalOpinions">
<a-textarea v-model="model.approvalOpinions" placeholder="请输入审批意见" ></a-textarea>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
<!-- </j-form-container> -->
</a-spin>
</j-modal>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TblBiddingShenqApproval1Model',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
title: "操作",
width: 800,
model:{
},
visible: false,
value:'1',
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
isagree: [
{ required: true, message: '请选择!' },
],
approvalOpinions: [
{ required: true, message: '请输入审批意见!' },
],
},
url: {
add: "/bidding_shenq_approval/tblBiddingShenqApproval/add",
edit: "/bidding_shenq_approval/tblBiddingShenqApproval/edit",
queryById: "/bidding_shenq_approval/tblBiddingShenqApproval/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;
this.model.isagree = '1'
console.log('this.model',this.model)
},
onChange(e) {
console.log('radio checked', e.target.value);
this.model.isagree = this.value
},
handleOk () {
const that = this;
// 触发表单验证
this.$refs.form.validate(valid => {
if (valid) {
console.log(this.model)
return
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;
})
}
})
},
close() {
this.$emit('close');
this.visible = false;
this.$refs.form.clearValidate();
},
handleCancel() {
this.close()
},
}
}
</script>
\ No newline at end of file
... ...
<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="approval">
<a-input v-model="model.approval" placeholder="请输入审批人" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="审批意见" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approvalOpinions">
<a-input v-model="model.approvalOpinions" placeholder="请输入审批意见" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="是否同意" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isagree">
<a-input v-model="model.isagree" placeholder="请输入是否同意" ></a-input>
</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: 'TblBiddingShenqApprovalForm',
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: "/bidding_shenq_approval/tblBiddingShenqApproval/add",
edit: "/bidding_shenq_approval/tblBiddingShenqApproval/edit",
queryById: "/bidding_shenq_approval/tblBiddingShenqApproval/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-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail" :disabled="isBianhaoDisabled">
<a-row>
<a-col :span="24">
<a-form-model-item label="选择" :labelCol="labelCol" :wrapperCol="wrapperCol" >
<a-radio-group @change="onChange" v-model="selectedValue">
<a-radio :value="'0'" >
从物料表选择
</a-radio>
<a-radio :value="'1'">
新增
</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="partNumber" v-if="model.chooseStatus ==1">
<a-input v-model="model.partNumber" placeholder="请输入编号" ></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="isBianhaoDisabled"></a-input>
<a-input v-model="model.productName" placeholder="请输入品名" v-if="model.chooseStatus ==1"></a-input>
<a-select size="small" v-model="model.productName" placeholder="请选择品名" allowClear @change = "handleChange" v-if="model.chooseStatus ==0">
<a-select-option v-for="(item,index) in materialOptions" :key="index" :value="item.partNumber" :channel="item">{{ item.productName }}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specifications">
<a-input v-model="model.specifications" placeholder="请输入规格" :disabled="isBianhaoDisabled"></a-input>
<a-input v-model="model.specifications" placeholder="请输入规格" :disabled="model.chooseStatus ==0"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
... ... @@ -19,64 +39,47 @@
v-model="model.num"
placeholder="请输入数量"
style="width: 100%"
:disabled="isBianhaoDisabled"
/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="danwei">
<a-input v-model="model.danwei" placeholder="请输入单位" :disabled="isBianhaoDisabled"></a-input>
<a-input v-model="model.danwei" placeholder="请输入单位" :disabled="model.chooseStatus ==0"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="物料类别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="wuType">
<a-input v-model="model.wuType" placeholder="请输入物料类别" :disabled="isBianhaoDisabled"></a-input>
<a-select size="small" v-model="model.wuType" placeholder="请选择物料类别" allowClear :disabled="model.chooseStatus ==0">
<a-select-option v-for="(item,index) in meterialTypeList" :key="index" :value="item.value" :channel="item">{{ item.label }}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="工作令" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workOrder">
<a-input v-model="model.workOrder" placeholder="请输入工作令" :disabled="isBianhaoDisabled"></a-input>
<a-input v-model="model.workOrder" placeholder="请输入工作令" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="用途" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="purpose">
<a-input v-model="model.purpose" placeholder="请输入用途" :disabled="isBianhaoDisabled"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="当前库存" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ku">
<a-input v-model="model.ku" placeholder="请输入当前库存" :disabled="isBianhaoDisabled"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="申请日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sqTime">
<j-date v-model="model.sqTime" placeholder="请输入申请日期" :disabled="isBianhaoDisabled" />
<a-input v-model="model.purpose" placeholder="请输入用途" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="使用日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryTime">
<j-date v-model="model.deliveryTime" placeholder="请输入使用日期" :disabled="isBianhaoDisabled" />
<j-date v-model="model.deliveryTime" placeholder="请输入使用日期" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brand">
<a-input v-model="model.brand" placeholder="请输入品牌" :disabled="isBianhaoDisabled"></a-input>
<a-input v-model="model.brand" placeholder="请输入品牌" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="notes">
<a-input v-model="model.notes" placeholder="请输入备注" :disabled="isBianhaoDisabled"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="申请人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="applicant">
<a-input v-model="model.applicant" placeholder="请输入申请人" :disabled="isBianhaoDisabled"></a-input>
<a-input v-model="model.notes" placeholder="请输入备注"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<!-- <a-form-model-item label="一级审批人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spOne">
</a-form-model-item> -->
<a-form-model-item
label="一级审批"
:labelCol="labelCol"
... ... @@ -128,6 +131,7 @@
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import { mapGetters } from 'vuex'
import { duplicateCheck } from '@/api/api'
export default {
name: 'TblBiddingShenqForm',
... ... @@ -143,6 +147,7 @@ export default {
data() {
return {
isBianhaoDisabled: false,
materialOptions:[],
model: {},
labelCol: {
xs: { span: 24 },
... ... @@ -154,6 +159,10 @@ export default {
},
confirmLoading: false,
validatorRules: {
partNumber:[
{ required: true, message: '请输入外购件编号!' },
{ validator: this.validatePartNumber },
],
productName: [{ required: true, message: '请输入品名!' }],
specifications: [{ required: true, message: '请输入规格!' }],
num: [{ required: true, message: '请输入数量!' }],
... ... @@ -169,20 +178,38 @@ export default {
applicant: [{ required: true, message: '请输入申请人!' }],
},
url: {
add: '/trad/tblBiddingShenq/add',
add: '/trad/biddingSq/add',
edit: '/trad/tblBiddingShenq/edit',
queryById: '/trad/tblBiddingShenq/queryById',
listAllMaterial:"/meterial/tblMaterial/listAll"
},
selectedValue:'0',
meterialTypeList:[{
value:'1',
label:"零件"
},{
value:'2',
label:"半成品"
},
{
value:'3',
label:"耗材"
},{
value:'4',
label:"劳保"
}]
}
},
computed: {
formDisabled() {
return this.disabled
},
},
},
created() {
this.loadTree()
this.model.chooseStatus = this.selectedValue
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model))
// this.modelDefault = JSON.parse(JSON.stringify(this.model))
},
methods: {
...mapGetters(['nickname', 'avatar', 'userInfo']),
... ... @@ -197,8 +224,11 @@ export default {
this.edit(this.modelDefault)
this.isBianhaoDisabled = false
},
edit(record) {
edit(record) {
this.model = Object.assign({}, record)
this.modelDefault = this.model
// console.log('this.model:::::',this.model)
this.selectedValue = this.model.chooseStatus
this.visible = true
if (this.userInfo().username === 'admin') {
this.isBianhaoDisabled = true
... ... @@ -206,6 +236,74 @@ export default {
this.isBianhaoDisabled = false
}
},
loadTree(){
httpAction(this.url.listAllMaterial,null, "get").then((res) => {
if (res.success) {
this.materialOptions = res.result
} else {
// that.$message.warning(res.message);
}
})
},
onChange(e) {
console.log('this.modelDefault',this.modelDefault)
if(!this.modelDefault.id){
if(e.target.value == 1){
this.model = {}
this.model.chooseStatus = 1
}else if(e.target.value == 0){
this.model = {}
this.model.chooseStatus = 0
}
}else if(this.modelDefault.id){
if(e.target.value == 1){
this.model = {}
this.model.chooseStatus = 1
}else if(e.target.value == 0){
this.model = this.modelDefault
console.log(this.model)
// this.model.chooseStatus = 0
}
}
},
handleChange (value,option){
let tempModel = option.data.attrs.channel
console.log('tempModel',tempModel)
if(tempModel.partNumber){
this.model.partNumber = tempModel.partNumber
}
if(tempModel.productName){
this.model.productName = tempModel.productName
}
if(tempModel.spec){
this.model.specifications = tempModel.spec
}
if(tempModel.type){
this.model.type = tempModel.type
}
if(tempModel.unit){
this.model.danwei = tempModel.unit
}
if(tempModel.meterialType){
this.model.wuType = tempModel.meterialType
}
},
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('编号已存在')
}
})
},
submitForm() {
const that = this
// 触发表单验证
... ...
... ... @@ -35,9 +35,10 @@
</a-col> -->
<a-col :span="24">
<a-form-model-item label="设计人员" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productType">
<a-select size="small" v-model="model.designer" placeholder="请选择设计人员" allowClear>
<!-- <a-select size="small" v-model="model.designer" placeholder="请选择设计人员" allowClear>
<a-select-option v-for="(item,index) in options" :key="index" :value="item.jobId">{{ item.userName }}</a-select-option>
</a-select>
</a-select> -->
<a-cascader :options="options" placeholder="请选择设计人员" @change="onChange" />
</a-form-model-item>
</a-col>
<a-col :span="24">
... ... @@ -57,8 +58,7 @@
import { httpAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import { duplicateCheck } from '@/api/api'
import {listSalary} from '@/api/TblSalaryBase'
import {listProductType} from '@/api/ProductTpye'
import {listProductType,getUserRoleTreeList} from '@/api/ProductTpye'
import moment from 'moment'
export default {
... ... @@ -115,7 +115,7 @@ export default {
// ],
},
url: {
edit: "/order_form/tblOrderForm/updateDesigner"
edit: "/order_form/productDesign/updateDesigner"
}
}
... ... @@ -148,14 +148,20 @@ export default {
},
loadUser(){
var that = this;
listSalary().then((res)=>{
getUserRoleTreeList().then((res)=>{
if(res.success){
console.log('res==',res)
// that.treeData = [];
that.options = res.result
}
});
},
onChange(value) {
console.log('onChange1',value);
console.log('onChange11',value[value.length-1]);
this.model.designRole = value[0]
this.model.designer = value[1]
},
close() {
this.$emit('close');
this.visible = false;
... ...
... ... @@ -3,60 +3,71 @@
switchFullscreen @ok="handleOk" @cancel="handleCancel" cancelText="关闭">
<a-spin :spinning="confirmLoading">
<div style="display: flex">
<div style="display:inline-block;width:45%;margin: auto;">
<div style="display:inline-block;width:50%;margin: auto;">
<table>
<tr>
<th scop="col">订单号:</th>
<th scop="col" class="table_lable">订单号:</th>
<th scop="col">{{model.orderId}}</th>
</tr>
<tr>
<th scop="col">订货单位:</th>
<th scop="col" class="table_lable">订货单位:</th>
<th scop="col">{{model.orderCompany}}</th>
</tr>
<tr>
<th scop="col">工作令:</th>
<th scop="col" class="table_lable">工作令:</th>
<th scop="col">{{model.workOrder}}</th>
</tr>
<tr>
<th scop="col">产品名称:</th>
<th scop="col" class="table_lable">产品名称:</th>
<th scop="col">{{model.productName}}</th>
</tr>
<tr>
<th scop="col">产品类型:</th>
<th scop="col">{{model.productType}}</th>
<th scop="col" class="table_lable">产品类型:</th>
<th scop="col">
<span v-if="model.productType =='XC'">线槽</span>
<span v-if="model.productType =='JD'">接地</span>
<span v-if="model.productType =='QZ'">卡子</span>
<span v-if="model.productType =='GX'">柜、箱、盒</span>
<span v-if="model.productType =='SJ'">司机室</span>
<span v-if="model.productType =='FS'">附属钢</span>
</th>
</tr>
<tr>
<th scop="col">任务下达时间:</th>
<th scop="col" class="table_lable">任务下达时间:</th>
<th scop="col">{{model.orderDate}}</th>
</tr>
<tr>
<th scop="col">派工时间:</th>
<th scop="col" class="table_lable">派工时间:</th>
<th scop="col">{{model.dispatchDate}}</th>
</tr>
<tr>
<th scop="col">交货时间:</th>
<th scop="col" class="table_lable">交货时间:</th>
<th scop="col">{{model.deliveryDate}}</th>
</tr>
<tr>
<th scop="col">数量(套):</th>
<th scop="col" class="table_lable">数量(套):</th>
<th scop="col">{{model.quantity}}</th>
</tr>
<tr>
<th scop="col">总工时:</th>
<th scop="col" class="table_lable">总工时:</th>
<th scop="col">{{model.totalWorkingHours}}</th>
</tr>
<tr>
<th scop="col">已派发工时:</th>
<th scop="col" class="table_lable">已派发工时:</th>
<th scop="col">{{model.dispatchedWorkingHours}}</th>
</tr>
<tr v-if="model.files">
<th scop="col">主料图文件:</th>
<th scop="col">{{model.files}}</th>
<th scop="col" class="table_lable">主料图文件:</th>
<th scop="col">
<div v-for="(item,index) in model.files.split(',')" :key="index">
<a :href=httpUrl+item target="_blank">{{index+1}}. {{item.replace("temp/","")}}</a><br>
</div>
</th>
</tr>
</table>
</div>
<div style="display:inline-block;width:45%;">
<div class="show">
<div class="show" >
<img :src="getImgView(show)" :preview="num" alt="" height="100px">
</div>
<div class="imgBox">
... ... @@ -88,8 +99,9 @@ export default {
return {
title: "生产订单详情",
baseURL:apiBaseUrl,
httpUrl:window._CONFIG['staticDomainURL']+'/',
options:[],
width: 800,
width: 1000,
visible: false,
model: {
},
... ... @@ -178,6 +190,13 @@ export default {
}
</script>
<style scoped>
tr {
height: 30px; /* 设置行高为50px */
/* padding: 10px; 设置行内填充为10px */
}
.table_lable{
text-align: right;
}
.imgBox{
display: flex;
}
... ... @@ -187,7 +206,9 @@ export default {
height: 50px;
margin: 10px;
}
.imgBox img:hover{
cursor: pointer;
}
.imgBox div{
margin: 5px;
}
... ... @@ -201,4 +222,7 @@ border: 2px solid rgb(141, 134, 134);
height: 200px;
width: 200px;
}
.show:hover{
cursor: pointer;
}
</style>
\ No newline at end of file
... ...
... ... @@ -38,13 +38,8 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleUpload()" type="primary" icon="plus">上传设计图及材料表</a-button>
<!-- <a-button type="primary" icon="download" @click="handleExportXls('订单表')">导出</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> -->
<!-- 高级查询区域 -->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> -->
<a-button @click="handleUpload()" type="primary" icon="plus" :disabled="selectedRowKeys.length > 0 && productDesignStatus ==1">上传设计图及材料表</a-button>
</div>
<!-- table区域-begin -->
... ... @@ -216,7 +211,7 @@
}
],
url: {
list: "/order_form/tblOrderForm/productDesignList",
list: "/order_form/productDesign/productDesignList",
delete: "/order_form/tblOrderForm/delete",
deleteBatch: "/order_form/tblOrderForm/deleteBatch",
exportXlsUrl: "/order_form/tblOrderForm/exportXls",
... ... @@ -240,6 +235,7 @@
superFieldList:[],
tblWorkOrderMainId: '',
orderId:'',
productDesignStatus:''
}
},
created() {
... ... @@ -294,6 +290,7 @@
this.$message.error("请先选中一条数据!")
return
}
// console.log('this.selectionRows',this.selectionRows)
this.$refs.ProductDesignModal.edit(this.selectedRowKeys[0],null);
this.$refs.ProductDesignModal.disableSubmit = false;
},
... ... @@ -308,6 +305,7 @@
on: {
click: () => {
this.onSelectChange(record.id.split(","), [record]);
}
}
}
... ... @@ -326,6 +324,7 @@
this.selectionRows = selectionRows;
this.tblWorkOrderMainId = selectionRows[0]['id']
this.orderId = selectionRows[0]['orderId'];
this.productDesignStatus = selectionRows[0]['productDesignStatus']
},
getSuperFieldList(){
let fieldList=[];
... ...
... ... @@ -5,18 +5,45 @@
<a-form-model ref="form" :model="model" :rules="validatorRules">
<a-row>
<a-col :span="24">
<a-form-model-item label="选择" :labelCol="labelCol" :wrapperCol="wrapperCol" >
<a-radio-group @change="onChange" v-model="model.chooseStatus">
<a-radio :value="0" >
从物料表选择
</a-radio>
<a-radio :value="1">
新增
</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="partNumber" v-if="model.chooseStatus ==1">
<a-input v-model="model.partNumber" placeholder="请输入外购件编号" ></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-input v-model="model.productName" placeholder="请输入外购件名称" v-if="model.chooseStatus ==1"></a-input>
<a-select size="small" v-model="model.productName" placeholder="请选择外购件" allowClear @change = "handleChange" v-if="model.chooseStatus ==0">
<a-select-option v-for="(item,index) in materialOptions" :key="index" :value="item.partNumber" :channel="item">{{ item.productName }}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specifications">
<a-input v-model="model.specifications" placeholder="请输入规格" :disabled="model.chooseStatus ==0"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="规格型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specifications">
<a-input v-model="model.specifications" placeholder="请输入规格型号"></a-input>
<a-form-model-item label="型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
<a-input v-model="model.type" placeholder="请输入型号" :disabled="model.chooseStatus ==0"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="外形尺寸" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="appearanceSize">
<a-input v-model="model.appearanceSize" placeholder="请输入外形尺寸"></a-input>
<a-form-model-item label="物料类别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="wuType">
<a-select size="small" v-model="model.wuType" placeholder="请选择物料类别" allowClear :disabled="model.chooseStatus ==0">
<a-select-option v-for="(item,index) in meterialTypeList" :key="index" :value="item.value" :channel="item">{{ item.label }}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24">
... ... @@ -26,7 +53,7 @@
</a-col>
<a-col :span="24">
<a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="danwei">
<a-input v-model="model.danwei" placeholder="请输入单位"></a-input>
<a-input v-model="model.danwei" placeholder="请输入单位" :disabled="model.chooseStatus ==0"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
... ... @@ -68,9 +95,11 @@ export default {
return {
title: "新增材料及外购件表",
options:[],
materialOptions:[],
width: 800,
visible: false,
model: {
chooseStatus:0
},
labelCol: {
xs: { span: 24 },
... ... @@ -80,17 +109,35 @@ export default {
xs: { span: 24 },
sm: { span: 16 },
},
meterialTypeList:[{
value:'1',
label:"零件"
},{
value:'2',
label:"半成品"
},
{
value:'3',
label:"耗材"
},{
value:'4',
label:"劳保"
}],
confirmLoading: false,
validatorRules: {
partNumber:[
{ required: true, message: '请输入外购件编号!' },
{ validator: this.validatePartNumber },
],
productName: [
{ required: true, message: '请输入外购件名称!' },
// {validator:this.validProductName, trigger: 'blur' }
],
specifications: [
{ required: true, message: '请输入规格型号!' },
{ required: true, message: '请输入规格!' },
],
appearanceSize: [
{ required: true, message: '请输入外形尺寸!' },
type: [
{ required: true, message: '请输入型号!' },
],
danwei: [
{ required: true, message: '请输入单位!' },
... ... @@ -108,39 +155,46 @@ export default {
url: {
add: "/order_form/tblOrderForm/add",
edit: "/order_form/tblOrderForm/edit",
}
listAllMaterial:"/meterial/tblMaterial/listAll"
},
value: 0,
}
},
created() {
// this.model.status = '未下单'
//备份model原始值
// this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
validProductName(rule, value, callback) {
console.log('rule',rule)
console.log('value',value)
console.log('this.model',this.model)
},
add() {
this.edit();
},
edit(id) {
this.model.orderId = id
this.model.chooseStatus = 0
console.log('this.model:===',this.model)
// this.model = Object.assign({}, record);
this.visible = true;
// this.loadTree()
this.loadTree()
},
loadTree(){
var that = this;
listProductType().then((res)=>{
if(res.success){
// that.treeData = [];
that.options = res.result
}
});
httpAction(this.url.listAllMaterial,null, "get").then((res) => {
if (res.success) {
this.materialOptions = res.result
} else {
// that.$message.warning(res.message);
}
})
},
close() {
this.$emit('close');
this.visible = false;
this.$refs.form.clearValidate();
this.model = {}
this.model.chooseStatus = 0
},
handleOk() {
const that = this;
... ... @@ -149,43 +203,54 @@ export default {
this.$refs.form.validate(valid => {
if (valid) {
console.log(this.model)
// return
this.$emit('childByValue', this.model)
that.close();
this.model = {}
// // return
// 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
}
})
},
onChange(e) {
if(e.target.value == 1){
this.model = {}
this.model.chooseStatus = 1
}else if(e.target.value == 0){
this.model = {}
this.model.chooseStatus = 0
}
},
handleChange (value,option){
let tempModel = option.data.attrs.channel
console.log('tempModel',tempModel)
if(tempModel.partNumber){
this.model.partNumber = tempModel.partNumber
}
if(tempModel.productName){
this.model.productName = tempModel.productName
}
if(tempModel.spec){
this.model.specifications = tempModel.spec
}
if(tempModel.type){
this.model.type = tempModel.type
}
if(tempModel.unit){
this.model.danwei = tempModel.unit
}
if(tempModel.meterialType){
this.model.wuType = tempModel.meterialType
}
},
handleCancel() {
this.close()
},
validateBidNo(rule, value, callback) {
validatePartNumber(rule, value, callback) {
var params = {
tableName: 'tbl_order_form',
fieldName: 'order_id',
tableName: 'tbl_material',
fieldName: 'part_number',
fieldVal: value,
dataId: this.model.id,
}
... ... @@ -193,7 +258,7 @@ export default {
if (res.success) {
callback()
} else {
callback('编号已存在!')
callback('编号已存在')
}
})
},
... ...
... ... @@ -69,7 +69,7 @@
import { httpAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import { duplicateCheck } from '@/api/api'
import {listProductType} from '@/api/ProductTpye'
import {listDesign} from '@/api/ProductTpye'
import {getOneOrder} from '@/api/ProductTpye'
import BiddingSqFormModal from './BiddingSqFormModal'
import {queryDesignByOrderId} from '@/api/TblSalaryBase'
... ... @@ -101,7 +101,7 @@ export default {
url: {
add: "/product_design/tblProductDesign/add",
edit: "/product_design/tblProductDesign/edit",
list:"/trad/tblBiddingShenq/list",
list:"/trad/tblBiddingShenq/listDesign",
},
id:'',
dataSource: [],
... ... @@ -119,14 +119,14 @@ export default {
key: 'productName',
},
{
title: '规格型号',
title: '规格',
dataIndex: 'specifications',
key: 'specifications',
},
{
title: '外形尺寸',
dataIndex: 'appearanceSize',
key: 'appearanceSize',
title: '型号',
dataIndex: 'type',
key: 'type',
},
{
title: '品牌及技术条件',
... ... @@ -166,9 +166,6 @@ export default {
}
},
created() {
// this.model.status = '未下单'
//备份model原始值
// this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add() {
... ... @@ -180,9 +177,8 @@ export default {
this.visible = true;
if(record){
this.titlea = '编辑'
console.log('============1========')
this.model = Object.assign({}, record);
console.log('============1========',this.model)
console.log('this.model=======',this.model)
this.loadDesign();
this.loadBiddingSq()
}else{
... ... @@ -194,7 +190,7 @@ export default {
loadOrder(){
var that = this;
getOneOrder(that.id).then((res)=>{
console.log('============4========')
// console.log('============4========')
console.log(res)
if(res.success){
this.model = res.result
... ... @@ -203,7 +199,7 @@ export default {
},
loadDesign(){
queryDesignByOrderId(this.model.orderId).then((res)=>{
console.log('============2========')
// console.log('============2========')
// console.log('loadDesign',res)
if(res.success){
this.model.id = res.result.id
... ... @@ -214,30 +210,32 @@ export default {
});
},
loadBiddingSq(){
// console.log('this.model',this.model)
const tempModel = {
console.log('this.model',this.model)
let tblBiddingShenq = {
orderId:this.model.orderId
}
console.log(tempModel)
httpAction(this.url.list, tempModel, "get").then((res) => {
if (res.success) {
console.log('============3========')
// console.log('loadBiddingSq',res)
this.dataSource = res.result.records
console.log(this.model)
} else {
// that.$message.warning(res.message);
}
})
console.log(tblBiddingShenq)
listDesign(tblBiddingShenq).then((res)=>{
console.log('loadDesign',res)
if(res.success){
this.dataSource = res.result.records
}
});
// httpAction(this.url.list, tblBiddingShenq, "get").then((res) => {
// if (res.success) {
// // console.log('============3========')
// // console.log('loadBiddingSq',res)
// this.dataSource = res.result.records
// // console.log(this.model)
// } else {
// // that.$message.warning(res.message);
// }
// })
},
childByValue (childValue) {
// childValue就是子组件传过来的值
childValue.workOrder = this.model.workOrder
this.dataSource.push(childValue)
// this.dataSource = this.dataSource.filter((item) => {
// console.log(['item.orderId',item.orderId])
// return item.orderId !== undefined
// })
// console.log('this.dataSource==',this.dataSource)
},
handleDelete(index){
this.dataSource.splice(index, 1);
... ... @@ -250,6 +248,7 @@ export default {
this.$emit('close');
this.visible = false;
this.$refs.form.clearValidate();
this.dataSource = []
},
handleOk() {
const that = this;
... ... @@ -257,7 +256,7 @@ export default {
this.$refs.form.validate(valid => {
if (valid) {
this.model.biddingSqList = this.dataSource
console.log(this.model)
// console.log(this.model)
// return
that.confirmLoading = true;
let httpurl = '';
... ...
... ... @@ -132,7 +132,7 @@
checkKey: this.currdatetime,
remember_me: rememberMe,
}
console.log("登录参数", loginParams)
// console.log("登录参数", loginParams)
this.Login(loginParams).then((res) => {
this.$emit('success', res.result)
}).catch((err) => {
... ...
... ... @@ -66,7 +66,7 @@
captcha: this.model.captcha,
remember_me: rememberMe
}
console.log("登录参数", loginParams)
// console.log("登录参数", loginParams)
this.PhoneLogin(loginParams).then((res) => {
this.$emit('success', res.result)
}).catch((err) => {
... ...