作者 张晓杰

采购申请管理

@@ -13,6 +13,20 @@ export function listProductType(parameter) { @@ -13,6 +13,20 @@ export function listProductType(parameter) {
13 return axios({ 13 return axios({
14 url: '/order_form/tblOrderForm/queryById/'+id, 14 url: '/order_form/tblOrderForm/queryById/'+id,
15 method: 'get', 15 method: 'get',
16 - 16 + })
  17 + }
  18 + export function listDesign(parameter) {
  19 + return axios({
  20 + url: '/trad/tblBiddingShenq/listDesign',
  21 + method: 'get',
  22 + params:parameter
  23 + })
  24 + }
  25 +
  26 +
  27 + export function getUserRoleTreeList() {
  28 + return axios({
  29 + url: '/sys/role/getUserRoleTreeList',
  30 + method: 'get'
17 }) 31 })
18 } 32 }
@@ -73,7 +73,7 @@ export const JeecgListMixin = { @@ -73,7 +73,7 @@ export const JeecgListMixin = {
73 }, 73 },
74 methods: { 74 methods: {
75 loadData(arg) { 75 loadData(arg) {
76 - console.log('this.url:',this.url) 76 + // console.log('this.url:',this.url)
77 if (!this.url.list) { 77 if (!this.url.list) {
78 this.$message.error("请设置url.list属性!") 78 this.$message.error("请设置url.list属性!")
79 return 79 return
@@ -13,11 +13,13 @@ const getters = { @@ -13,11 +13,13 @@ const getters = {
13 userInfo: state => {state.user.info = Vue.ls.get(USER_INFO); return state.user.info}, 13 userInfo: state => {state.user.info = Vue.ls.get(USER_INFO); return state.user.info},
14 addRouters: state => state.permission.addRouters, 14 addRouters: state => state.permission.addRouters,
15 onlAuthFields: state => {return state.online.authFields }, 15 onlAuthFields: state => {return state.online.authFields },
16 - enhanceJs:(state) => (code) => { 16 + enhanceJs:(state) => (code) => {
17 state.enhance.enhanceJs[code] = Vue.ls.get(ENHANCE_PRE+code); 17 state.enhance.enhanceJs[code] = Vue.ls.get(ENHANCE_PRE+code);
18 return state.enhance.enhanceJs[code] 18 return state.enhance.enhanceJs[code]
19 }, 19 },
20 sysSafeMode: state => state.user.sysSafeMode, 20 sysSafeMode: state => state.user.sysSafeMode,
  21 + roles: state => state.user.roles,
  22 + // userInfo: state => {state.user.roles = Vue.ls.get(USER_INFO); return state.user.info},
21 23
22 } 24 }
23 25
1 import Vue from 'vue' 1 import Vue from 'vue'
2 import { login, logout, phoneLogin, thirdLogin } from "@/api/login" 2 import { login, logout, phoneLogin, thirdLogin } from "@/api/login"
3 -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" 3 +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"
4 import { welcome } from "@/utils/util" 4 import { welcome } from "@/utils/util"
5 import { queryPermissionsByUser } from '@/api/api' 5 import { queryPermissionsByUser } from '@/api/api'
6 import { getAction } from '@/api/manage' 6 import { getAction } from '@/api/manage'
@@ -37,6 +37,10 @@ const user = { @@ -37,6 +37,10 @@ const user = {
37 SET_INFO: (state, info) => { 37 SET_INFO: (state, info) => {
38 state.info = info 38 state.info = info
39 }, 39 },
  40 + SET_ROLE: (state, roles) => {
  41 + // console.log('roles',roles)
  42 + state.roles = roles
  43 + },
40 SET_TENANT: (state, id) => { 44 SET_TENANT: (state, id) => {
41 state.tenantid = id 45 state.tenantid = id
42 }, 46 },
@@ -79,16 +83,22 @@ const user = { @@ -79,16 +83,22 @@ const user = {
79 return new Promise((resolve, reject) => { 83 return new Promise((resolve, reject) => {
80 login(userInfo).then(response => { 84 login(userInfo).then(response => {
81 if(response.code =='200'){ 85 if(response.code =='200'){
  86 + console.log('-----------登录------------',response)
82 const result = response.result 87 const result = response.result
83 const userInfo = result.userInfo 88 const userInfo = result.userInfo
  89 + const roles = result.roles
  90 + console.log('roles---',roles)
84 Vue.ls.set(ACCESS_TOKEN, result.token, 7 * 24 * 60 * 60 * 1000) 91 Vue.ls.set(ACCESS_TOKEN, result.token, 7 * 24 * 60 * 60 * 1000)
85 Vue.ls.set(USER_NAME, userInfo.username, 7 * 24 * 60 * 60 * 1000) 92 Vue.ls.set(USER_NAME, userInfo.username, 7 * 24 * 60 * 60 * 1000)
86 Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000) 93 Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000)
  94 + // Vue.ls.set(ROLES, roles, 7 * 24 * 60 * 60 * 1000)
87 Vue.ls.set(UI_CACHE_DB_DICT_DATA, result.sysAllDictItems, 7 * 24 * 60 * 60 * 1000) 95 Vue.ls.set(UI_CACHE_DB_DICT_DATA, result.sysAllDictItems, 7 * 24 * 60 * 60 * 1000)
88 commit('SET_TOKEN', result.token) 96 commit('SET_TOKEN', result.token)
89 commit('SET_INFO', userInfo) 97 commit('SET_INFO', userInfo)
  98 + commit('SET_ROLE', roles)
90 commit('SET_NAME', { username: userInfo.username,realname: userInfo.realname, welcome: welcome() }) 99 commit('SET_NAME', { username: userInfo.username,realname: userInfo.realname, welcome: welcome() })
91 commit('SET_AVATAR', userInfo.avatar) 100 commit('SET_AVATAR', userInfo.avatar)
  101 + sessionStorage.setItem(ROLES,JSON.stringify(roles));
92 resolve(response) 102 resolve(response)
93 }else{ 103 }else{
94 reject(response) 104 reject(response)
@@ -171,6 +181,7 @@ const user = { @@ -171,6 +181,7 @@ const user = {
171 Vue.ls.remove(UI_CACHE_DB_DICT_DATA) 181 Vue.ls.remove(UI_CACHE_DB_DICT_DATA)
172 Vue.ls.remove(CACHE_INCLUDED_ROUTES) 182 Vue.ls.remove(CACHE_INCLUDED_ROUTES)
173 Vue.ls.remove(TENANT_ID) 183 Vue.ls.remove(TENANT_ID)
  184 + sessionStorage.setItem(ROLES,null);
174 //console.log('logoutToken: '+ logoutToken) 185 //console.log('logoutToken: '+ logoutToken)
175 logout(logoutToken).then(() => { 186 logout(logoutToken).then(() => {
176 if (process.env.VUE_APP_SSO == 'true') { 187 if (process.env.VUE_APP_SSO == 'true') {
@@ -20,6 +20,7 @@ export const INDEX_MAIN_PAGE_PATH = '/dashboard/analysis' @@ -20,6 +20,7 @@ export const INDEX_MAIN_PAGE_PATH = '/dashboard/analysis'
20 export const OAUTH2_LOGIN_PAGE_PATH = '/oauth2-app/login' 20 export const OAUTH2_LOGIN_PAGE_PATH = '/oauth2-app/login'
21 export const TENANT_ID = 'TENANT_ID' 21 export const TENANT_ID = 'TENANT_ID'
22 export const ONL_AUTH_FIELDS = 'ONL_AUTH_FIELDS' 22 export const ONL_AUTH_FIELDS = 'ONL_AUTH_FIELDS'
  23 +export const ROLES = 'ROLES'
23 //路由缓存问题,关闭了tab页时再打开就不刷新 #842 24 //路由缓存问题,关闭了tab页时再打开就不刷新 #842
24 export const CACHE_INCLUDED_ROUTES = 'CACHE_INCLUDED_ROUTES' 25 export const CACHE_INCLUDED_ROUTES = 'CACHE_INCLUDED_ROUTES'
25 export const CONTENT_WIDTH_TYPE = { 26 export const CONTENT_WIDTH_TYPE = {
  1 +<template>
  2 + <a-card :bordered="false">
  3 + <!-- 查询区域 -->
  4 + <div class="table-page-search-wrapper">
  5 + <a-form layout="inline" @keyup.enter.native="searchQuery">
  6 + <a-row :gutter="24">
  7 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  8 + <a-form-item label="品名">
  9 + <a-input placeholder="请输入品名" v-model="queryParam.productName"></a-input>
  10 + </a-form-item>
  11 + </a-col>
  12 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  13 + <a-form-item label="工作令">
  14 + <a-input placeholder="请输入工作令" v-model="queryParam.workOrder"></a-input>
  15 + </a-form-item>
  16 + </a-col>
  17 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  18 + <a-form-item label="使用日期">
  19 + <j-date v-model="queryParam.deliveryTime" placeholder="请选择使用日期" />
  20 + </a-form-item>
  21 + </a-col>
  22 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  23 + <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
  24 + <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  25 + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  26 + </span>
  27 + </a-col>
  28 + </a-row>
  29 + </a-form>
  30 + </div>
  31 + <!-- 查询区域-END -->
  32 +
  33 + <!-- table区域-begin -->
  34 + <div>
  35 + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  36 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  37 + <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  38 + </div>
  39 +
  40 + <a-table
  41 + ref="table"
  42 + size="middle"
  43 + :scroll="{x:true}"
  44 + bordered
  45 + rowKey="id"
  46 + :columns="columns"
  47 + :dataSource="dataSource"
  48 + :pagination="ipagination"
  49 + :loading="loading"
  50 + class="j-table-force-nowrap"
  51 + @change="handleTableChange">
  52 +
  53 + <!-- <template slot="htmlSlot" slot-scope="text">
  54 + <div v-html="text"></div>
  55 + </template> -->
  56 + <!-- <template slot="imgSlot" slot-scope="text,record">
  57 + <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  58 + <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  59 + </template> -->
  60 + <template slot="fileSlot" slot-scope="text">
  61 + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  62 + <a-button
  63 + v-else
  64 + :ghost="true"
  65 + type="primary"
  66 + icon="download"
  67 + size="small"
  68 + @click="downloadFile(text)">
  69 + 下载
  70 + </a-button>
  71 + </template>
  72 + <template slot="chooseStatusSlot" slot-scope="text, record">
  73 + <span v-if="record.chooseStatus == 0">是</span>
  74 + <span v-if="record.chooseStatus == 1">否</span>
  75 + </template>
  76 + <span slot="action" slot-scope="text, record">
  77 + <a @click="handleApproval1(record)">审批</a>
  78 + </span>
  79 + </a-table>
  80 + </div>
  81 + <TblBiddingShenqApproval1Model ref="TblBiddingShenqApproval1Model" @ok="modalFormOk"></TblBiddingShenqApproval1Model>
  82 + </a-card>
  83 +</template>
  84 +
  85 +<script>
  86 +
  87 + import '@/assets/less/TableExpand.less'
  88 + import { mixinDevice } from '@/utils/mixin'
  89 + import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  90 + import TblBiddingShenqModal from './modules/TblBiddingShenqModal'
  91 + import store from '@/store/'
  92 + import { ROLES } from "@/store/mutation-types"
  93 + import TblBiddingShenqApproval1Model from './modules/TblBiddingShenqApproval1Model'
  94 + export default {
  95 + name: 'TblBiddingShenqList',
  96 + mixins:[JeecgListMixin, mixinDevice],
  97 + components: {
  98 + TblBiddingShenqApproval1Model
  99 + },
  100 + data () {
  101 + return {
  102 + description: 'tbl_bidding_shenq管理页面',
  103 + // 表头
  104 + columns: [
  105 + {
  106 + title: '序号',
  107 + dataIndex: '',
  108 + key:'rowIndex',
  109 + width:60,
  110 + align:"center",
  111 + customRender:function (t,r,index) {
  112 + return parseInt(index)+1;
  113 + }
  114 + },
  115 + {
  116 + title:'品名',
  117 + align:"center",
  118 + dataIndex: 'productName'
  119 + },
  120 + {
  121 + title:'规格',
  122 + align:"center",
  123 + dataIndex: 'specifications'
  124 + },
  125 + {
  126 + title:'数量',
  127 + align:"center",
  128 + dataIndex: 'num'
  129 + },
  130 + {
  131 + title:'单位',
  132 + align:"center",
  133 + dataIndex: 'danwei'
  134 + },
  135 + {
  136 + title:'物料类别',
  137 + align:"center",
  138 + dataIndex: 'wuType'
  139 + },
  140 + {
  141 + title:'工作令',
  142 + align:"center",
  143 + dataIndex: 'workOrder'
  144 + },
  145 + {
  146 + title:'用途',
  147 + align:"center",
  148 + dataIndex: 'purpose'
  149 + },
  150 + {
  151 + title:'当前库存',
  152 + align:"center",
  153 + dataIndex: 'operNumber'
  154 + },
  155 + {
  156 + title:'是否从基础表选择',
  157 + align:"center",
  158 + dataIndex: 'chooseStatus',
  159 + scopedSlots: { customRender: 'chooseStatusSlot' }
  160 + },
  161 + {
  162 + title:'使用日期',
  163 + align:"center",
  164 + dataIndex: 'deliveryTime',
  165 + customRender:function (text) {
  166 + return !text?"":(text.length>10?text.substr(0,10):text)
  167 + }
  168 + },
  169 + {
  170 + title:'品牌',
  171 + align:"center",
  172 + dataIndex: 'brand'
  173 + },
  174 + {
  175 + title:'备注',
  176 + align:"center",
  177 + dataIndex: 'notes'
  178 + },
  179 + {
  180 + title:'申请人',
  181 + align:"center",
  182 + dataIndex: 'applicant'
  183 + },
  184 + {
  185 + title:'一级审批人',
  186 + align:"center",
  187 + dataIndex: 'spOne'
  188 + },
  189 + {
  190 + title:'二级审批人',
  191 + align:"center",
  192 + dataIndex: 'spTwo'
  193 + },
  194 + {
  195 + title:'不同意备注',
  196 + align:"center",
  197 + dataIndex: 'noNotes'
  198 + },
  199 + {
  200 + title:'申请日期',
  201 + align:"center",
  202 + dataIndex: 'sqTime',
  203 + customRender:function (text) {
  204 + return !text?"":(text.length>10?text.substr(0,10):text)
  205 + }
  206 + },
  207 + {
  208 + title: '操作',
  209 + dataIndex: 'action',
  210 + align:"center",
  211 + fixed:"right",
  212 + width:147,
  213 + scopedSlots: { customRender: 'action' }
  214 + }
  215 + ],
  216 + url: {
  217 + list: "/trad/biddingSq/list",
  218 + delete: "/trad/tblBiddingShenq/delete",
  219 + deleteBatch: "/trad/tblBiddingShenq/deleteBatch",
  220 + exportXlsUrl: "/trad/tblBiddingShenq/exportXls",
  221 + importExcelUrl: "trad/tblBiddingShenq/importExcel",
  222 +
  223 + },
  224 + dictOptions:{},
  225 + superFieldList:[],
  226 + roleList:[],
  227 + roleCodeList:[],
  228 + cgzg:false,
  229 + cjgly:false,
  230 + }
  231 + },
  232 + created() {
  233 + // console.log('store.getters.roles',JSON.parse(sessionStorage.getItem(ROLES)))
  234 + this.loadRoles()
  235 +
  236 + this.getSuperFieldList();
  237 + },
  238 + computed: {
  239 + importExcelUrl: function(){
  240 + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  241 + },
  242 + },
  243 + methods: {
  244 + loadRoles(){
  245 + this.roleList = JSON.parse(sessionStorage.getItem(ROLES))
  246 + for(let i = 0;i<this.roleList.length; i++){
  247 + this.roleCodeList.push(this.roleList[i].role_code)
  248 + }
  249 + //采购主管
  250 + const cgzg = this.roleCodeList.includes('ProcurementSupervisor')
  251 + this.cgzg = cgzg
  252 + //车间管理员
  253 + const cjgly = this.roleCodeList.includes('WorkshopDirector')
  254 + this.cjgly = cjgly
  255 + },
  256 + handleApproval1(record){
  257 + this.$refs.TblBiddingShenqApproval1Model.edit(record);
  258 + this.$refs.TblBiddingShenqApproval1Model.disableSubmit = false;
  259 + },
  260 + initDictConfig(){
  261 + },
  262 + getSuperFieldList(){
  263 + let fieldList=[];
  264 + fieldList.push({type:'string',value:'productName',text:'品名'})
  265 + fieldList.push({type:'string',value:'specifications',text:'规格'})
  266 + fieldList.push({type:'int',value:'num',text:'数量'})
  267 + fieldList.push({type:'string',value:'brand',text:'品牌'})
  268 + fieldList.push({type:'string',value:'notes',text:'备注'})
  269 + fieldList.push({type:'string',value:'applicant',text:'申请人'})
  270 + fieldList.push({type:'string',value:'spOne',text:'一级审批人'})
  271 + fieldList.push({type:'string',value:'spTwo',text:'二级审批人'})
  272 + this.superFieldList = fieldList
  273 + }
  274 + }
  275 + }
  276 +</script>
  277 +<style scoped>
  278 + @import '~@assets/less/common.less';
  279 +</style>
  1 +<template>
  2 + <a-card :bordered="false">
  3 + <!-- 查询区域 -->
  4 + <div class="table-page-search-wrapper">
  5 + <a-form layout="inline" @keyup.enter.native="searchQuery">
  6 + <a-row :gutter="24">
  7 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  8 + <a-form-item label="品名">
  9 + <a-input placeholder="请输入品名" v-model="queryParam.productName"></a-input>
  10 + </a-form-item>
  11 + </a-col>
  12 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  13 + <a-form-item label="工作令">
  14 + <a-input placeholder="请输入工作令" v-model="queryParam.workOrder"></a-input>
  15 + </a-form-item>
  16 + </a-col>
  17 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  18 + <a-form-item label="使用日期">
  19 + <j-date v-model="queryParam.deliveryTime" placeholder="请选择使用日期" />
  20 + </a-form-item>
  21 + </a-col>
  22 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  23 + <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
  24 + <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  25 + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  26 + </span>
  27 + </a-col>
  28 + </a-row>
  29 + </a-form>
  30 + </div>
  31 + <!-- 查询区域-END -->
  32 +
  33 + <!-- 操作按钮区域 -->
  34 + <div class="table-operator">
  35 + <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  36 + <!-- <a-button type="primary" icon="download" @click="handleExportXls('tbl_bidding_shenq')">导出</a-button> -->
  37 + <!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  38 + <a-button type="primary" icon="import">导入</a-button>
  39 + </a-upload> -->
  40 + <!-- 高级查询区域 -->
  41 + <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
  42 + <a-dropdown v-if="selectedRowKeys.length > 0">
  43 + <a-menu slot="overlay">
  44 + <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
  45 + </a-menu>
  46 + <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
  47 + </a-dropdown> -->
  48 + </div>
  49 +
  50 + <!-- table区域-begin -->
  51 + <div>
  52 + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  53 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  54 + <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  55 + </div>
  56 +
  57 + <a-table
  58 + ref="table"
  59 + size="middle"
  60 + :scroll="{x:true}"
  61 + bordered
  62 + rowKey="id"
  63 + :columns="columns"
  64 + :dataSource="dataSource"
  65 + :pagination="ipagination"
  66 + :loading="loading"
  67 + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  68 + class="j-table-force-nowrap"
  69 + @change="handleTableChange">
  70 +
  71 + <!-- <template slot="htmlSlot" slot-scope="text">
  72 + <div v-html="text"></div>
  73 + </template> -->
  74 + <!-- <template slot="imgSlot" slot-scope="text,record">
  75 + <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  76 + <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  77 + </template> -->
  78 + <template slot="fileSlot" slot-scope="text">
  79 + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  80 + <a-button
  81 + v-else
  82 + :ghost="true"
  83 + type="primary"
  84 + icon="download"
  85 + size="small"
  86 + @click="downloadFile(text)">
  87 + 下载
  88 + </a-button>
  89 + </template>
  90 + <template slot="chooseStatusSlot" slot-scope="text, record">
  91 + <span v-if="record.chooseStatus == 0">是</span>
  92 + <span v-if="record.chooseStatus == 1">否</span>
  93 + </template>
  94 + <span slot="action" slot-scope="text, record">
  95 + <a @click="handleEdit(record)">编辑</a>
  96 + <a-divider type="vertical" />
  97 + <a @click="handleEdit(record)" v-if="cgzg || cjgly">审批</a>
  98 + <a-divider type="vertical" v-if="cgzg || cjgly"/>
  99 + <!-- <a @click="handleDetail(record)">详情</a>
  100 + <a-divider type="vertical" v-if="record.chooseStatus == 1"/>
  101 + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)" v-if="record.chooseStatus == 1">
  102 + <a>删除</a>
  103 + </a-popconfirm> -->
  104 + <a-dropdown>
  105 + <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
  106 + <a-menu slot="overlay">
  107 + <a-menu-item>
  108 + <a @click="handleDetail(record)">详情</a>
  109 + </a-menu-item>
  110 + <a-menu-item v-if="record.chooseStatus == 1">
  111 + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  112 + <a>删除</a>
  113 + </a-popconfirm>
  114 + </a-menu-item>
  115 + </a-menu>
  116 + </a-dropdown>
  117 + </span>
  118 +
  119 + </a-table>
  120 + </div>
  121 +
  122 + <tbl-bidding-shenq-modal ref="modalForm" @ok="modalFormOk"></tbl-bidding-shenq-modal>
  123 + </a-card>
  124 +</template>
  125 +
  126 +<script>
  127 +
  128 + import '@/assets/less/TableExpand.less'
  129 + import { mixinDevice } from '@/utils/mixin'
  130 + import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  131 + import TblBiddingShenqModal from './modules/TblBiddingShenqModal'
  132 + import store from '@/store/'
  133 + import { ROLES } from "@/store/mutation-types"
  134 + export default {
  135 + name: 'TblBiddingShenqList',
  136 + mixins:[JeecgListMixin, mixinDevice],
  137 + components: {
  138 + TblBiddingShenqModal
  139 + },
  140 + data () {
  141 + return {
  142 + description: 'tbl_bidding_shenq管理页面',
  143 + // 表头
  144 + columns: [
  145 + {
  146 + title: '序号',
  147 + dataIndex: '',
  148 + key:'rowIndex',
  149 + width:60,
  150 + align:"center",
  151 + customRender:function (t,r,index) {
  152 + return parseInt(index)+1;
  153 + }
  154 + },
  155 + {
  156 + title:'品名',
  157 + align:"center",
  158 + dataIndex: 'productName'
  159 + },
  160 + {
  161 + title:'规格',
  162 + align:"center",
  163 + dataIndex: 'specifications'
  164 + },
  165 + {
  166 + title:'数量',
  167 + align:"center",
  168 + dataIndex: 'num'
  169 + },
  170 + {
  171 + title:'单位',
  172 + align:"center",
  173 + dataIndex: 'danwei'
  174 + },
  175 + {
  176 + title:'物料类别',
  177 + align:"center",
  178 + dataIndex: 'wuType'
  179 + },
  180 + {
  181 + title:'工作令',
  182 + align:"center",
  183 + dataIndex: 'workOrder'
  184 + },
  185 + {
  186 + title:'用途',
  187 + align:"center",
  188 + dataIndex: 'purpose'
  189 + },
  190 + {
  191 + title:'当前库存',
  192 + align:"center",
  193 + dataIndex: 'operNumber'
  194 + },
  195 + {
  196 + title:'是否从基础表选择',
  197 + align:"center",
  198 + dataIndex: 'chooseStatus',
  199 + scopedSlots: { customRender: 'chooseStatusSlot' }
  200 + },
  201 + {
  202 + title:'使用日期',
  203 + align:"center",
  204 + dataIndex: 'deliveryTime',
  205 + customRender:function (text) {
  206 + return !text?"":(text.length>10?text.substr(0,10):text)
  207 + }
  208 + },
  209 + {
  210 + title:'品牌',
  211 + align:"center",
  212 + dataIndex: 'brand'
  213 + },
  214 + {
  215 + title:'备注',
  216 + align:"center",
  217 + dataIndex: 'notes'
  218 + },
  219 + {
  220 + title:'申请人',
  221 + align:"center",
  222 + dataIndex: 'applicant'
  223 + },
  224 + {
  225 + title:'一级审批人',
  226 + align:"center",
  227 + dataIndex: 'spOne'
  228 + },
  229 + {
  230 + title:'二级审批人',
  231 + align:"center",
  232 + dataIndex: 'spTwo'
  233 + },
  234 + {
  235 + title:'不同意备注',
  236 + align:"center",
  237 + dataIndex: 'noNotes'
  238 + },
  239 + {
  240 + title:'申请日期',
  241 + align:"center",
  242 + dataIndex: 'sqTime',
  243 + customRender:function (text) {
  244 + return !text?"":(text.length>10?text.substr(0,10):text)
  245 + }
  246 + },
  247 + {
  248 + title: '操作',
  249 + dataIndex: 'action',
  250 + align:"center",
  251 + fixed:"right",
  252 + width:147,
  253 + scopedSlots: { customRender: 'action' }
  254 + }
  255 + ],
  256 + url: {
  257 + list: "/trad/biddingSq/list",
  258 + delete: "/trad/tblBiddingShenq/delete",
  259 + deleteBatch: "/trad/tblBiddingShenq/deleteBatch",
  260 + exportXlsUrl: "/trad/tblBiddingShenq/exportXls",
  261 + importExcelUrl: "trad/tblBiddingShenq/importExcel",
  262 +
  263 + },
  264 + dictOptions:{},
  265 + superFieldList:[],
  266 + roleList:[],
  267 + roleCodeList:[],
  268 + cgzg:false,
  269 + cjgly:false,
  270 + }
  271 + },
  272 + created() {
  273 + // console.log('store.getters.roles',JSON.parse(sessionStorage.getItem(ROLES)))
  274 + this.loadRoles()
  275 +
  276 + this.getSuperFieldList();
  277 + },
  278 + computed: {
  279 + importExcelUrl: function(){
  280 + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  281 + },
  282 + },
  283 + methods: {
  284 + loadRoles(){
  285 + this.roleList = JSON.parse(sessionStorage.getItem(ROLES))
  286 + for(let i = 0;i<this.roleList.length; i++){
  287 + this.roleCodeList.push(this.roleList[i].role_code)
  288 + }
  289 + //采购主管
  290 + const cgzg = this.roleCodeList.includes('ProcurementSupervisor')
  291 + this.cgzg = cgzg
  292 + //车间管理员
  293 + const cjgly = this.roleCodeList.includes('WorkshopDirector')
  294 + this.cjgly = cjgly
  295 + },
  296 + initDictConfig(){
  297 + },
  298 + getSuperFieldList(){
  299 + let fieldList=[];
  300 + fieldList.push({type:'string',value:'productName',text:'品名'})
  301 + fieldList.push({type:'string',value:'specifications',text:'规格'})
  302 + fieldList.push({type:'int',value:'num',text:'数量'})
  303 + fieldList.push({type:'string',value:'brand',text:'品牌'})
  304 + fieldList.push({type:'string',value:'notes',text:'备注'})
  305 + fieldList.push({type:'string',value:'applicant',text:'申请人'})
  306 + fieldList.push({type:'string',value:'spOne',text:'一级审批人'})
  307 + fieldList.push({type:'string',value:'spTwo',text:'二级审批人'})
  308 + this.superFieldList = fieldList
  309 + }
  310 + }
  311 + }
  312 +</script>
  313 +<style scoped>
  314 + @import '~@assets/less/common.less';
  315 +</style>
@@ -6,21 +6,21 @@ @@ -6,21 +6,21 @@
6 <a-row :gutter="24"> 6 <a-row :gutter="24">
7 <a-col :xl="6" :lg="7" :md="8" :sm="24"> 7 <a-col :xl="6" :lg="7" :md="8" :sm="24">
8 <a-form-item label="品名"> 8 <a-form-item label="品名">
9 - <j-input placeholder="请输入品名" v-model="queryParam.productName"></j-input> 9 + <a-input placeholder="请输入品名" v-model="queryParam.productName"></a-input>
10 </a-form-item> 10 </a-form-item>
11 </a-col> 11 </a-col>
12 - <a-col :span="12">  
13 - <a-form-item label="申请日期">  
14 - <j-date v-model="queryParam.sqTime" placeholder="请选择申请日期" /> 12 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  13 + <a-form-item label="工作令">
  14 + <a-input placeholder="请输入工作令" v-model="queryParam.workOrder"></a-input>
15 </a-form-item> 15 </a-form-item>
16 </a-col> 16 </a-col>
17 - <a-col :span="12"> 17 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
18 <a-form-item label="使用日期"> 18 <a-form-item label="使用日期">
19 <j-date v-model="queryParam.deliveryTime" placeholder="请选择使用日期" /> 19 <j-date v-model="queryParam.deliveryTime" placeholder="请选择使用日期" />
20 </a-form-item> 20 </a-form-item>
21 </a-col> 21 </a-col>
22 <a-col :xl="6" :lg="7" :md="8" :sm="24"> 22 <a-col :xl="6" :lg="7" :md="8" :sm="24">
23 - <span style="float: right; overflow: hidden" class="table-page-search-submitButtons"> 23 + <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
24 <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> 24 <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
25 <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> 25 <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
26 </span> 26 </span>
@@ -33,18 +33,18 @@ @@ -33,18 +33,18 @@
33 <!-- 操作按钮区域 --> 33 <!-- 操作按钮区域 -->
34 <div class="table-operator"> 34 <div class="table-operator">
35 <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> 35 <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
36 - <a-button type="primary" icon="download" @click="handleExportXls('tbl_bidding_shenq')">导出</a-button>  
37 - <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> 36 + <!-- <a-button type="primary" icon="download" @click="handleExportXls('tbl_bidding_shenq')">导出</a-button> -->
  37 + <!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
38 <a-button type="primary" icon="import">导入</a-button> 38 <a-button type="primary" icon="import">导入</a-button>
39 - </a-upload> 39 + </a-upload> -->
40 <!-- 高级查询区域 --> 40 <!-- 高级查询区域 -->
41 - <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> 41 + <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
42 <a-dropdown v-if="selectedRowKeys.length > 0"> 42 <a-dropdown v-if="selectedRowKeys.length > 0">
43 <a-menu slot="overlay"> 43 <a-menu slot="overlay">
44 <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> 44 <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
45 </a-menu> 45 </a-menu>
46 <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> 46 <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
47 - </a-dropdown> 47 + </a-dropdown> -->
48 </div> 48 </div>
49 49
50 <!-- table区域-begin --> 50 <!-- table区域-begin -->
@@ -68,13 +68,13 @@ @@ -68,13 +68,13 @@
68 class="j-table-force-nowrap" 68 class="j-table-force-nowrap"
69 @change="handleTableChange"> 69 @change="handleTableChange">
70 70
71 - <template slot="htmlSlot" slot-scope="text"> 71 + <!-- <template slot="htmlSlot" slot-scope="text">
72 <div v-html="text"></div> 72 <div v-html="text"></div>
73 - </template>  
74 - <template slot="imgSlot" slot-scope="text,record"> 73 + </template> -->
  74 + <!-- <template slot="imgSlot" slot-scope="text,record">
75 <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> 75 <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
76 <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> 76 <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
77 - </template> 77 + </template> -->
78 <template slot="fileSlot" slot-scope="text"> 78 <template slot="fileSlot" slot-scope="text">
79 <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> 79 <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
80 <a-button 80 <a-button
@@ -87,18 +87,25 @@ @@ -87,18 +87,25 @@
87 下载 87 下载
88 </a-button> 88 </a-button>
89 </template> 89 </template>
90 - 90 + <template slot="chooseStatusSlot" slot-scope="text, record">
  91 + <span v-if="record.chooseStatus == 0">是</span>
  92 + <span v-if="record.chooseStatus == 1">否</span>
  93 + </template>
91 <span slot="action" slot-scope="text, record"> 94 <span slot="action" slot-scope="text, record">
92 <a @click="handleEdit(record)">编辑</a> 95 <a @click="handleEdit(record)">编辑</a>
93 -  
94 <a-divider type="vertical" /> 96 <a-divider type="vertical" />
  97 + <!-- <a @click="handleDetail(record)">详情</a>
  98 + <a-divider type="vertical" v-if="record.chooseStatus == 1"/>
  99 + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)" v-if="record.chooseStatus == 1">
  100 + <a>删除</a>
  101 + </a-popconfirm> -->
95 <a-dropdown> 102 <a-dropdown>
96 <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> 103 <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
97 <a-menu slot="overlay"> 104 <a-menu slot="overlay">
98 <a-menu-item> 105 <a-menu-item>
99 <a @click="handleDetail(record)">详情</a> 106 <a @click="handleDetail(record)">详情</a>
100 </a-menu-item> 107 </a-menu-item>
101 - <a-menu-item> 108 + <a-menu-item v-if="record.chooseStatus == 1">
102 <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> 109 <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
103 <a>删除</a> 110 <a>删除</a>
104 </a-popconfirm> 111 </a-popconfirm>
@@ -120,7 +127,8 @@ @@ -120,7 +127,8 @@
120 import { mixinDevice } from '@/utils/mixin' 127 import { mixinDevice } from '@/utils/mixin'
121 import { JeecgListMixin } from '@/mixins/JeecgListMixin' 128 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
122 import TblBiddingShenqModal from './modules/TblBiddingShenqModal' 129 import TblBiddingShenqModal from './modules/TblBiddingShenqModal'
123 - 130 + import store from '@/store/'
  131 + import { ROLES } from "@/store/mutation-types"
124 export default { 132 export default {
125 name: 'TblBiddingShenqList', 133 name: 'TblBiddingShenqList',
126 mixins:[JeecgListMixin, mixinDevice], 134 mixins:[JeecgListMixin, mixinDevice],
@@ -180,7 +188,13 @@ @@ -180,7 +188,13 @@
180 { 188 {
181 title:'当前库存', 189 title:'当前库存',
182 align:"center", 190 align:"center",
183 - dataIndex: 'ku' 191 + dataIndex: 'operNumber'
  192 + },
  193 + {
  194 + title:'是否从基础表选择',
  195 + align:"center",
  196 + dataIndex: 'chooseStatus',
  197 + scopedSlots: { customRender: 'chooseStatusSlot' }
184 }, 198 },
185 { 199 {
186 title:'使用日期', 200 title:'使用日期',
@@ -238,7 +252,7 @@ @@ -238,7 +252,7 @@
238 } 252 }
239 ], 253 ],
240 url: { 254 url: {
241 - list: "/trad/tblBiddingShenq/list", 255 + list: "/trad/biddingSq/list",
242 delete: "/trad/tblBiddingShenq/delete", 256 delete: "/trad/tblBiddingShenq/delete",
243 deleteBatch: "/trad/tblBiddingShenq/deleteBatch", 257 deleteBatch: "/trad/tblBiddingShenq/deleteBatch",
244 exportXlsUrl: "/trad/tblBiddingShenq/exportXls", 258 exportXlsUrl: "/trad/tblBiddingShenq/exportXls",
@@ -247,10 +261,14 @@ @@ -247,10 +261,14 @@
247 }, 261 },
248 dictOptions:{}, 262 dictOptions:{},
249 superFieldList:[], 263 superFieldList:[],
  264 + roleList:[],
  265 + roleCodeList:[],
  266 + cgzg:false,
  267 + cjgly:false,
250 } 268 }
251 }, 269 },
252 created() { 270 created() {
253 - this.getSuperFieldList(); 271 + this.getSuperFieldList();
254 }, 272 },
255 computed: { 273 computed: {
256 importExcelUrl: function(){ 274 importExcelUrl: function(){
@@ -258,6 +276,7 @@ @@ -258,6 +276,7 @@
258 }, 276 },
259 }, 277 },
260 methods: { 278 methods: {
  279 +
261 initDictConfig(){ 280 initDictConfig(){
262 }, 281 },
263 getSuperFieldList(){ 282 getSuperFieldList(){
  1 +<template>
  2 + <j-modal :title="title" :width="width" :visible="visible" :confirmLoading="confirmLoading" :maskClosable="false"
  3 + switchFullscreen @ok="handleOk" @cancel="handleCancel" cancelText="关闭">
  4 + <a-spin :spinning="confirmLoading">
  5 + <!-- <j-form-container :disabled="formDisabled"> -->
  6 + <a-form-model ref="form" :model="model" :rules="validatorRules">
  7 + <a-row>
  8 + <a-col :span="24">
  9 + <a-form-model-item label="是否同意" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isagree">
  10 + <a-radio-group v-model="value" @change="onChange">
  11 + <a-radio :value="'1'">
  12 + 同意
  13 + </a-radio>
  14 + <a-radio :value="'2'">
  15 + 不同意
  16 + </a-radio>
  17 + </a-radio-group>
  18 + </a-form-model-item>
  19 + </a-col>
  20 + <a-col :span="24">
  21 + <a-form-model-item label="审批意见" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approvalOpinions">
  22 + <a-textarea v-model="model.approvalOpinions" placeholder="请输入审批意见" ></a-textarea>
  23 + </a-form-model-item>
  24 + </a-col>
  25 +
  26 + </a-row>
  27 + </a-form-model>
  28 + <!-- </j-form-container> -->
  29 + </a-spin>
  30 +</j-modal>
  31 +</template>
  32 +
  33 +<script>
  34 +
  35 + import { httpAction, getAction } from '@/api/manage'
  36 + import { validateDuplicateValue } from '@/utils/util'
  37 +
  38 + export default {
  39 + name: 'TblBiddingShenqApproval1Model',
  40 + components: {
  41 + },
  42 + props: {
  43 + //表单禁用
  44 + disabled: {
  45 + type: Boolean,
  46 + default: false,
  47 + required: false
  48 + }
  49 + },
  50 + data () {
  51 + return {
  52 + title: "操作",
  53 + width: 800,
  54 + model:{
  55 + },
  56 + visible: false,
  57 + value:'1',
  58 + labelCol: {
  59 + xs: { span: 24 },
  60 + sm: { span: 5 },
  61 + },
  62 + wrapperCol: {
  63 + xs: { span: 24 },
  64 + sm: { span: 16 },
  65 + },
  66 + confirmLoading: false,
  67 + validatorRules: {
  68 + isagree: [
  69 + { required: true, message: '请选择!' },
  70 + ],
  71 + approvalOpinions: [
  72 + { required: true, message: '请输入审批意见!' },
  73 + ],
  74 + },
  75 + url: {
  76 + add: "/bidding_shenq_approval/tblBiddingShenqApproval/add",
  77 + edit: "/bidding_shenq_approval/tblBiddingShenqApproval/edit",
  78 + queryById: "/bidding_shenq_approval/tblBiddingShenqApproval/queryById"
  79 + }
  80 + }
  81 + },
  82 + computed: {
  83 + formDisabled(){
  84 + return this.disabled
  85 + },
  86 + },
  87 + created () {
  88 + //备份model原始值
  89 + this.modelDefault = JSON.parse(JSON.stringify(this.model));
  90 + },
  91 + methods: {
  92 + add () {
  93 + this.edit(this.modelDefault);
  94 + },
  95 + edit (record) {
  96 + this.model = Object.assign({}, record);
  97 + this.visible = true;
  98 + this.model.isagree = '1'
  99 + console.log('this.model',this.model)
  100 + },
  101 + onChange(e) {
  102 + console.log('radio checked', e.target.value);
  103 + this.model.isagree = this.value
  104 + },
  105 + handleOk () {
  106 + const that = this;
  107 + // 触发表单验证
  108 + this.$refs.form.validate(valid => {
  109 + if (valid) {
  110 + console.log(this.model)
  111 + return
  112 + that.confirmLoading = true;
  113 + let httpurl = '';
  114 + let method = '';
  115 + if(!this.model.id){
  116 + httpurl+=this.url.add;
  117 + method = 'post';
  118 + }else{
  119 + httpurl+=this.url.edit;
  120 + method = 'put';
  121 + }
  122 + httpAction(httpurl,this.model,method).then((res)=>{
  123 + if(res.success){
  124 + that.$message.success(res.message);
  125 + that.$emit('ok');
  126 + }else{
  127 + that.$message.warning(res.message);
  128 + }
  129 + }).finally(() => {
  130 + that.confirmLoading = false;
  131 + })
  132 + }
  133 +
  134 + })
  135 + },
  136 + close() {
  137 + this.$emit('close');
  138 + this.visible = false;
  139 + this.$refs.form.clearValidate();
  140 + },
  141 + handleCancel() {
  142 + this.close()
  143 + },
  144 + }
  145 + }
  146 +</script>
  1 +<template>
  2 + <a-spin :spinning="confirmLoading">
  3 + <j-form-container :disabled="formDisabled">
  4 + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
  5 + <a-row>
  6 + <a-col :span="24">
  7 + <a-form-model-item label="审批人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approval">
  8 + <a-input v-model="model.approval" placeholder="请输入审批人" ></a-input>
  9 + </a-form-model-item>
  10 + </a-col>
  11 + <a-col :span="24">
  12 + <a-form-model-item label="审批意见" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approvalOpinions">
  13 + <a-input v-model="model.approvalOpinions" placeholder="请输入审批意见" ></a-input>
  14 + </a-form-model-item>
  15 + </a-col>
  16 + <a-col :span="24">
  17 + <a-form-model-item label="是否同意" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isagree">
  18 + <a-input v-model="model.isagree" placeholder="请输入是否同意" ></a-input>
  19 + </a-form-model-item>
  20 + </a-col>
  21 + </a-row>
  22 + </a-form-model>
  23 + </j-form-container>
  24 + </a-spin>
  25 +</template>
  26 +
  27 +<script>
  28 +
  29 + import { httpAction, getAction } from '@/api/manage'
  30 + import { validateDuplicateValue } from '@/utils/util'
  31 +
  32 + export default {
  33 + name: 'TblBiddingShenqApprovalForm',
  34 + components: {
  35 + },
  36 + props: {
  37 + //表单禁用
  38 + disabled: {
  39 + type: Boolean,
  40 + default: false,
  41 + required: false
  42 + }
  43 + },
  44 + data () {
  45 + return {
  46 + model:{
  47 + },
  48 + labelCol: {
  49 + xs: { span: 24 },
  50 + sm: { span: 5 },
  51 + },
  52 + wrapperCol: {
  53 + xs: { span: 24 },
  54 + sm: { span: 16 },
  55 + },
  56 + confirmLoading: false,
  57 + validatorRules: {
  58 + },
  59 + url: {
  60 + add: "/bidding_shenq_approval/tblBiddingShenqApproval/add",
  61 + edit: "/bidding_shenq_approval/tblBiddingShenqApproval/edit",
  62 + queryById: "/bidding_shenq_approval/tblBiddingShenqApproval/queryById"
  63 + }
  64 + }
  65 + },
  66 + computed: {
  67 + formDisabled(){
  68 + return this.disabled
  69 + },
  70 + },
  71 + created () {
  72 + //备份model原始值
  73 + this.modelDefault = JSON.parse(JSON.stringify(this.model));
  74 + },
  75 + methods: {
  76 + add () {
  77 + this.edit(this.modelDefault);
  78 + },
  79 + edit (record) {
  80 + this.model = Object.assign({}, record);
  81 + this.visible = true;
  82 + },
  83 + submitForm () {
  84 + const that = this;
  85 + // 触发表单验证
  86 + this.$refs.form.validate(valid => {
  87 + if (valid) {
  88 + that.confirmLoading = true;
  89 + let httpurl = '';
  90 + let method = '';
  91 + if(!this.model.id){
  92 + httpurl+=this.url.add;
  93 + method = 'post';
  94 + }else{
  95 + httpurl+=this.url.edit;
  96 + method = 'put';
  97 + }
  98 + httpAction(httpurl,this.model,method).then((res)=>{
  99 + if(res.success){
  100 + that.$message.success(res.message);
  101 + that.$emit('ok');
  102 + }else{
  103 + that.$message.warning(res.message);
  104 + }
  105 + }).finally(() => {
  106 + that.confirmLoading = false;
  107 + })
  108 + }
  109 +
  110 + })
  111 + },
  112 + }
  113 + }
  114 +</script>
1 <template> 1 <template>
2 <a-spin :spinning="confirmLoading"> 2 <a-spin :spinning="confirmLoading">
3 <j-form-container :disabled="formDisabled"> 3 <j-form-container :disabled="formDisabled">
4 - <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> 4 + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail" :disabled="isBianhaoDisabled">
5 <a-row> 5 <a-row>
6 <a-col :span="24"> 6 <a-col :span="24">
  7 + <a-form-model-item label="选择" :labelCol="labelCol" :wrapperCol="wrapperCol" >
  8 + <a-radio-group @change="onChange" v-model="selectedValue">
  9 + <a-radio :value="'0'" >
  10 + 从物料表选择
  11 + </a-radio>
  12 + <a-radio :value="'1'">
  13 + 新增
  14 + </a-radio>
  15 + </a-radio-group>
  16 + </a-form-model-item>
  17 + </a-col>
  18 + <a-col :span="24">
  19 + <a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partNumber" v-if="model.chooseStatus ==1">
  20 + <a-input v-model="model.partNumber" placeholder="请输入编号" ></a-input>
  21 + </a-form-model-item>
  22 + </a-col>
  23 + <a-col :span="24">
7 <a-form-model-item label="品名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productName"> 24 <a-form-model-item label="品名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productName">
8 - <a-input v-model="model.productName" placeholder="请输入品名" :disabled="isBianhaoDisabled"></a-input> 25 + <a-input v-model="model.productName" placeholder="请输入品名" v-if="model.chooseStatus ==1"></a-input>
  26 + <a-select size="small" v-model="model.productName" placeholder="请选择品名" allowClear @change = "handleChange" v-if="model.chooseStatus ==0">
  27 + <a-select-option v-for="(item,index) in materialOptions" :key="index" :value="item.partNumber" :channel="item">{{ item.productName }}</a-select-option>
  28 + </a-select>
9 </a-form-model-item> 29 </a-form-model-item>
10 </a-col> 30 </a-col>
11 <a-col :span="24"> 31 <a-col :span="24">
12 <a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specifications"> 32 <a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specifications">
13 - <a-input v-model="model.specifications" placeholder="请输入规格" :disabled="isBianhaoDisabled"></a-input> 33 + <a-input v-model="model.specifications" placeholder="请输入规格" :disabled="model.chooseStatus ==0"></a-input>
14 </a-form-model-item> 34 </a-form-model-item>
15 </a-col> 35 </a-col>
16 <a-col :span="24"> 36 <a-col :span="24">
@@ -19,64 +39,47 @@ @@ -19,64 +39,47 @@
19 v-model="model.num" 39 v-model="model.num"
20 placeholder="请输入数量" 40 placeholder="请输入数量"
21 style="width: 100%" 41 style="width: 100%"
22 - :disabled="isBianhaoDisabled"  
23 /> 42 />
24 </a-form-model-item> 43 </a-form-model-item>
25 </a-col> 44 </a-col>
26 <a-col :span="24"> 45 <a-col :span="24">
27 <a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="danwei"> 46 <a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="danwei">
28 - <a-input v-model="model.danwei" placeholder="请输入单位" :disabled="isBianhaoDisabled"></a-input> 47 + <a-input v-model="model.danwei" placeholder="请输入单位" :disabled="model.chooseStatus ==0"></a-input>
29 </a-form-model-item> 48 </a-form-model-item>
30 </a-col> 49 </a-col>
31 <a-col :span="24"> 50 <a-col :span="24">
32 <a-form-model-item label="物料类别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="wuType"> 51 <a-form-model-item label="物料类别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="wuType">
33 - <a-input v-model="model.wuType" placeholder="请输入物料类别" :disabled="isBianhaoDisabled"></a-input> 52 + <a-select size="small" v-model="model.wuType" placeholder="请选择物料类别" allowClear :disabled="model.chooseStatus ==0">
  53 + <a-select-option v-for="(item,index) in meterialTypeList" :key="index" :value="item.value" :channel="item">{{ item.label }}</a-select-option>
  54 + </a-select>
34 </a-form-model-item> 55 </a-form-model-item>
35 </a-col> 56 </a-col>
36 <a-col :span="24"> 57 <a-col :span="24">
37 <a-form-model-item label="工作令" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workOrder"> 58 <a-form-model-item label="工作令" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workOrder">
38 - <a-input v-model="model.workOrder" placeholder="请输入工作令" :disabled="isBianhaoDisabled"></a-input> 59 + <a-input v-model="model.workOrder" placeholder="请输入工作令" ></a-input>
39 </a-form-model-item> 60 </a-form-model-item>
40 </a-col> 61 </a-col>
41 <a-col :span="24"> 62 <a-col :span="24">
42 <a-form-model-item label="用途" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="purpose"> 63 <a-form-model-item label="用途" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="purpose">
43 - <a-input v-model="model.purpose" placeholder="请输入用途" :disabled="isBianhaoDisabled"></a-input>  
44 - </a-form-model-item>  
45 - </a-col>  
46 - <a-col :span="24">  
47 - <a-form-model-item label="当前库存" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ku">  
48 - <a-input v-model="model.ku" placeholder="请输入当前库存" :disabled="isBianhaoDisabled"></a-input>  
49 - </a-form-model-item>  
50 - </a-col>  
51 - <a-col :span="24">  
52 - <a-form-model-item label="申请日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sqTime">  
53 - <j-date v-model="model.sqTime" placeholder="请输入申请日期" :disabled="isBianhaoDisabled" /> 64 + <a-input v-model="model.purpose" placeholder="请输入用途" ></a-input>
54 </a-form-model-item> 65 </a-form-model-item>
55 </a-col> 66 </a-col>
56 <a-col :span="24"> 67 <a-col :span="24">
57 <a-form-model-item label="使用日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryTime"> 68 <a-form-model-item label="使用日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryTime">
58 - <j-date v-model="model.deliveryTime" placeholder="请输入使用日期" :disabled="isBianhaoDisabled" /> 69 + <j-date v-model="model.deliveryTime" placeholder="请输入使用日期" />
59 </a-form-model-item> 70 </a-form-model-item>
60 </a-col> 71 </a-col>
61 <a-col :span="24"> 72 <a-col :span="24">
62 <a-form-model-item label="品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brand"> 73 <a-form-model-item label="品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brand">
63 - <a-input v-model="model.brand" placeholder="请输入品牌" :disabled="isBianhaoDisabled"></a-input> 74 + <a-input v-model="model.brand" placeholder="请输入品牌" ></a-input>
64 </a-form-model-item> 75 </a-form-model-item>
65 </a-col> 76 </a-col>
66 <a-col :span="24"> 77 <a-col :span="24">
67 <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="notes"> 78 <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="notes">
68 - <a-input v-model="model.notes" placeholder="请输入备注" :disabled="isBianhaoDisabled"></a-input>  
69 - </a-form-model-item>  
70 - </a-col>  
71 - <a-col :span="24">  
72 - <a-form-model-item label="申请人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="applicant">  
73 - <a-input v-model="model.applicant" placeholder="请输入申请人" :disabled="isBianhaoDisabled"></a-input> 79 + <a-input v-model="model.notes" placeholder="请输入备注"></a-input>
74 </a-form-model-item> 80 </a-form-model-item>
75 </a-col> 81 </a-col>
76 <a-col :span="24"> 82 <a-col :span="24">
77 - <!-- <a-form-model-item label="一级审批人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spOne">  
78 -  
79 - </a-form-model-item> -->  
80 <a-form-model-item 83 <a-form-model-item
81 label="一级审批" 84 label="一级审批"
82 :labelCol="labelCol" 85 :labelCol="labelCol"
@@ -128,6 +131,7 @@ @@ -128,6 +131,7 @@
128 import { httpAction, getAction } from '@/api/manage' 131 import { httpAction, getAction } from '@/api/manage'
129 import { validateDuplicateValue } from '@/utils/util' 132 import { validateDuplicateValue } from '@/utils/util'
130 import { mapGetters } from 'vuex' 133 import { mapGetters } from 'vuex'
  134 +import { duplicateCheck } from '@/api/api'
131 export default { 135 export default {
132 name: 'TblBiddingShenqForm', 136 name: 'TblBiddingShenqForm',
133 137
@@ -143,6 +147,7 @@ export default { @@ -143,6 +147,7 @@ export default {
143 data() { 147 data() {
144 return { 148 return {
145 isBianhaoDisabled: false, 149 isBianhaoDisabled: false,
  150 + materialOptions:[],
146 model: {}, 151 model: {},
147 labelCol: { 152 labelCol: {
148 xs: { span: 24 }, 153 xs: { span: 24 },
@@ -154,6 +159,10 @@ export default { @@ -154,6 +159,10 @@ export default {
154 }, 159 },
155 confirmLoading: false, 160 confirmLoading: false,
156 validatorRules: { 161 validatorRules: {
  162 + partNumber:[
  163 + { required: true, message: '请输入外购件编号!' },
  164 + { validator: this.validatePartNumber },
  165 + ],
157 productName: [{ required: true, message: '请输入品名!' }], 166 productName: [{ required: true, message: '请输入品名!' }],
158 specifications: [{ required: true, message: '请输入规格!' }], 167 specifications: [{ required: true, message: '请输入规格!' }],
159 num: [{ required: true, message: '请输入数量!' }], 168 num: [{ required: true, message: '请输入数量!' }],
@@ -169,20 +178,38 @@ export default { @@ -169,20 +178,38 @@ export default {
169 applicant: [{ required: true, message: '请输入申请人!' }], 178 applicant: [{ required: true, message: '请输入申请人!' }],
170 }, 179 },
171 url: { 180 url: {
172 - add: '/trad/tblBiddingShenq/add', 181 + add: '/trad/biddingSq/add',
173 edit: '/trad/tblBiddingShenq/edit', 182 edit: '/trad/tblBiddingShenq/edit',
174 queryById: '/trad/tblBiddingShenq/queryById', 183 queryById: '/trad/tblBiddingShenq/queryById',
  184 + listAllMaterial:"/meterial/tblMaterial/listAll"
175 }, 185 },
  186 + selectedValue:'0',
  187 + meterialTypeList:[{
  188 + value:'1',
  189 + label:"零件"
  190 + },{
  191 + value:'2',
  192 + label:"半成品"
  193 + },
  194 + {
  195 + value:'3',
  196 + label:"耗材"
  197 + },{
  198 + value:'4',
  199 + label:"劳保"
  200 + }]
176 } 201 }
177 }, 202 },
178 computed: { 203 computed: {
179 formDisabled() { 204 formDisabled() {
180 return this.disabled 205 return this.disabled
181 - }, 206 + },
182 }, 207 },
183 created() { 208 created() {
  209 + this.loadTree()
  210 + this.model.chooseStatus = this.selectedValue
184 //备份model原始值 211 //备份model原始值
185 - this.modelDefault = JSON.parse(JSON.stringify(this.model)) 212 + // this.modelDefault = JSON.parse(JSON.stringify(this.model))
186 }, 213 },
187 methods: { 214 methods: {
188 ...mapGetters(['nickname', 'avatar', 'userInfo']), 215 ...mapGetters(['nickname', 'avatar', 'userInfo']),
@@ -197,8 +224,11 @@ export default { @@ -197,8 +224,11 @@ export default {
197 this.edit(this.modelDefault) 224 this.edit(this.modelDefault)
198 this.isBianhaoDisabled = false 225 this.isBianhaoDisabled = false
199 }, 226 },
200 - edit(record) { 227 + edit(record) {
201 this.model = Object.assign({}, record) 228 this.model = Object.assign({}, record)
  229 + this.modelDefault = this.model
  230 + // console.log('this.model:::::',this.model)
  231 + this.selectedValue = this.model.chooseStatus
202 this.visible = true 232 this.visible = true
203 if (this.userInfo().username === 'admin') { 233 if (this.userInfo().username === 'admin') {
204 this.isBianhaoDisabled = true 234 this.isBianhaoDisabled = true
@@ -206,6 +236,74 @@ export default { @@ -206,6 +236,74 @@ export default {
206 this.isBianhaoDisabled = false 236 this.isBianhaoDisabled = false
207 } 237 }
208 }, 238 },
  239 + loadTree(){
  240 + httpAction(this.url.listAllMaterial,null, "get").then((res) => {
  241 + if (res.success) {
  242 + this.materialOptions = res.result
  243 + } else {
  244 + // that.$message.warning(res.message);
  245 + }
  246 + })
  247 + },
  248 + onChange(e) {
  249 + console.log('this.modelDefault',this.modelDefault)
  250 + if(!this.modelDefault.id){
  251 + if(e.target.value == 1){
  252 + this.model = {}
  253 + this.model.chooseStatus = 1
  254 + }else if(e.target.value == 0){
  255 + this.model = {}
  256 + this.model.chooseStatus = 0
  257 + }
  258 + }else if(this.modelDefault.id){
  259 + if(e.target.value == 1){
  260 + this.model = {}
  261 + this.model.chooseStatus = 1
  262 + }else if(e.target.value == 0){
  263 + this.model = this.modelDefault
  264 + console.log(this.model)
  265 + // this.model.chooseStatus = 0
  266 + }
  267 + }
  268 +
  269 + },
  270 + handleChange (value,option){
  271 + let tempModel = option.data.attrs.channel
  272 + console.log('tempModel',tempModel)
  273 + if(tempModel.partNumber){
  274 + this.model.partNumber = tempModel.partNumber
  275 + }
  276 + if(tempModel.productName){
  277 + this.model.productName = tempModel.productName
  278 + }
  279 + if(tempModel.spec){
  280 + this.model.specifications = tempModel.spec
  281 + }
  282 + if(tempModel.type){
  283 + this.model.type = tempModel.type
  284 + }
  285 + if(tempModel.unit){
  286 + this.model.danwei = tempModel.unit
  287 + }
  288 + if(tempModel.meterialType){
  289 + this.model.wuType = tempModel.meterialType
  290 + }
  291 + },
  292 + validatePartNumber(rule, value, callback) {
  293 + var params = {
  294 + tableName: 'tbl_material',
  295 + fieldName: 'part_number',
  296 + fieldVal: value,
  297 + dataId: this.model.id,
  298 + }
  299 + duplicateCheck(params).then((res) => {
  300 + if (res.success) {
  301 + callback()
  302 + } else {
  303 + callback('编号已存在')
  304 + }
  305 + })
  306 + },
209 submitForm() { 307 submitForm() {
210 const that = this 308 const that = this
211 // 触发表单验证 309 // 触发表单验证
@@ -35,9 +35,10 @@ @@ -35,9 +35,10 @@
35 </a-col> --> 35 </a-col> -->
36 <a-col :span="24"> 36 <a-col :span="24">
37 <a-form-model-item label="设计人员" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productType"> 37 <a-form-model-item label="设计人员" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productType">
38 - <a-select size="small" v-model="model.designer" placeholder="请选择设计人员" allowClear> 38 + <!-- <a-select size="small" v-model="model.designer" placeholder="请选择设计人员" allowClear>
39 <a-select-option v-for="(item,index) in options" :key="index" :value="item.jobId">{{ item.userName }}</a-select-option> 39 <a-select-option v-for="(item,index) in options" :key="index" :value="item.jobId">{{ item.userName }}</a-select-option>
40 - </a-select> 40 + </a-select> -->
  41 + <a-cascader :options="options" placeholder="请选择设计人员" @change="onChange" />
41 </a-form-model-item> 42 </a-form-model-item>
42 </a-col> 43 </a-col>
43 <a-col :span="24"> 44 <a-col :span="24">
@@ -57,8 +58,7 @@ @@ -57,8 +58,7 @@
57 import { httpAction } from '@/api/manage' 58 import { httpAction } from '@/api/manage'
58 import { validateDuplicateValue } from '@/utils/util' 59 import { validateDuplicateValue } from '@/utils/util'
59 import { duplicateCheck } from '@/api/api' 60 import { duplicateCheck } from '@/api/api'
60 -import {listSalary} from '@/api/TblSalaryBase'  
61 -import {listProductType} from '@/api/ProductTpye' 61 +import {listProductType,getUserRoleTreeList} from '@/api/ProductTpye'
62 import moment from 'moment' 62 import moment from 'moment'
63 63
64 export default { 64 export default {
@@ -115,7 +115,7 @@ export default { @@ -115,7 +115,7 @@ export default {
115 // ], 115 // ],
116 }, 116 },
117 url: { 117 url: {
118 - edit: "/order_form/tblOrderForm/updateDesigner" 118 + edit: "/order_form/productDesign/updateDesigner"
119 } 119 }
120 120
121 } 121 }
@@ -148,14 +148,20 @@ export default { @@ -148,14 +148,20 @@ export default {
148 }, 148 },
149 loadUser(){ 149 loadUser(){
150 var that = this; 150 var that = this;
151 - listSalary().then((res)=>{ 151 + getUserRoleTreeList().then((res)=>{
152 if(res.success){ 152 if(res.success){
153 - 153 + console.log('res==',res)
154 // that.treeData = []; 154 // that.treeData = [];
155 that.options = res.result 155 that.options = res.result
156 } 156 }
157 }); 157 });
158 }, 158 },
  159 + onChange(value) {
  160 + console.log('onChange1',value);
  161 + console.log('onChange11',value[value.length-1]);
  162 + this.model.designRole = value[0]
  163 + this.model.designer = value[1]
  164 + },
159 close() { 165 close() {
160 this.$emit('close'); 166 this.$emit('close');
161 this.visible = false; 167 this.visible = false;
@@ -3,60 +3,71 @@ @@ -3,60 +3,71 @@
3 switchFullscreen @ok="handleOk" @cancel="handleCancel" cancelText="关闭"> 3 switchFullscreen @ok="handleOk" @cancel="handleCancel" cancelText="关闭">
4 <a-spin :spinning="confirmLoading"> 4 <a-spin :spinning="confirmLoading">
5 <div style="display: flex"> 5 <div style="display: flex">
6 - <div style="display:inline-block;width:45%;margin: auto;"> 6 + <div style="display:inline-block;width:50%;margin: auto;">
7 <table> 7 <table>
8 <tr> 8 <tr>
9 - <th scop="col">订单号:</th> 9 + <th scop="col" class="table_lable">订单号:</th>
10 <th scop="col">{{model.orderId}}</th> 10 <th scop="col">{{model.orderId}}</th>
11 </tr> 11 </tr>
12 <tr> 12 <tr>
13 - <th scop="col">订货单位:</th> 13 + <th scop="col" class="table_lable">订货单位:</th>
14 <th scop="col">{{model.orderCompany}}</th> 14 <th scop="col">{{model.orderCompany}}</th>
15 </tr> 15 </tr>
16 <tr> 16 <tr>
17 - <th scop="col">工作令:</th> 17 + <th scop="col" class="table_lable">工作令:</th>
18 <th scop="col">{{model.workOrder}}</th> 18 <th scop="col">{{model.workOrder}}</th>
19 </tr> 19 </tr>
20 <tr> 20 <tr>
21 - <th scop="col">产品名称:</th> 21 + <th scop="col" class="table_lable">产品名称:</th>
22 <th scop="col">{{model.productName}}</th> 22 <th scop="col">{{model.productName}}</th>
23 </tr> 23 </tr>
24 <tr> 24 <tr>
25 - <th scop="col">产品类型:</th>  
26 - <th scop="col">{{model.productType}}</th> 25 + <th scop="col" class="table_lable">产品类型:</th>
  26 + <th scop="col">
  27 + <span v-if="model.productType =='XC'">线槽</span>
  28 + <span v-if="model.productType =='JD'">接地</span>
  29 + <span v-if="model.productType =='QZ'">卡子</span>
  30 + <span v-if="model.productType =='GX'">柜、箱、盒</span>
  31 + <span v-if="model.productType =='SJ'">司机室</span>
  32 + <span v-if="model.productType =='FS'">附属钢</span>
  33 + </th>
27 </tr> 34 </tr>
28 <tr> 35 <tr>
29 - <th scop="col">任务下达时间:</th> 36 + <th scop="col" class="table_lable">任务下达时间:</th>
30 <th scop="col">{{model.orderDate}}</th> 37 <th scop="col">{{model.orderDate}}</th>
31 </tr> 38 </tr>
32 <tr> 39 <tr>
33 - <th scop="col">派工时间:</th> 40 + <th scop="col" class="table_lable">派工时间:</th>
34 <th scop="col">{{model.dispatchDate}}</th> 41 <th scop="col">{{model.dispatchDate}}</th>
35 </tr> 42 </tr>
36 <tr> 43 <tr>
37 - <th scop="col">交货时间:</th> 44 + <th scop="col" class="table_lable">交货时间:</th>
38 <th scop="col">{{model.deliveryDate}}</th> 45 <th scop="col">{{model.deliveryDate}}</th>
39 </tr> 46 </tr>
40 <tr> 47 <tr>
41 - <th scop="col">数量(套):</th> 48 + <th scop="col" class="table_lable">数量(套):</th>
42 <th scop="col">{{model.quantity}}</th> 49 <th scop="col">{{model.quantity}}</th>
43 </tr> 50 </tr>
44 <tr> 51 <tr>
45 - <th scop="col">总工时:</th> 52 + <th scop="col" class="table_lable">总工时:</th>
46 <th scop="col">{{model.totalWorkingHours}}</th> 53 <th scop="col">{{model.totalWorkingHours}}</th>
47 </tr> 54 </tr>
48 <tr> 55 <tr>
49 - <th scop="col">已派发工时:</th> 56 + <th scop="col" class="table_lable">已派发工时:</th>
50 <th scop="col">{{model.dispatchedWorkingHours}}</th> 57 <th scop="col">{{model.dispatchedWorkingHours}}</th>
51 </tr> 58 </tr>
52 <tr v-if="model.files"> 59 <tr v-if="model.files">
53 - <th scop="col">主料图文件:</th>  
54 - <th scop="col">{{model.files}}</th> 60 + <th scop="col" class="table_lable">主料图文件:</th>
  61 + <th scop="col">
  62 + <div v-for="(item,index) in model.files.split(',')" :key="index">
  63 + <a :href=httpUrl+item target="_blank">{{index+1}}. {{item.replace("temp/","")}}</a><br>
  64 + </div>
  65 + </th>
55 </tr> 66 </tr>
56 </table> 67 </table>
57 </div> 68 </div>
58 <div style="display:inline-block;width:45%;"> 69 <div style="display:inline-block;width:45%;">
59 - <div class="show"> 70 + <div class="show" >
60 <img :src="getImgView(show)" :preview="num" alt="" height="100px"> 71 <img :src="getImgView(show)" :preview="num" alt="" height="100px">
61 </div> 72 </div>
62 <div class="imgBox"> 73 <div class="imgBox">
@@ -88,8 +99,9 @@ export default { @@ -88,8 +99,9 @@ export default {
88 return { 99 return {
89 title: "生产订单详情", 100 title: "生产订单详情",
90 baseURL:apiBaseUrl, 101 baseURL:apiBaseUrl,
  102 + httpUrl:window._CONFIG['staticDomainURL']+'/',
91 options:[], 103 options:[],
92 - width: 800, 104 + width: 1000,
93 visible: false, 105 visible: false,
94 model: { 106 model: {
95 }, 107 },
@@ -178,6 +190,13 @@ export default { @@ -178,6 +190,13 @@ export default {
178 } 190 }
179 </script> 191 </script>
180 <style scoped> 192 <style scoped>
  193 +tr {
  194 + height: 30px; /* 设置行高为50px */
  195 + /* padding: 10px; 设置行内填充为10px */
  196 +}
  197 +.table_lable{
  198 + text-align: right;
  199 +}
181 .imgBox{ 200 .imgBox{
182 display: flex; 201 display: flex;
183 } 202 }
@@ -187,7 +206,9 @@ export default { @@ -187,7 +206,9 @@ export default {
187 height: 50px; 206 height: 50px;
188 margin: 10px; 207 margin: 10px;
189 } 208 }
190 - 209 +.imgBox img:hover{
  210 + cursor: pointer;
  211 + }
191 .imgBox div{ 212 .imgBox div{
192 margin: 5px; 213 margin: 5px;
193 } 214 }
@@ -201,4 +222,7 @@ border: 2px solid rgb(141, 134, 134); @@ -201,4 +222,7 @@ border: 2px solid rgb(141, 134, 134);
201 height: 200px; 222 height: 200px;
202 width: 200px; 223 width: 200px;
203 } 224 }
  225 +.show:hover{
  226 + cursor: pointer;
  227 + }
204 </style> 228 </style>
@@ -38,13 +38,8 @@ @@ -38,13 +38,8 @@
38 38
39 <!-- 操作按钮区域 --> 39 <!-- 操作按钮区域 -->
40 <div class="table-operator"> 40 <div class="table-operator">
41 - <a-button @click="handleUpload()" type="primary" icon="plus">上传设计图及材料表</a-button>  
42 - <!-- <a-button type="primary" icon="download" @click="handleExportXls('订单表')">导出</a-button>  
43 - <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">  
44 - <a-button type="primary" icon="import">导入</a-button>  
45 - </a-upload> -->  
46 - <!-- 高级查询区域 -->  
47 - <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> --> 41 + <a-button @click="handleUpload()" type="primary" icon="plus" :disabled="selectedRowKeys.length > 0 && productDesignStatus ==1">上传设计图及材料表</a-button>
  42 +
48 </div> 43 </div>
49 44
50 <!-- table区域-begin --> 45 <!-- table区域-begin -->
@@ -216,7 +211,7 @@ @@ -216,7 +211,7 @@
216 } 211 }
217 ], 212 ],
218 url: { 213 url: {
219 - list: "/order_form/tblOrderForm/productDesignList", 214 + list: "/order_form/productDesign/productDesignList",
220 delete: "/order_form/tblOrderForm/delete", 215 delete: "/order_form/tblOrderForm/delete",
221 deleteBatch: "/order_form/tblOrderForm/deleteBatch", 216 deleteBatch: "/order_form/tblOrderForm/deleteBatch",
222 exportXlsUrl: "/order_form/tblOrderForm/exportXls", 217 exportXlsUrl: "/order_form/tblOrderForm/exportXls",
@@ -240,6 +235,7 @@ @@ -240,6 +235,7 @@
240 superFieldList:[], 235 superFieldList:[],
241 tblWorkOrderMainId: '', 236 tblWorkOrderMainId: '',
242 orderId:'', 237 orderId:'',
  238 + productDesignStatus:''
243 } 239 }
244 }, 240 },
245 created() { 241 created() {
@@ -294,6 +290,7 @@ @@ -294,6 +290,7 @@
294 this.$message.error("请先选中一条数据!") 290 this.$message.error("请先选中一条数据!")
295 return 291 return
296 } 292 }
  293 + // console.log('this.selectionRows',this.selectionRows)
297 this.$refs.ProductDesignModal.edit(this.selectedRowKeys[0],null); 294 this.$refs.ProductDesignModal.edit(this.selectedRowKeys[0],null);
298 this.$refs.ProductDesignModal.disableSubmit = false; 295 this.$refs.ProductDesignModal.disableSubmit = false;
299 }, 296 },
@@ -308,6 +305,7 @@ @@ -308,6 +305,7 @@
308 on: { 305 on: {
309 click: () => { 306 click: () => {
310 this.onSelectChange(record.id.split(","), [record]); 307 this.onSelectChange(record.id.split(","), [record]);
  308 +
311 } 309 }
312 } 310 }
313 } 311 }
@@ -326,6 +324,7 @@ @@ -326,6 +324,7 @@
326 this.selectionRows = selectionRows; 324 this.selectionRows = selectionRows;
327 this.tblWorkOrderMainId = selectionRows[0]['id'] 325 this.tblWorkOrderMainId = selectionRows[0]['id']
328 this.orderId = selectionRows[0]['orderId']; 326 this.orderId = selectionRows[0]['orderId'];
  327 + this.productDesignStatus = selectionRows[0]['productDesignStatus']
329 }, 328 },
330 getSuperFieldList(){ 329 getSuperFieldList(){
331 let fieldList=[]; 330 let fieldList=[];
@@ -5,18 +5,45 @@ @@ -5,18 +5,45 @@
5 <a-form-model ref="form" :model="model" :rules="validatorRules"> 5 <a-form-model ref="form" :model="model" :rules="validatorRules">
6 <a-row> 6 <a-row>
7 <a-col :span="24"> 7 <a-col :span="24">
  8 + <a-form-model-item label="选择" :labelCol="labelCol" :wrapperCol="wrapperCol" >
  9 + <a-radio-group @change="onChange" v-model="model.chooseStatus">
  10 + <a-radio :value="0" >
  11 + 从物料表选择
  12 + </a-radio>
  13 + <a-radio :value="1">
  14 + 新增
  15 + </a-radio>
  16 + </a-radio-group>
  17 + </a-form-model-item>
  18 + </a-col>
  19 + <a-col :span="24">
  20 + <a-form-model-item label="外购件编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partNumber" v-if="model.chooseStatus ==1">
  21 + <a-input v-model="model.partNumber" placeholder="请输入外购件编号" ></a-input>
  22 + </a-form-model-item>
  23 + </a-col>
  24 + <a-col :span="24">
8 <a-form-model-item label="外购件名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productName"> 25 <a-form-model-item label="外购件名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productName">
9 - <a-input v-model="model.productName" placeholder="请输入外购件名称"></a-input> 26 + <a-input v-model="model.productName" placeholder="请输入外购件名称" v-if="model.chooseStatus ==1"></a-input>
  27 + <a-select size="small" v-model="model.productName" placeholder="请选择外购件" allowClear @change = "handleChange" v-if="model.chooseStatus ==0">
  28 + <a-select-option v-for="(item,index) in materialOptions" :key="index" :value="item.partNumber" :channel="item">{{ item.productName }}</a-select-option>
  29 + </a-select>
  30 + </a-form-model-item>
  31 + </a-col>
  32 + <a-col :span="24">
  33 + <a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specifications">
  34 + <a-input v-model="model.specifications" placeholder="请输入规格" :disabled="model.chooseStatus ==0"></a-input>
10 </a-form-model-item> 35 </a-form-model-item>
11 </a-col> 36 </a-col>
12 <a-col :span="24"> 37 <a-col :span="24">
13 - <a-form-model-item label="规格型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specifications">  
14 - <a-input v-model="model.specifications" placeholder="请输入规格型号"></a-input> 38 + <a-form-model-item label="型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
  39 + <a-input v-model="model.type" placeholder="请输入型号" :disabled="model.chooseStatus ==0"></a-input>
15 </a-form-model-item> 40 </a-form-model-item>
16 </a-col> 41 </a-col>
17 <a-col :span="24"> 42 <a-col :span="24">
18 - <a-form-model-item label="外形尺寸" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="appearanceSize">  
19 - <a-input v-model="model.appearanceSize" placeholder="请输入外形尺寸"></a-input> 43 + <a-form-model-item label="物料类别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="wuType">
  44 + <a-select size="small" v-model="model.wuType" placeholder="请选择物料类别" allowClear :disabled="model.chooseStatus ==0">
  45 + <a-select-option v-for="(item,index) in meterialTypeList" :key="index" :value="item.value" :channel="item">{{ item.label }}</a-select-option>
  46 + </a-select>
20 </a-form-model-item> 47 </a-form-model-item>
21 </a-col> 48 </a-col>
22 <a-col :span="24"> 49 <a-col :span="24">
@@ -26,7 +53,7 @@ @@ -26,7 +53,7 @@
26 </a-col> 53 </a-col>
27 <a-col :span="24"> 54 <a-col :span="24">
28 <a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="danwei"> 55 <a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="danwei">
29 - <a-input v-model="model.danwei" placeholder="请输入单位"></a-input> 56 + <a-input v-model="model.danwei" placeholder="请输入单位" :disabled="model.chooseStatus ==0"></a-input>
30 </a-form-model-item> 57 </a-form-model-item>
31 </a-col> 58 </a-col>
32 <a-col :span="24"> 59 <a-col :span="24">
@@ -68,9 +95,11 @@ export default { @@ -68,9 +95,11 @@ export default {
68 return { 95 return {
69 title: "新增材料及外购件表", 96 title: "新增材料及外购件表",
70 options:[], 97 options:[],
  98 + materialOptions:[],
71 width: 800, 99 width: 800,
72 visible: false, 100 visible: false,
73 model: { 101 model: {
  102 + chooseStatus:0
74 }, 103 },
75 labelCol: { 104 labelCol: {
76 xs: { span: 24 }, 105 xs: { span: 24 },
@@ -80,17 +109,35 @@ export default { @@ -80,17 +109,35 @@ export default {
80 xs: { span: 24 }, 109 xs: { span: 24 },
81 sm: { span: 16 }, 110 sm: { span: 16 },
82 }, 111 },
83 - 112 + meterialTypeList:[{
  113 + value:'1',
  114 + label:"零件"
  115 + },{
  116 + value:'2',
  117 + label:"半成品"
  118 + },
  119 + {
  120 + value:'3',
  121 + label:"耗材"
  122 + },{
  123 + value:'4',
  124 + label:"劳保"
  125 + }],
84 confirmLoading: false, 126 confirmLoading: false,
85 validatorRules: { 127 validatorRules: {
  128 + partNumber:[
  129 + { required: true, message: '请输入外购件编号!' },
  130 + { validator: this.validatePartNumber },
  131 + ],
86 productName: [ 132 productName: [
87 { required: true, message: '请输入外购件名称!' }, 133 { required: true, message: '请输入外购件名称!' },
  134 + // {validator:this.validProductName, trigger: 'blur' }
88 ], 135 ],
89 specifications: [ 136 specifications: [
90 - { required: true, message: '请输入规格型号!' }, 137 + { required: true, message: '请输入规格!' },
91 ], 138 ],
92 - appearanceSize: [  
93 - { required: true, message: '请输入外形尺寸!' }, 139 + type: [
  140 + { required: true, message: '请输入型号!' },
94 ], 141 ],
95 danwei: [ 142 danwei: [
96 { required: true, message: '请输入单位!' }, 143 { required: true, message: '请输入单位!' },
@@ -108,39 +155,46 @@ export default { @@ -108,39 +155,46 @@ export default {
108 url: { 155 url: {
109 add: "/order_form/tblOrderForm/add", 156 add: "/order_form/tblOrderForm/add",
110 edit: "/order_form/tblOrderForm/edit", 157 edit: "/order_form/tblOrderForm/edit",
111 - } 158 + listAllMaterial:"/meterial/tblMaterial/listAll"
  159 + },
  160 + value: 0,
112 161
113 } 162 }
114 }, 163 },
115 created() { 164 created() {
116 - // this.model.status = '未下单'  
117 - //备份model原始值  
118 - // this.modelDefault = JSON.parse(JSON.stringify(this.model));  
119 }, 165 },
120 methods: { 166 methods: {
  167 + validProductName(rule, value, callback) {
  168 + console.log('rule',rule)
  169 + console.log('value',value)
  170 + console.log('this.model',this.model)
  171 + },
121 add() { 172 add() {
122 this.edit(); 173 this.edit();
123 }, 174 },
124 edit(id) { 175 edit(id) {
125 this.model.orderId = id 176 this.model.orderId = id
  177 + this.model.chooseStatus = 0
126 console.log('this.model:===',this.model) 178 console.log('this.model:===',this.model)
127 // this.model = Object.assign({}, record); 179 // this.model = Object.assign({}, record);
128 this.visible = true; 180 this.visible = true;
129 - // this.loadTree() 181 + this.loadTree()
130 }, 182 },
131 loadTree(){ 183 loadTree(){
132 - var that = this;  
133 - listProductType().then((res)=>{  
134 - if(res.success){  
135 - // that.treeData = [];  
136 - that.options = res.result  
137 - }  
138 - }); 184 + httpAction(this.url.listAllMaterial,null, "get").then((res) => {
  185 + if (res.success) {
  186 + this.materialOptions = res.result
  187 + } else {
  188 + // that.$message.warning(res.message);
  189 + }
  190 + })
139 }, 191 },
140 close() { 192 close() {
141 this.$emit('close'); 193 this.$emit('close');
142 this.visible = false; 194 this.visible = false;
143 this.$refs.form.clearValidate(); 195 this.$refs.form.clearValidate();
  196 + this.model = {}
  197 + this.model.chooseStatus = 0
144 }, 198 },
145 handleOk() { 199 handleOk() {
146 const that = this; 200 const that = this;
@@ -149,43 +203,54 @@ export default { @@ -149,43 +203,54 @@ export default {
149 this.$refs.form.validate(valid => { 203 this.$refs.form.validate(valid => {
150 if (valid) { 204 if (valid) {
151 console.log(this.model) 205 console.log(this.model)
  206 + // return
152 this.$emit('childByValue', this.model) 207 this.$emit('childByValue', this.model)
153 that.close(); 208 that.close();
154 this.model = {} 209 this.model = {}
155 - // // return  
156 - // that.confirmLoading = true;  
157 - // let httpurl = '';  
158 - // let method = '';  
159 - // if (!this.model.id) {  
160 - // httpurl += this.url.add;  
161 - // method = 'post';  
162 - // } else {  
163 - // httpurl += this.url.edit;  
164 - // method = 'put';  
165 - // }  
166 - // httpAction(httpurl, this.model, method).then((res) => {  
167 - // if (res.success) {  
168 - // that.$message.success(res.message);  
169 - // that.$emit('ok');  
170 - // } else {  
171 - // that.$message.warning(res.message);  
172 - // }  
173 - // }).finally(() => {  
174 - // that.confirmLoading = false;  
175 - // that.close();  
176 - // }) 210 +
177 } else { 211 } else {
178 return false 212 return false
179 } 213 }
180 }) 214 })
181 }, 215 },
  216 + onChange(e) {
  217 + if(e.target.value == 1){
  218 + this.model = {}
  219 + this.model.chooseStatus = 1
  220 + }else if(e.target.value == 0){
  221 + this.model = {}
  222 + this.model.chooseStatus = 0
  223 + }
  224 + },
  225 + handleChange (value,option){
  226 + let tempModel = option.data.attrs.channel
  227 + console.log('tempModel',tempModel)
  228 + if(tempModel.partNumber){
  229 + this.model.partNumber = tempModel.partNumber
  230 + }
  231 + if(tempModel.productName){
  232 + this.model.productName = tempModel.productName
  233 + }
  234 + if(tempModel.spec){
  235 + this.model.specifications = tempModel.spec
  236 + }
  237 + if(tempModel.type){
  238 + this.model.type = tempModel.type
  239 + }
  240 + if(tempModel.unit){
  241 + this.model.danwei = tempModel.unit
  242 + }
  243 + if(tempModel.meterialType){
  244 + this.model.wuType = tempModel.meterialType
  245 + }
  246 + },
182 handleCancel() { 247 handleCancel() {
183 this.close() 248 this.close()
184 }, 249 },
185 - validateBidNo(rule, value, callback) { 250 + validatePartNumber(rule, value, callback) {
186 var params = { 251 var params = {
187 - tableName: 'tbl_order_form',  
188 - fieldName: 'order_id', 252 + tableName: 'tbl_material',
  253 + fieldName: 'part_number',
189 fieldVal: value, 254 fieldVal: value,
190 dataId: this.model.id, 255 dataId: this.model.id,
191 } 256 }
@@ -193,7 +258,7 @@ export default { @@ -193,7 +258,7 @@ export default {
193 if (res.success) { 258 if (res.success) {
194 callback() 259 callback()
195 } else { 260 } else {
196 - callback('编号已存在!') 261 + callback('编号已存在')
197 } 262 }
198 }) 263 })
199 }, 264 },
@@ -69,7 +69,7 @@ @@ -69,7 +69,7 @@
69 import { httpAction } from '@/api/manage' 69 import { httpAction } from '@/api/manage'
70 import { validateDuplicateValue } from '@/utils/util' 70 import { validateDuplicateValue } from '@/utils/util'
71 import { duplicateCheck } from '@/api/api' 71 import { duplicateCheck } from '@/api/api'
72 -import {listProductType} from '@/api/ProductTpye' 72 +import {listDesign} from '@/api/ProductTpye'
73 import {getOneOrder} from '@/api/ProductTpye' 73 import {getOneOrder} from '@/api/ProductTpye'
74 import BiddingSqFormModal from './BiddingSqFormModal' 74 import BiddingSqFormModal from './BiddingSqFormModal'
75 import {queryDesignByOrderId} from '@/api/TblSalaryBase' 75 import {queryDesignByOrderId} from '@/api/TblSalaryBase'
@@ -101,7 +101,7 @@ export default { @@ -101,7 +101,7 @@ export default {
101 url: { 101 url: {
102 add: "/product_design/tblProductDesign/add", 102 add: "/product_design/tblProductDesign/add",
103 edit: "/product_design/tblProductDesign/edit", 103 edit: "/product_design/tblProductDesign/edit",
104 - list:"/trad/tblBiddingShenq/list", 104 + list:"/trad/tblBiddingShenq/listDesign",
105 }, 105 },
106 id:'', 106 id:'',
107 dataSource: [], 107 dataSource: [],
@@ -119,14 +119,14 @@ export default { @@ -119,14 +119,14 @@ export default {
119 key: 'productName', 119 key: 'productName',
120 }, 120 },
121 { 121 {
122 - title: '规格型号', 122 + title: '规格',
123 dataIndex: 'specifications', 123 dataIndex: 'specifications',
124 key: 'specifications', 124 key: 'specifications',
125 }, 125 },
126 { 126 {
127 - title: '外形尺寸',  
128 - dataIndex: 'appearanceSize',  
129 - key: 'appearanceSize', 127 + title: '型号',
  128 + dataIndex: 'type',
  129 + key: 'type',
130 }, 130 },
131 { 131 {
132 title: '品牌及技术条件', 132 title: '品牌及技术条件',
@@ -166,9 +166,6 @@ export default { @@ -166,9 +166,6 @@ export default {
166 } 166 }
167 }, 167 },
168 created() { 168 created() {
169 - // this.model.status = '未下单'  
170 - //备份model原始值  
171 - // this.modelDefault = JSON.parse(JSON.stringify(this.model));  
172 }, 169 },
173 methods: { 170 methods: {
174 add() { 171 add() {
@@ -180,9 +177,8 @@ export default { @@ -180,9 +177,8 @@ export default {
180 this.visible = true; 177 this.visible = true;
181 if(record){ 178 if(record){
182 this.titlea = '编辑' 179 this.titlea = '编辑'
183 - console.log('============1========')  
184 this.model = Object.assign({}, record); 180 this.model = Object.assign({}, record);
185 - console.log('============1========',this.model) 181 + console.log('this.model=======',this.model)
186 this.loadDesign(); 182 this.loadDesign();
187 this.loadBiddingSq() 183 this.loadBiddingSq()
188 }else{ 184 }else{
@@ -194,7 +190,7 @@ export default { @@ -194,7 +190,7 @@ export default {
194 loadOrder(){ 190 loadOrder(){
195 var that = this; 191 var that = this;
196 getOneOrder(that.id).then((res)=>{ 192 getOneOrder(that.id).then((res)=>{
197 - console.log('============4========') 193 + // console.log('============4========')
198 console.log(res) 194 console.log(res)
199 if(res.success){ 195 if(res.success){
200 this.model = res.result 196 this.model = res.result
@@ -203,7 +199,7 @@ export default { @@ -203,7 +199,7 @@ export default {
203 }, 199 },
204 loadDesign(){ 200 loadDesign(){
205 queryDesignByOrderId(this.model.orderId).then((res)=>{ 201 queryDesignByOrderId(this.model.orderId).then((res)=>{
206 - console.log('============2========') 202 + // console.log('============2========')
207 // console.log('loadDesign',res) 203 // console.log('loadDesign',res)
208 if(res.success){ 204 if(res.success){
209 this.model.id = res.result.id 205 this.model.id = res.result.id
@@ -214,30 +210,32 @@ export default { @@ -214,30 +210,32 @@ export default {
214 }); 210 });
215 }, 211 },
216 loadBiddingSq(){ 212 loadBiddingSq(){
217 - // console.log('this.model',this.model)  
218 - const tempModel = { 213 + console.log('this.model',this.model)
  214 + let tblBiddingShenq = {
219 orderId:this.model.orderId 215 orderId:this.model.orderId
220 } 216 }
221 - console.log(tempModel)  
222 - httpAction(this.url.list, tempModel, "get").then((res) => {  
223 - if (res.success) {  
224 - console.log('============3========')  
225 - // console.log('loadBiddingSq',res)  
226 - this.dataSource = res.result.records  
227 - console.log(this.model)  
228 - } else {  
229 - // that.$message.warning(res.message);  
230 - }  
231 - }) 217 + console.log(tblBiddingShenq)
  218 + listDesign(tblBiddingShenq).then((res)=>{
  219 + console.log('loadDesign',res)
  220 + if(res.success){
  221 + this.dataSource = res.result.records
  222 + }
  223 + });
  224 + // httpAction(this.url.list, tblBiddingShenq, "get").then((res) => {
  225 + // if (res.success) {
  226 + // // console.log('============3========')
  227 + // // console.log('loadBiddingSq',res)
  228 + // this.dataSource = res.result.records
  229 + // // console.log(this.model)
  230 + // } else {
  231 + // // that.$message.warning(res.message);
  232 + // }
  233 + // })
232 }, 234 },
233 childByValue (childValue) { 235 childByValue (childValue) {
234 // childValue就是子组件传过来的值 236 // childValue就是子组件传过来的值
  237 + childValue.workOrder = this.model.workOrder
235 this.dataSource.push(childValue) 238 this.dataSource.push(childValue)
236 - // this.dataSource = this.dataSource.filter((item) => {  
237 - // console.log(['item.orderId',item.orderId])  
238 - // return item.orderId !== undefined  
239 - // })  
240 - // console.log('this.dataSource==',this.dataSource)  
241 }, 239 },
242 handleDelete(index){ 240 handleDelete(index){
243 this.dataSource.splice(index, 1); 241 this.dataSource.splice(index, 1);
@@ -250,6 +248,7 @@ export default { @@ -250,6 +248,7 @@ export default {
250 this.$emit('close'); 248 this.$emit('close');
251 this.visible = false; 249 this.visible = false;
252 this.$refs.form.clearValidate(); 250 this.$refs.form.clearValidate();
  251 + this.dataSource = []
253 }, 252 },
254 handleOk() { 253 handleOk() {
255 const that = this; 254 const that = this;
@@ -257,7 +256,7 @@ export default { @@ -257,7 +256,7 @@ export default {
257 this.$refs.form.validate(valid => { 256 this.$refs.form.validate(valid => {
258 if (valid) { 257 if (valid) {
259 this.model.biddingSqList = this.dataSource 258 this.model.biddingSqList = this.dataSource
260 - console.log(this.model) 259 + // console.log(this.model)
261 // return 260 // return
262 that.confirmLoading = true; 261 that.confirmLoading = true;
263 let httpurl = ''; 262 let httpurl = '';
@@ -132,7 +132,7 @@ @@ -132,7 +132,7 @@
132 checkKey: this.currdatetime, 132 checkKey: this.currdatetime,
133 remember_me: rememberMe, 133 remember_me: rememberMe,
134 } 134 }
135 - console.log("登录参数", loginParams) 135 + // console.log("登录参数", loginParams)
136 this.Login(loginParams).then((res) => { 136 this.Login(loginParams).then((res) => {
137 this.$emit('success', res.result) 137 this.$emit('success', res.result)
138 }).catch((err) => { 138 }).catch((err) => {
@@ -66,7 +66,7 @@ @@ -66,7 +66,7 @@
66 captcha: this.model.captcha, 66 captcha: this.model.captcha,
67 remember_me: rememberMe 67 remember_me: rememberMe
68 } 68 }
69 - console.log("登录参数", loginParams) 69 + // console.log("登录参数", loginParams)
70 this.PhoneLogin(loginParams).then((res) => { 70 this.PhoneLogin(loginParams).then((res) => {
71 this.$emit('success', res.result) 71 this.$emit('success', res.result)
72 }).catch((err) => { 72 }).catch((err) => {