| | |
| | | } |
| | | |
| | | else if (process.env.NODE_ENV == 'production') { |
| | | axios.defaults.baseURL = 'http://127.0.0.1:8098/'; |
| | | axios.defaults.baseURL = 'http://10.30.4.92:9281/'; |
| | | } |
| | | if (!axios.defaults.baseURL.endsWith('/')) { |
| | | axios.defaults.baseURL+="/"; |
| | |
| | | <el-row height="50"> |
| | | <el-col :span="24"> |
| | | <div class="grid-content right-text"> |
| | | <el-link type="primary" @click="switchView">忢è§å¾</el-link> |
| | | <el-link type="primary" @click="switchView" v-if="false">忢è§å¾</el-link> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | onClick: function () { |
| | | } |
| | | }, |
| | | { |
| | | name: "æ å® åº å åº åº", |
| | | icon: '', |
| | | class: '', |
| | | value: 'StockOutbound', |
| | | type: 'success', |
| | | onClick: function () { |
| | | } |
| | | }, |
| | | ] |
| | | |
| | | export default buttons |
| | |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | let InOrder = this.buttons.find(x => x.value == 'StockOutbound'); |
| | | if (InOrder) { |
| | | InOrder.onClick = function () { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©æ°æ®!"); |
| | | if (rows.length > 1) return this.$error("è¯·éæ©åæ¡æ°æ®!"); |
| | | var keys = rows.map(x => { return x.stockId }); |
| | | this.http |
| | | .post("api/Task/Outbound?id="+keys[0], null, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | this.refresh(); |
| | | }); |
| | | } |
| | | } |
| | | this.columns.forEach(column => { |
| | | if (column.field == 'materielCode') { |
| | | column.formatter = (row) => { |
| | | var str=''; |
| | | var list=row.materielCode.split(','); |
| | | for (let index = 0; index < list.length; index++) { |
| | | str+=list[index]+'<br>'; |
| | | } |
| | | return str; |
| | | } |
| | | } |
| | | if (column.field == 'batchNo') { |
| | | column.formatter = (row) => { |
| | | var str=''; |
| | | var list=row.batchNo.split(','); |
| | | for (let index = 0; index < list.length; index++) { |
| | | str+=list[index]+'<br>'; |
| | | } |
| | | return str; |
| | | } |
| | | } |
| | | if (column.field == 'materielInfo') { |
| | | const today = new Date() |
| | | column.formatter = (row) => { |
| | | const today = new Date(); |
| | | const closestDate = row.details |
| | | .map(x => { |
| | | const date = new Date(x.effectiveDate); |
| | | const diffInDays = Math.ceil(Math.abs((today - date) / (1000 * 60 * 60 * 24))); |
| | | return { date, diffInDays }; |
| | | }) |
| | | .reduce((closest, current) => (current.diffInDays < closest.diffInDays? current : closest)) |
| | | .date; |
| | | |
| | | const daysSinceClosest = Math.ceil(Math.abs((today - closestDate) / (1000 * 60 * 60 * 24))); |
| | | return '<span style="color: #F56C6C">'+ daysSinceClosest+"天"+'</span>'; |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | |
| | | {field:'code',title:'客æ·ç¼ç ',type:'string',width:110,align:'left',sort:true}, |
| | | {field:'name',title:'客æ·åç§°',type:'string',width:110,align:'left'}, |
| | | {field:'nickName',title:'客æ·å
¨ç§°',type:'string',width:120,align:'left'}, |
| | | {field:'state',title:'ç¶æ',type:'bool',width:110,require:true,align:'left'}, |
| | | {field:'state',title:'ç¶æ',type:'bool',width:110,require:true,align:'left',bind: { key: "status", data: [] }}, |
| | | {field:'creater',title:'å建è
',type:'string',width:110,require:true,align:'left'}, |
| | | {field:'createDate',title:'å建æ¶é´',type:'datetime',width:150,require:true,align:'left',sort:true}, |
| | | {field:'modifier',title:'ä¿®æ¹äºº',type:'string',width:100,align:'left'}, |
| | |
| | | const searchFormFields = ref({ |
| | | locationCode: "", |
| | | roadwayNo: "", |
| | | locationType: "", |
| | | enableStatus: "", |
| | | locationStatus: "", |
| | | row: "", |
| | | column: "", |
| | | layer: "", |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | |
| | | ], |
| | | [ |
| | | { title: "è´§ä½ç¶æ", field: "locationStatus" ,type: "selectList",dataKey: "locationStatusEnum",data: [],}, |
| | | { title: "è¡", field: "row" ,type: "int"}, |
| | | { title: "å", field: "column" ,type: "int"}, |
| | | { title: "å±", field: "layer" ,type: "int"} |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | |
| | | field: "id", |
| | | title: "Id", |
| | | type: "int", |
| | | width: 90, |
| | | width: 100, |
| | | hidden: true, |
| | | readonly: true, |
| | | require: true, |
| | |
| | | field: "locationCode", |
| | | title: "è´§ä½ç¼å·", |
| | | type: "string", |
| | | width: 180, |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "locationName", |
| | | title: "è´§ä½åç§°", |
| | | type: "string", |
| | | width: 220, |
| | | width: 280, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "roadwayNo", |
| | | title: "å··éç¼å·", |
| | | type: "decimal", |
| | | width: 90, |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | |
| | | field: "locationStatus", |
| | | title: "è´§ä½ç¶æ", |
| | | type: "string", |
| | | width: 200, |
| | | width: 120, |
| | | align: "left", |
| | | bind: { key: "locationStatusEnum", data: [] }, |
| | | }, |
| | |
| | | field: "enableStatus", |
| | | title: "ç¦ç¨ç¶æ", |
| | | type: "string", |
| | | width: 180, |
| | | width: 80, |
| | | align: "left", |
| | | bind: { key: "enableStatusEnum", data: [] }, |
| | | }, |
| | |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | hidden: true, |
| | | }, |
| | | { |
| | | field: "createDate", |
| | |
| | | width: 160, |
| | | align: "left", |
| | | sort: true, |
| | | hidden: true, |
| | | }, |
| | | { |
| | | field: "modifier", |
| | |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | hidden: true |
| | | }, |
| | | ]); |
| | | const detail = ref({ |
| | |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "areaId", |
| | | field: "warehouseId", |
| | | title: "åºå主é®", |
| | | type: "string", |
| | | width: 90, |
| | |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | hidden:true |
| | | }, |
| | | { |
| | | field: "packspes", |
| | |
| | | type: "int", |
| | | width: 120, |
| | | align: "left", |
| | | hidden:true |
| | | }, |
| | | { |
| | | field: "attribute", |
| | |
| | | type: "string", |
| | | width: 200, |
| | | align: "left", |
| | | hidden:true |
| | | }, |
| | | { |
| | | field: "unit", |
| | |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | hidden:true |
| | | }, |
| | | { |
| | | field: "creater", |
| | |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | hidden:true |
| | | }, |
| | | { |
| | | field: "modifyDate", |
| | |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | hidden:true |
| | | }, |
| | | { |
| | | field: "remark", |
| | |
| | | ], |
| | | [ |
| | | {title:"åºåç»ç»", field:"invOrgId", type:"like"}, |
| | | {title:"ç¶æ", field:"status",type:"select",dataKey:"",data:[]}, |
| | | {title:"ç¶æ", field:"status",type:"select",dataKey:"status",data:[]}, |
| | | ] |
| | | ]); |
| | | const columns = ref([{field:'id',title:'主é®',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'}, |
| | |
| | | {field:'contactNumber',title:'èç³»çµè¯',type:'string',width:110,align:'left'}, |
| | | {field:'contactAddress',title:'èç³»å°å',type:'string',width:180,align:'left'}, |
| | | {field:'email',title:'çµåé®ç®±',type:'string',width:110,align:'left'}, |
| | | {field:'description',title:'æè¿°',type:'string',width:180,align:'left'}, |
| | | {field:'description',title:'æè¿°',type:'string',width:180,align:'left',hidden:true}, |
| | | {field:'invOrgId',title:'åºåç»ç»',type:'string',width:110,align:'left'}, |
| | | {field:'status',title:'ç¶æ',type:'int',width:110,require:true,align:'left'}, |
| | | {field:'status',title:'ç¶æ',type:'int',width:110,require:true,align:'left',bind: { key: "status", data: [] },}, |
| | | {field:'creater',title:'å建è
',type:'string',width:110,require:true,align:'left'}, |
| | | {field:'createDate',title:'å建æ¶é´',type:'datetime',width:150,require:true,align:'left',sort:true}, |
| | | {field:'modifier',title:'ä¿®æ¹äºº',type:'string',width:100,align:'left'}, |
| | | {field:'modifyDate',title:'ä¿®æ¹æ¥æ',type:'datetime',width:150,align:'left',sort:true}]); |
| | | {field:'modifier',title:'ä¿®æ¹äºº',type:'string',width:100,align:'left',hidden:true}, |
| | | {field:'modifyDate',title:'ä¿®æ¹æ¥æ',type:'datetime',width:150,align:'left',sort:true,hidden:true}]); |
| | | const detail = ref({ |
| | | cnName: "#detailCnName", |
| | | table: "#detailTable", |
| | |
| | | {field:'deptNo',title:'é¨é¨ç¼ç ',type:'string',width:110,align:'left'}, |
| | | {field:'deptName',title:'é¨é¨åç§°',type:'string',width:110,align:'left'}, |
| | | {field:'name',title:'åå·¥åç§°',type:'string',width:110,align:'left'}, |
| | | {field:'state',title:'ç¶æ',type:'int',width:110,require:true,align:'left'}, |
| | | {field:'state',title:'ç¶æ',type:'int',width:110,require:true,align:'left',bind: { key: "status", data: [] }}, |
| | | {field:'invOrgId',title:'åºåç»ç»',type:'string',width:110,align:'left'}, |
| | | {field:'type',title:'ç±»å',type:'int',width:110,require:true,align:'left'}, |
| | | {field:'creater',title:'å建è
',type:'string',width:110,require:true,align:'left'}, |
| | |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | hidden: true |
| | | }, |
| | | { |
| | | field: "modifyDate", |
| | |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | hidden: true |
| | | }, |
| | | { |
| | | field: "remark", |
| | |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | hidden: true |
| | | }, |
| | | ]); |
| | | const detail = ref({ |
| | |
| | | title: "åæ®ç±»å", |
| | | field: "orderType", |
| | | type: "select", |
| | | dataKey: "inOrderType", |
| | | dataKey: "purchaseType", |
| | | data: [], |
| | | }, |
| | | { |
| | |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | bind: { key: "purchaseType", data: [] }, |
| | | }, |
| | | { |
| | | field: "supplierCode", |
| | |
| | | { |
| | | title: "åæ®ç¶æ", |
| | | field: "orderStatus", |
| | | type: "select", |
| | | dataKey: "inboundState", |
| | | type: "selectList", |
| | | dataKey: "receiveStatus", |
| | | data: [], |
| | | }, |
| | | ], |
| | |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | bind: { key: "receiveStatus", data: [] }, |
| | | }, |
| | | { |
| | | field: "customerId", |
| | |
| | | [ |
| | | {field:'palletCode',title:'æçç¼å·',type:'string'}, |
| | | {field:'locationCode',title:'è´§ä½ç¼å·',type:'string'}, |
| | | {field:'isFull',title:'æ¯å¦æ»¡ç',type:'select',dataKey:"yesno",data:[]}, |
| | | ] |
| | | ]); |
| | | const searchFormFields = ref({ |
| | |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | // { |
| | | // field: "isFull", |
| | | // title: "æ¯å¦æ»¡ç", |
| | | // type: "string", |
| | | // width: 150, |
| | | // align: "left", |
| | | // bind: { key: "yesno", data: [] }, |
| | | // }, |
| | | { |
| | | field: "isFull", |
| | | title: "æ¯å¦æ»¡ç", |
| | | type: "string", |
| | | width: 150, |
| | | field: "warehouseId", |
| | | title: "ä»åº", |
| | | type: "select", |
| | | width: 100, |
| | | align: "left", |
| | | bind: { key: "yesno", data: [] }, |
| | | bind: { key: "warehouses", data: [] }, |
| | | }, |
| | | { |
| | | field: "creater", |
| | |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | hidden:true |
| | | }, |
| | | { |
| | | field: "modifyDate", |
| | |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | hidden:true |
| | | }, |
| | | { |
| | | field: "remark", |
| | |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | hidden:true |
| | | }, |
| | | ]); |
| | | const detail = ref({ |
| | | cnName: "åå²åºåä¿¡æ¯", |
| | | table: "StockInfo_Hty", |
| | | columns: [ |
| | | {field:'id',title:'主é®',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'}, |
| | | {field:'palletCode',title:'æçç¼å·',type:'string',width:110,require:true,align:'left',sort:true}, |
| | | {field:'locationCode',title:'è´§ä½ç¼å·',type:'string',width:110,align:'left'}, |
| | | {field:'isFull',title:'æ¯å¦æ»¡ç',type:'bool',width:110,require:true,align:'left'}, |
| | | {field:'stockStatus',title:'åºåç¶æ',type:'int',width:110,require:true,align:'left'}, |
| | | {field:'remark',title:'夿³¨',type:'string',width:220,align:'left'}, |
| | | {field:'sourceId',title:'æºä¸»é®',type:'int',width:110,require:true,align:'left'}, |
| | | {field:'operateType',title:'夿³¨',type:'string',width:110,require:true,align:'left'}, |
| | | {field:'creater',title:'å建人',type:'string',width:110,require:true,align:'left'}, |
| | | {field:'createDate',title:'å建æ¶é´',type:'datetime',width:150,require:true,align:'left',sort:true}, |
| | | {field:'modifier',title:'ä¿®æ¹äºº',type:'string',width:100,align:'left'}, |
| | | {field:'modifyDate',title:'ä¿®æ¹æ¥æ',type:'datetime',width:150,align:'left',sort:true} |
| | | ], |
| | | sortName: "id", |
| | | cnName: "#detailCnName", |
| | | table: "", |
| | | columns: [], |
| | | sortName: "", |
| | | }); |
| | | return { |
| | | table, |
| | |
| | | ]); |
| | | const searchFormFields = ref({ |
| | | palletCode: "", |
| | | locationCode: "", |
| | | // locationCode: "", |
| | | materielCode:"", |
| | | batchNo:"" |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "æçç¼å·", field: "palletCode" }, |
| | | { title: "è´§ä½ç¼å·", field: "locationCode" }, |
| | | { title: "æçç¼å·", field: "palletCode",type: "like" }, |
| | | // { title: "è´§ä½ç¼å·", field: "locationCode",type: "like" }, |
| | | { title: "è´§ä½ç¶æ", field: "locationStatus" ,type: "selectList",dataKey: "locationStatusEnum",data: [],}, |
| | | { title: "åºåç¶æ", field: "stockStatus" ,type: "selectList",dataKey: "stockStatusEmun",data: [],}, |
| | | ], |
| | | [ |
| | | { title: "ç©æç¼å·", field: "materielCode",type: "like"}, |
| | | { title: "æ¹æ¬¡å·", field: "batchNo",type: "like"} |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | |
| | | field: "locationCode", |
| | | title: "è´§ä½ç¼å·", |
| | | type: "string", |
| | | width: 180, |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "locationName", |
| | | title: "è´§ä½åç§°", |
| | | type: "string", |
| | | width: 220, |
| | | width: 270, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "roadwayNo", |
| | | title: "å··éç¼å·", |
| | | type: "decimal", |
| | | width: 90, |
| | | width: 100, |
| | | align: "left", |
| | | hidden:true |
| | | }, |
| | | |
| | | { |
| | | field: "materielCode", |
| | | title: "æå«ç©æç¼å·", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "batchNo", |
| | | title: "æå«ç©ææ¹æ¬¡", |
| | | type: "string", |
| | | width: 200, |
| | | align: "left" |
| | | }, |
| | | { |
| | | field: "materielInfo", |
| | | title: "æå«ç©æææ©ä¸´æ", |
| | | type: "string", |
| | | width: 140, |
| | | align: "left", |
| | | }, |
| | | { |
| | |
| | | field: "locationType", |
| | | title: "è´§ä½ç±»å", |
| | | type: "string", |
| | | width: 120, |
| | | width: 100, |
| | | align: "left", |
| | | bind:{key: "locationTypeEnum", data: []} |
| | | }, |
| | |
| | | field: "locationStatus", |
| | | title: "è´§ä½ç¶æ", |
| | | type: "string", |
| | | width: 200, |
| | | width: 120, |
| | | align: "left", |
| | | bind: { key: "locationStatusEnum", data: [] }, |
| | | }, |
| | |
| | | field: "enalbeStatus", |
| | | title: "ç¦ç¨ç¶æ", |
| | | type: "string", |
| | | width: 180, |
| | | width: 80, |
| | | align: "left", |
| | | bind: { key: "enableStatusEnum", data: [] }, |
| | | }, |
| | | { |
| | | field: "isFull", |
| | | title: "æ¯å¦æ»¡ç", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | hidden: true, |
| | | bind: { key: "yesno", data: [] }, |
| | | }, |
| | | { |
| | | field: "creater", |
| | |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | hidden:true |
| | | }, |
| | | ]); |
| | | const detail = ref({ |
| | |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | hidden: true |
| | | }, |
| | | { |
| | | field: "materielCode", |
| | | title: "ç©æç¼å·", |
| | | type: "string", |
| | | width: 150, |
| | | width: 110, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "materielName", |
| | | title: "ç©æåç§°", |
| | | type: "string", |
| | | width: 150, |
| | | width: 130, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "orderNo", |
| | | title: "åæ®ç¼å·", |
| | | type: "decimal", |
| | | width: 90, |
| | | width: 130, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "batchNo", |
| | | title: "æ¹æ¬¡å·", |
| | | type: "string", |
| | | width: 90, |
| | | width: 180, |
| | | align: "left", |
| | | }, |
| | | { |
| | |
| | | type: "int", |
| | | width: 120, |
| | | align: "left", |
| | | hidden: true, |
| | | }, |
| | | { |
| | | field: "stockQuantity", |
| | | title: "åºåæ°é", |
| | | type: "string", |
| | | width: 200, |
| | | width: 80, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "outboundQuantity", |
| | | title: "åºåºæ°é", |
| | | type: "string", |
| | | width: 180, |
| | | width: 80, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "unit", |
| | | title: "åä½", |
| | | type: "string", |
| | | width: 50, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "productionDate", |
| | | title: "çäº§æ¥æ", |
| | | type: "string", |
| | | width: 80, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "effectiveDate", |
| | | title: "æææ¥æ", |
| | | type: "string", |
| | | width: 80, |
| | | align: "left", |
| | | }, |
| | | { |
| | |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | bind: { key: "stockStatusEmun", data: [] } |
| | | }, |
| | | { |
| | | field: "creater", |
| | |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | hidden: true |
| | | }, |
| | | { |
| | | field: "createDate", |
| | |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | hidden: true |
| | | }, |
| | | { |
| | | field: "modifier", |
| | |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | hidden: true |
| | | }, |
| | | { |
| | | field: "modifyDate", |
| | |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | hidden: true |
| | | }, |
| | | { |
| | | field: "remark", |
| | |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | hidden: true |
| | | }, |
| | | ], |
| | | sortName: "id", |
| | |
| | | { title: "å建人", field: "creater", type: "like" }, |
| | | ], |
| | | [ |
| | | { title: "ä»»å¡ç±»å",field: "taskType",type: "selectList",dataKey: "taskTypeEnum",data: [],}, |
| | | { title: "ä»»å¡ç±»å",field: "taskType",type: "selectList",dataKey: "taskType",data: [],}, |
| | | { title: "ä»»å¡ç¶æ",field: "taskStatus",type: "selectList",dataKey: "taskStatusEnum",data: [],}, |
| | | { title: "å··éå·", field: "roadway", type: "like" }, |
| | | ], |
| | |
| | | type: "int", |
| | | width: 90, |
| | | align: "left", |
| | | bind: { key: "taskTypeEnum", data: [] }, |
| | | bind: { key: "taskType", data: [] }, |
| | | }, |
| | | { |
| | | field: "taskStatus", |
| | |
| | | { title: "å建人", field: "creater", type: "like" }, |
| | | ], |
| | | [ |
| | | { title: "ä»»å¡ç±»å",field: "taskType",type: "selectList",dataKey: "taskTypeEnum",data: [],}, |
| | | { title: "ä»»å¡ç±»å",field: "taskType",type: "selectList",dataKey: "taskType",data: [],}, |
| | | { title: "ä»»å¡ç¶æ",field: "taskStatus",type: "selectList",dataKey: "taskStatusEnum",data: [],}, |
| | | { title: "å··éå·", field: "roadway", type: "like" }, |
| | | ], |
| | |
| | | type: "int", |
| | | width: 90, |
| | | align: "left", |
| | | bind: { key: "taskTypeEnum", data: [] }, |
| | | bind: { key: "taskType", data: [] }, |
| | | }, |
| | | { |
| | | field: "taskStatus", |
| | |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Const; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_DTO.ERP; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_ISystemRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_BasicService |
| | | { |
| | | public class UserInfoService : ServiceBase<Dt_UserInfo, IUserInfoRepository>, IUserInfoService |
| | | { |
| | | public UserInfoService(IUserInfoRepository BaseDal) : base(BaseDal) |
| | | private readonly ISys_UserRepository _userRepository; |
| | | public UserInfoService(IUserInfoRepository BaseDal, ISys_UserRepository userRepository) : base(BaseDal) |
| | | { |
| | | _userRepository = userRepository; |
| | | } |
| | | |
| | | public IUserInfoRepository Repository => BaseDal; |
| | |
| | | Name = model.Name, |
| | | State = model.State |
| | | }; |
| | | |
| | | Sys_User user = new Sys_User() |
| | | { |
| | | UserName = userInfo.Code, |
| | | RoleId = 0, |
| | | UserPwd = "TC123456".EncryptDES(AppSecret.User), |
| | | RoleName = "", |
| | | Enable = (byte)userInfo.State, |
| | | LastModifyPwdDate = DateTime.Now, |
| | | Address = "ç³»ç»æå¡å¨", |
| | | TenantId = 0, |
| | | Creater = "ç³»ç»", |
| | | UserTrueName = userInfo.Name, |
| | | }; |
| | | BaseDal.AddData(userInfo); |
| | | _userRepository.AddData(user); |
| | | } |
| | | else if (model.OperateType == "1") |
| | | { |
| | |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | public WebResponseContent AddUser() |
| | | { |
| | | try |
| | | { |
| | | List<Dt_UserInfo> userInfos = BaseDal.QueryData().Where(x=>x.Code!= "Admin").ToList(); |
| | | List<Sys_User> userList = new List<Sys_User>(); |
| | | foreach (var item in userInfos) |
| | | { |
| | | Sys_User user = new Sys_User() |
| | | { |
| | | UserName = item.Code, |
| | | RoleId = 0, |
| | | UserPwd="TC123456".EncryptDES(AppSecret.User), |
| | | RoleName ="", |
| | | Enable=(byte)item.State, |
| | | LastModifyPwdDate=DateTime.Now, |
| | | Address= "ç³»ç»æå¡å¨", |
| | | TenantId=0, |
| | | Creater= "ç³»ç»", |
| | | UserTrueName=item.Name, |
| | | }; |
| | | userList.Add(user); |
| | | } |
| | | _userRepository.AddData(userList); |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEA_IBasicService\WIDESEA_IBasicService.csproj" /> |
| | | <ProjectReference Include="..\WIDESEA_IRecordService\WIDESEA_IRecordService.csproj" /> |
| | | <ProjectReference Include="..\WIDESEA_ISystemRepository\WIDESEA_ISystemRepository.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
| | |
| | | /// </summary> |
| | | [Description("大æç")] |
| | | LargePallet = 3, |
| | | |
| | | /// <summary> |
| | | /// ç¹å¤§æç |
| | | /// </summary> |
| | | [Description("ç¹å¤§æç")] |
| | | ExtraPallet = 4, |
| | | } |
| | | } |
| | |
| | | { |
| | | |
| | | int length = sugarColumn.Length; |
| | | if (length == 0) { return (true, null, null); } |
| | | if (length == 0) { return (true, null, value); } |
| | | //夿ååèä¸ååæ®µ |
| | | else if (length < 8000 && |
| | | ((dbType.Substring(0, 1) != "n" |
| | |
| | | { |
| | | public class StockViewDTO |
| | | { |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "è´§ä½å·")] |
| | | public string LocationCode { get; set; } |
| | | |
| | | public string LocationName { get; set; } |
| | |
| | | |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int StockId { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "æçå·")] |
| | | public string PalletCode { get; set; } |
| | | |
| | | public bool IsFull { get; set; } |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "ç©æå·")] |
| | | public string MaterielCode { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "æ¹æ¬¡å·")] |
| | | public string BatchNo { get; set; } |
| | | |
| | | public int StockStatus { get; set; } |
| | | |
| | |
| | | IUserInfoRepository Repository { get; } |
| | | |
| | | WebResponseContent ReceiveUser(UserInfoDTO content); |
| | | WebResponseContent AddUser(); |
| | | } |
| | | } |
| | |
| | | MesResponseContent TestScrap(TestToolScrap toolScraps); |
| | | WebResponseContent IsRelocation(int taskNum, string locationCode); |
| | | WebResponseContent TestSynStock(TestToolSynInfo toolSynInfo); |
| | | /// <summary> |
| | | /// éæ©åºåçæåºåºä»»å¡ |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | | WebResponseContent Outbound(int id); |
| | | } |
| | | } |
| | |
| | | SerialNumber = model.SerialNumber, |
| | | StockQuantity = model.Quantity, |
| | | OutboundQuantity = 0, |
| | | Unit = materielInfo.MaterielUnit, |
| | | Status = StockStatusEmun.ç»çæå.ObjToInt(), |
| | | ProductionDate = model.ProductionDate, |
| | | EffectiveDate = model.EffectiveDate, |
| | |
| | | SerialNumber = model.SerialNumber, |
| | | StockQuantity = model.Quantity, |
| | | OutboundQuantity = 0, |
| | | Unit = materielInfo.MaterielUnit, |
| | | Status = StockStatusEmun.ç»çæå.ObjToInt(), |
| | | ProductionDate = model.ProductionDate, |
| | | EffectiveDate = model.EffectiveDate, |
| | |
| | | SerialNumber = model.SerialNumber, |
| | | StockQuantity = model.Quantity, |
| | | OutboundQuantity = 0, |
| | | Unit= materielInfo.MaterielUnit, |
| | | Status = StockStatusEmun.ç»çæå.ObjToInt(), |
| | | ProductionDate = model.ProductionDate, |
| | | EffectiveDate = model.EffectiveDate, |
| | |
| | | public int Status { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "åä½")] |
| | | public string Unit { get; set; } |
| | | /// <summary> |
| | | /// å
¥åºåæç»è¡å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å
¥åºåæç»è¡å·")] |
| | |
| | |  |
| | | using HslCommunication.Secs.Types; |
| | | using Microsoft.AspNetCore.Http; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Drawing.Printing; |
| | | using System.Dynamic; |
| | |
| | | |
| | | public virtual PageGridData<StockViewDTO> GetPageData(PageDataOptions options) |
| | | { |
| | | string where = options.ValidatePageOptions(typeof(StockViewDTO).GetProperties()); |
| | | |
| | | //string where = options.ValidatePageOptions(typeof(StockViewDTO).GetProperties()); |
| | | //è·åæåºå段 |
| | | //Dictionary<string, OrderByType> orderbyDic = options.GetPageDataSort(typeof(StockViewDTO).GetProperties()); |
| | | //List<OrderByModel> orderByModels = new List<OrderByModel>(); |
| | |
| | | //} |
| | | int totalCount = 0; |
| | | |
| | | ISugarQueryable<Dt_StockInfo> sugarQueryable1 = _dbBase.Queryable<Dt_StockInfo>(); |
| | | ISugarQueryable<Dt_StockInfo> sugarQueryable1 = _dbBase.Queryable<Dt_StockInfo>().Includes(x=>x.Details); |
| | | ISugarQueryable<Dt_LocationInfo> sugarQueryable = _dbBase.Queryable<Dt_LocationInfo>(); |
| | | |
| | | List<StockViewDTO> list = sugarQueryable1.InnerJoin(sugarQueryable, (b, a) => a.LocationCode == b.LocationCode).WhereIF(!string.IsNullOrEmpty(where), where).Select((b, a) => new StockViewDTO |
| | | List<StockViewDTO> list = sugarQueryable1.InnerJoin(sugarQueryable, (b, a) => a.LocationCode == b.LocationCode).Select((b, a) |
| | | => new StockViewDTO |
| | | { |
| | | LocationCode = b.LocationCode, |
| | | Column = a.Column, |
| | |
| | | StockStatus = b.StockStatus, |
| | | Details = b.Details, |
| | | }).ToPageList(options.Page, options.Rows, ref totalCount); |
| | | |
| | | |
| | | list.ForEach(x => |
| | | { |
| | | x.MaterielCode = string.Join(",", x.Details.Select(x => x.MaterielCode).Distinct()); |
| | | x.BatchNo = string.Join(",", x.Details.Select(x => x.BatchNo).Distinct()); |
| | | } |
| | | ); |
| | | if (options.Wheres.IsNotEmptyOrNull()) |
| | | { |
| | | List<SearchParameters> searchParameters = options.Wheres.DeserializeObject<List<SearchParameters>>(); |
| | | foreach (var item in searchParameters) |
| | | { |
| | | switch (item.Name) |
| | | { |
| | | case "palletCode": |
| | | list = list.Where(x => x.PalletCode.Contains(item.Value)).ToList(); |
| | | break; |
| | | case "locationStatus": |
| | | List<int> locationStatus = item.Value.Split(",").Select(int.Parse).ToList(); |
| | | list = list.Where(x => locationStatus.Contains(x.LocationStatus)).ToList(); |
| | | break; |
| | | case "stockStatus": |
| | | List<int> stockStatus = item.Value.Split(",").Select(int.Parse).ToList(); |
| | | list = list.Where(x => stockStatus.Contains(x.StockStatus)).ToList(); |
| | | break; |
| | | case "materielCode": |
| | | list = list.Where(x => x.MaterielCode.Contains(item.Value)).ToList(); |
| | | break; |
| | | case "batchNo": |
| | | list=list.Where(x => x.BatchNo.Contains(item.Value)).ToList(); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | return new PageGridData<StockViewDTO>(totalCount, list); |
| | | |
| | | } |
| | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | case "materials": |
| | | { |
| | | { |
| | | List<object> data = new List<object>(); |
| | | |
| | | { |
| | | List<Dt_MaterielInfo> materielInfos = _basicRepository.MaterielInfoRepository.QueryData(); |
| | | int index = 0; |
| | | foreach (var item in materielInfos) |
| | | { |
| | | data.Add(new { key = item.MaterielCode, value = item.MaterielCode }); |
| | | index++; |
| | | } |
| | | } |
| | | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | } |
| | | break; |
| | | case "taskType": |
| | | { |
| | | List<object> data = new List<object>(); |
| | | |
| | | #region TaskTypeEnum |
| | | { |
| | | Type type = typeof(TaskTypeEnum); |
| | | List<int> enums = Enum.GetValues(typeof(TaskTypeEnum)).Cast<int>().ToList(); |
| | | int index = 0; |
| | | foreach (var item in enums) |
| | | { |
| | | FieldInfo? fieldInfo = typeof(TaskTypeEnum).GetField(((TaskTypeEnum)item).ToString()); |
| | | DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); |
| | | if (description != null) |
| | | { |
| | | data.Add(new { key = item.ToString(), value = description.Description }); |
| | | } |
| | | else |
| | | { |
| | | data.Add(new { key = item.ToString(), value = item.ToString() }); |
| | | } |
| | | index++; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | case "inboundState": |
| | | { |
| | | List<object> data = new List<object>(); |
| | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | case "receiveStatus": |
| | | { |
| | | List<object> data = new List<object>(); |
| | | |
| | | { |
| | | Type type = typeof(ReceiveOrderStatusEnum); |
| | | List<int> enums = Enum.GetValues(typeof(ReceiveOrderStatusEnum)).Cast<int>().ToList(); |
| | | int index = 0; |
| | | foreach (var item in enums) |
| | | { |
| | | FieldInfo? fieldInfo = typeof(ReceiveOrderStatusEnum).GetField(((ReceiveOrderStatusEnum)item).ToString()); |
| | | DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); |
| | | if (description != null) |
| | | { |
| | | data.Add(new { key = item.ToString(), value = description.Description }); |
| | | } |
| | | else |
| | | { |
| | | data.Add(new { key = item.ToString(), value = item.ToString() }); |
| | | } |
| | | index++; |
| | | } |
| | | } |
| | | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | case "purchaseType": |
| | | { |
| | | List<object> data = new List<object>(); |
| | | |
| | | { |
| | | Type type = typeof(PurchaseOrderStatusEnum); |
| | | List<int> enums = Enum.GetValues(typeof(PurchaseOrderStatusEnum)).Cast<int>().ToList(); |
| | | int index = 0; |
| | | foreach (var item in enums) |
| | | { |
| | | FieldInfo? fieldInfo = typeof(PurchaseOrderStatusEnum).GetField(((PurchaseOrderStatusEnum)item).ToString()); |
| | | DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); |
| | | if (description != null) |
| | | { |
| | | data.Add(new { key = item.ToString(), value = description.Description }); |
| | | } |
| | | else |
| | | { |
| | | data.Add(new { key = item.ToString(), value = item.ToString() }); |
| | | } |
| | | index++; |
| | | } |
| | | } |
| | | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | } |
| | | return result; |
| | | } |
| | |
| | | { |
| | | x.Status = StockStatusEmun.å
¥åºå®æ.ObjToInt(); |
| | | }); |
| | | //æ´æ°ä»»å¡ç¶æ |
| | | task.TaskStatus = (int)TaskStatusEnum.Finish; |
| | | _unitOfWorkManage.BeginTran(); |
| | | BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? OperateTypeEnum.äººå·¥å®æ : OperateTypeEnum.èªå¨å®æ); |
| | | _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, (PalletTypeEnum)stockInfo.PalletType, LocationStatusEnum.InStock, stockInfo.WarehouseId); |
| | |
| | | using WIDESEA_Common.TaskEnum; |
| | | using WIDESEA_Common.OrderEnum; |
| | | using WIDESEA_Common.StockEnum; |
| | | using WIDESEA_Common.CommonEnum; |
| | | using WIDESEA_Common.LocationEnum; |
| | | |
| | | namespace WIDESEA_TaskInfoService |
| | | { |
| | | public partial class TaskService |
| | | { |
| | | |
| | | /// <summary> |
| | | /// éæ©åºåçæåºåºä»»å¡ |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent Outbound(int id) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x=>x.Id==id).Includes(x=>x.Details).First(); |
| | | if (stockInfo == null) |
| | | { |
| | | return content.Error($"æªæ¾å°åºå"); |
| | | } |
| | | Dt_LocationInfo locationInfo = _basicRepository.LocationInfoRepository.QueryFirst(x => x.LocationCode == stockInfo.LocationCode); |
| | | if (locationInfo!=null && (locationInfo.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || locationInfo.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && locationInfo.LocationStatus==LocationStatusEnum.InStock.ObjToInt() && stockInfo.StockStatus==StockStatusEmun.å
¥åºå®æ.ObjToInt()) |
| | | { |
| | | List<Dt_Task> tasks = GetTasks(new List<Dt_StockInfo>() { stockInfo }); |
| | | if (tasks == null || tasks.Count <= 0) |
| | | { |
| | | return content.Error($"çæä»»å¡å¤±è´¥"); |
| | | } |
| | | //å¤çåºåæ°æ® |
| | | stockInfo.StockStatus = (int)StockStatusEmun.åºåºéå®; |
| | | LocationStatusEnum locationStatus = (LocationStatusEnum)locationInfo.LocationStatus; |
| | | locationInfo.LocationStatus = (int)LocationStatusEnum.Lock; |
| | | //夿æ¯å¦æåºåºåä¿¡æ¯ |
| | | _unitOfWorkManage.BeginTran(); |
| | | //æ´æ°åºåç¶æ |
| | | _stockRepository.StockInfoRepository.UpdateData(stockInfo); |
| | | //æ´æ°è´§ä½ç¶æ |
| | | _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, (PalletTypeEnum)stockInfo.PalletType, LocationStatusEnum.Lock, stockInfo.WarehouseId); |
| | | //æ°å»ºä»»å¡ |
| | | BaseDal.AddData(tasks); |
| | | //å å
¥è´§ä½åå¨è®°å½ |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, locationStatus, LocationStatusEnum.Lock, LocationChangeType.OutboundAssignLocation, stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", tasks[0].TaskNum); |
| | | _unitOfWorkManage.CommitTran(); |
| | | PushTasksToWCS(tasks); |
| | | content.OK(); |
| | | } |
| | | else |
| | | { |
| | | content.Error($"è´§ä½åºåºæ¡ä»¶ä¸æ»¡è¶³"); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | /// <summary> |
| | | /// åºåæ°æ®è½¬åºåºä»»å¡ |
| | | /// </summary> |
| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_Model.Models; |
| | |
| | | public UserInfoController(IUserInfoService service) : base(service) |
| | | { |
| | | } |
| | | /// <summary> |
| | | /// çæç¨æ·è´¦å· |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost,Route("AddUser"),AllowAnonymous] |
| | | public WebResponseContent AddUser() |
| | | { |
| | | return Service.AddUser(); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | return Service.PushTasksToWCSSingle(taskNum, agvDescription); |
| | | } |
| | | /// <summary> |
| | | /// éæ©åºåçæåºåºä»»å¡ |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("Outbound"), AllowAnonymous] |
| | | public WebResponseContent Outbound(int id) |
| | | { |
| | | return Service.Outbound(id); |
| | | } |
| | | } |
| | | } |
| | |
| | | "Microsoft.AspNetCore": "Warning" |
| | | } |
| | | }, |
| | | "dics": "inOrderType,outOrderType,inboundState,createType,enableEnum,enableStatusEnum,locationStatusEnum,locationTypeEnum,taskTypeEnum,taskStatusEnum,outboundStatusEnum,orderDetailStatusEnum,stockStatusEmun,stockChangeType,outStockStatus,receiveOrderTypeEnum,authorityScope,authorityScopes,locationChangeType", |
| | | "dics": "inOrderType,outOrderType,inboundState,createType,enableEnum,enableStatusEnum,locationStatusEnum,locationTypeEnum,taskTypeEnum,taskStatusEnum,outboundStatusEnum,orderDetailStatusEnum,stockStatusEmun,stockChangeType,outStockStatus,receiveOrderTypeEnum,authorityScope,authorityScopes,locationChangeType,warehouses,suppliers,taskType,receiveStatus,purchaseType", |
| | | "AllowedHosts": "*", |
| | | "ConnectionStringsEncryption": false, |
| | | "MainDB": "DB_WIDESEA", //å½å项ç®ç主åºï¼æå¯¹åºçè¿æ¥å符串çEnabledå¿
须为true |