From b8c0763607375198e37e4b98ed42793ba6606689 Mon Sep 17 00:00:00 2001
From: 王震 <10952869+daywangzhen@user.noreply.gitee.com>
Date: 星期五, 17 十一月 2023 11:45:27 +0800
Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before
---
src/views/product/workbench/operation-task-pane.vue | 163 ++++++----
src/views/basic/location/index.vue | 2
src/views/technology/completeproductstructure/completeproductstructure-form.vue | 1
src/views/plan/manufacturingorder/customerorder.vue | 307 ++++++++++++++++++--
src/views/plan/manufacturingorder/productorder-form.vue | 22
src/views/product/workbench/workstationoperate-form.vue | 1
src/views/plan/customerorder/customerorder-form.vue | 4
src/api/warehouse/location.js | 16 +
src/views/product/workbench/index.vue | 260 +++++++++-------
src/views/product/workbench/taskinfo-pane.vue | 1
src/views/plan/manufacturingorder/index.vue | 4
src/views/product/workbench/feed-pane.vue | 8
src/views/basic/workstation/workstation-form.vue | 4
src/views/technology/structure/single-structure-form.vue | 4
src/api/plan/manufacturingorder.js | 8
src/views/basic/location/location-form.vue | 60 +++-
16 files changed, 602 insertions(+), 263 deletions(-)
diff --git a/src/api/plan/manufacturingorder.js b/src/api/plan/manufacturingorder.js
index cb98b76..e9b8d5d 100644
--- a/src/api/plan/manufacturingorder.js
+++ b/src/api/plan/manufacturingorder.js
@@ -80,6 +80,14 @@
})
}
+export function getProcessConfigFile(obj) {
+ return request({
+ url: '/mes/plan/customerOrder/processConfigFiles',
+ method: 'get',
+ params: obj
+ })
+}
+
export function checkOutTechnologyRouting(query) {
return request({
url: '/mes/plan/manufacturingOrder/checkout',
diff --git a/src/api/warehouse/location.js b/src/api/warehouse/location.js
index 7f1a72f..8afd1f5 100644
--- a/src/api/warehouse/location.js
+++ b/src/api/warehouse/location.js
@@ -106,3 +106,19 @@
params: query
})
}
+
+export function getIfsLocationByGroupCopy(query) {
+ return request({
+ url: '/mes/location/getIfsLocation/copy',
+ method: 'get',
+ params: query
+ })
+}
+
+export function getIfsLocationByGroupCopyAll(query) {
+ return request({
+ url: '/mes/location/getIfsLocationByGroupCopyAll',
+ method: 'get',
+ params: query
+ })
+}
\ No newline at end of file
diff --git a/src/views/basic/location/index.vue b/src/views/basic/location/index.vue
index f0474fe..d1c959d 100644
--- a/src/views/basic/location/index.vue
+++ b/src/views/basic/location/index.vue
@@ -198,7 +198,7 @@
{
minWidth: '200',
prop: 'ifsLocation',
- label: 'ERP搴撲綅',
+ label: 'IFS搴撲綅',
sort: true,
isTrue: false,
isSearch: true,
diff --git a/src/views/basic/location/location-form.vue b/src/views/basic/location/location-form.vue
index c2591bf..8871e84 100644
--- a/src/views/basic/location/location-form.vue
+++ b/src/views/basic/location/location-form.vue
@@ -135,11 +135,10 @@
<el-row>
<el-col :span="12">
<el-form-item
- v-if="permissions.basic_has_ifs"
label="IFS搴撲綅"
prop="ifsLocationDesc"
>
- <!--<el-select
+ <!-- <el-select
v-model="dataForm.ifsLocation"
filterable
placeholder="璇烽�夋嫨IFS搴撲綅"
@@ -152,11 +151,11 @@
:key="index"
>
</el-option>
- </el-select>-->
+ </el-select> -->
<el-cascader
v-model="dataForm.ifsLocationDesc"
:props="locationProps"
- style="width:100%"
+ style="width:100%" filterable
></el-cascader>
</el-form-item>
</el-col>
@@ -219,6 +218,7 @@
warehouseOptions: [],
factoryOptions: [],
ifsLocationOptions: [],
+ locationTree: [],
visible: false,
dataForm: {
id: 0,
@@ -262,34 +262,39 @@
locationProps: {
lazy: true,
lazyLoad(node, resolve) {
- console.log('node', node)
const { level } = node
if (level === 0) {
getIfsLocationGroup().then((response) => {
if (response.data.code === 0) {
const _data = response.data.data
-
- const nodes = _data.map((item) => {
+ const nodes = JSON.parse(_data)["LIST_INFO"].map((item) => {
return {
- value: item.LOCATION_GROUP,
- label: item.LOCATION_GROUP,
+ value: item.LOCATION_GROUP_DESC +'-'+ item.LOCATION_GROUP,
+ label: item.LOCATION_GROUP_DESC +'-'+ item.LOCATION_GROUP,
leaf: false
}
})
+ var set = new Set()
+ nodes.forEach(a=>{
+ set.add(JSON.stringify(a))
+ })
+ var list = []
+ set.forEach(a=>{
+ list.push(JSON.parse(a))
+ })
// 閫氳繃璋冪敤resolve灏嗗瓙鑺傜偣鏁版嵁杩斿洖锛岄�氱煡缁勪欢鏁版嵁鍔犺浇瀹屾垚
- resolve(nodes)
+ resolve(list)
}
})
} else {
- getIfsLocationByGroup({ locationGroup: node.value }).then(
+ getIfsLocationByGroup({ locationNo: node.value.split('-')[1] }).then(
(response) => {
if (response.data.code === 0) {
const _data = response.data.data
-
- const nodes = _data.map((item) => {
+ const nodes = JSON.parse(_data)["LIST_INFO"].map((item) => {
return {
value: item.LOCATION_NO,
- label: item.LOCATION_NO,
+ label: item.LOCATION_DESC +' | '+ item.LOCATION_NO,
leaf: true
}
})
@@ -404,7 +409,32 @@
this.isSubmit = false
}
})
- }
+ },
+ getLocationTree(){
+ getIfsLocationGroup().then((res) => {
+ if (res.data.code === 0) {
+ var strs = JSON.parse(res.data.data)['LIST_INFO']
+ var set3 = new Set()
+ var set2 = new Set()
+ var set = []
+ strs.forEach(a=>{
+ set2.add(a['LOCATION_GROUP_DESC'] + '-' + a['LOCATION_GROUP'])
+ })
+ strs.forEach(a=>{
+ set2.forEach(b=>{
+ if((a['LOCATION_GROUP_DESC'] + '-' + a['LOCATION_GROUP'])==b){
+ set3.add(a['LOCATION_DESC'] + '-' + a['LOCATION_NO'])
+ }
+ set.push({
+ value: b,
+ label: b,
+ children: []
+ })
+ })
+ })
+ }
+ })
+ }
}
}
</script>
diff --git a/src/views/basic/workstation/workstation-form.vue b/src/views/basic/workstation/workstation-form.vue
index 3b09630..9947e12 100644
--- a/src/views/basic/workstation/workstation-form.vue
+++ b/src/views/basic/workstation/workstation-form.vue
@@ -138,7 +138,7 @@
>
</el-transfer>
</el-tab-pane>
- <el-tab-pane label="浜у嚭涓嶅悎鏍煎簱浣�" name="disqualified">
+ <!-- <el-tab-pane label="浜у嚭涓嶅悎鏍煎簱浣�" name="disqualified">
<el-transfer
filterable
v-model="disqualifiedLocationIds"
@@ -159,7 +159,7 @@
@change="handleChangeQualifiedLocation"
>
</el-transfer>
- </el-tab-pane>
+ </el-tab-pane> -->
<el-tab-pane label="妫�楠屽緟澶勭悊搴撲綅" name="pending">
<el-transfer
filterable
diff --git a/src/views/plan/customerorder/customerorder-form.vue b/src/views/plan/customerorder/customerorder-form.vue
index 22b36b5..ec8dfc5 100644
--- a/src/views/plan/customerorder/customerorder-form.vue
+++ b/src/views/plan/customerorder/customerorder-form.vue
@@ -1299,9 +1299,6 @@
this.getConfigFiles()
},
delProcessConfigFile(row) {
- if (row.lineNumber !== this.dataForm.otcLineNo) {
- this.$message.error('涓婁紶鏂囦欢琛屽彿涓庡綋鍓嶉攢鍞鍗曡鍙蜂笉涓�鑷达紝涓嶅厑璁稿垹闄�')
- } else {
this.$confirm('鏄惁鍒犻櫎宸ヨ壓閰嶇疆鏂囦欢', '鎻愮ず', {
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
@@ -1314,7 +1311,6 @@
.then((data) => {
this.getConfigFiles()
})
- }
},
downloadProcessConfigFile(row) {
downloadProcessConfigFile(
diff --git a/src/views/plan/manufacturingorder/customerorder.vue b/src/views/plan/manufacturingorder/customerorder.vue
index 8cc4949..18f47fd 100644
--- a/src/views/plan/manufacturingorder/customerorder.vue
+++ b/src/views/plan/manufacturingorder/customerorder.vue
@@ -22,18 +22,18 @@
@keyup.enter.native="dataFormSubmit()"
label-width="100px"
class="l-mes productorder-order"
- :disabled="!editable"
>
- <el-tabs type="border-card">
+ <!-- :disabled="!editable" -->
+ <el-tabs type="border-card" @tab-click="downs" v-model="activeFileName">
<el-tab-pane label="涓昏" type="card">
<el-row>
<el-col :span="12">
<el-form-item label="鍚屾鏁版嵁鏉ユ簮" prop="sourceId">
- <el-input
- v-model="dataForm.sourceId"
- placeholder=""
- :disabled="!ediSource"
- ></el-input>
+ <el-input
+ v-model="dataForm.sourceId == 0 ? '鍚屾' : '鎵嬪姩'"
+ placeholder=""
+ disabled
+ ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
@@ -86,7 +86,7 @@
</el-select>
</el-form-item>
</el-col>
- <el-col :span="12">
+ <!-- <el-col :span="12">
<el-form-item label="琛屽彿" prop="coLineNo">
<el-input
v-model="dataForm.coLineNo"
@@ -94,7 +94,17 @@
:disabled="!ediSource"
></el-input>
</el-form-item>
- </el-col>
+ </el-col> -->
+ <el-col :span="6">
+ <el-form-item label="浜у搧鍚嶇О" prop="productName">
+ <el-input
+ v-model="dataForm.productName"
+ placeholder=""
+ disabled
+ >
+ </el-input>
+ </el-form-item>
+ </el-col>
</el-row>
<el-row>
<el-col :span="12">
@@ -121,9 +131,9 @@
</el-row>
<el-row>
<el-col :span="12">
- <el-form-item label="鏈熸湜浜よ揣鏃堕棿" prop="wantedDeliveryDate">
+ <el-form-item label="鏈熸湜浜よ揣鏃堕棿" prop="deliveryDate">
<el-date-picker
- v-model="dataForm.wantedDeliveryDate"
+ v-model="dataForm.deliveryDate"
style="width: 100%"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
@@ -132,7 +142,16 @@
</el-date-picker>
</el-form-item>
</el-col>
- <el-col :span="12">
+ <el-col :span="12">
+ <el-form-item label="宸ヨ壓鏂囦欢鍚嶇О" prop="docName">
+ <el-input
+ v-model="dataForm.docName"
+ placeholder=""
+ disabled
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ <!-- <el-col :span="12">
<el-form-item label="璁″垝浜よ揣鏃堕棿" prop="plannedDeliveryDate">
<el-date-picker
v-model="dataForm.plannedDeliveryDate"
@@ -143,13 +162,37 @@
>
</el-date-picker>
</el-form-item>
- </el-col>
+ </el-col> -->
</el-row>
- <el-card
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="璁㈠崟澶囨敞" prop="comment">
+ <el-input
+ v-model="dataForm.comment"
+ placeholder=""
+ :disabled="!ediSource"
+ >
+ </el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="浜у搧澶囨敞" prop="remark">
+ <el-input
+ v-model="dataForm.remark"
+ placeholder=""
+ :disabled="!ediSource"
+ >
+ </el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <!-- <el-card
header="璁㈠崟鍙傛暟"
shadow="never"
class="productorder-order-param"
- >
+ > -->
<el-row>
<el-form-item
style="float:left;width: 50%"
@@ -166,8 +209,33 @@
</el-row>
</el-card>
</el-tab-pane>
- <el-tab-pane label="闄勪欢" type="card">
+ <el-tab-pane label="闄勪欢" type="card" name="闄勪欢">
+ <div style="display: flex;justify-content:flex-end;">
+ <div></div>
+ </div>
+ <div
+ v-loading="progrecessFileLoading"
+ element-loading-text="璇风◢绛夛紝鏂囦欢涓婁紶涓�"
+ >
<el-upload
+ drag
+ ref="upload"
+ action="/mes/plan/customerOrder/upload"
+ :auto-upload="true"
+ :headers="headers"
+ :before-upload="submitUpload"
+ :on-success="uploadSuccess"
+ :data="paramData"
+ :with-credentials="true"
+ :show-file-list="false"
+ >
+ <i class="el-icon-upload"></i>
+ <div class="el-upload__text">
+ 灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em>
+ </div>
+ </el-upload>
+ </div>
+ <!-- <el-upload
disabled
action=""
ref="upload"
@@ -176,10 +244,93 @@
:on-preview="handlePreview"
:with-credentials="true"
>
- </el-upload>
+ </el-upload> -->
+ <el-table :data="processConfigFileTableData" height="400px">
+ <el-table-column
+ prop="orderNumber"
+ align="center"
+ label="璁㈠崟鍙�"
+ show-overflow-tooltip
+ >
+ </el-table-column>
+ <!-- <el-table-column prop="lineNumber" align="center" label="琛屽彿"> -->
+ <!-- </el-table-column> -->
+ <el-table-column
+ prop="originalFileName"
+ align="center"
+ label="鍘熸枃浠跺悕"
+ width="200"
+ >
+ </el-table-column>
+ <el-table-column prop="fileName" align="center" label="鏂囦欢鍚庣紑">
+ </el-table-column>
+ <el-table-column prop="createUser" align="center" label="涓婁紶浜�">
+ </el-table-column>
+ <el-table-column
+ prop="createTime"
+ align="center"
+ label="涓婁紶鏃堕棿"
+ show-overflow-tooltip
+ >
+ </el-table-column>
+ <el-table-column prop="updateUser" align="center" label="鏇存柊浜�">
+ </el-table-column>
+ <el-table-column
+ prop="updateTime"
+ align="center"
+ label="鏇存柊鏃堕棿"
+ show-overflow-tooltip
+ >
+ </el-table-column>
+ <!-- <el-table-column align="center" label="鏄惁鍚屾宸ヨ壓閰嶇疆鍗�">-->
+ <!-- <template slot-scope="scope">-->
+ <!-- <el-switch-->
+ <!-- :value="scope.row.effectiveRange"-->
+ <!-- active-value="1"-->
+ <!-- inactive-value="0"-->
+ <!-- @input="handleInput(scope.row)"-->
+ <!-- :disabled="scope.row.lineNumber !== dataForm.otcLineNo"-->
+ <!-- />-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+ <el-table-column fixed="right" align="center" label="鎿嶄綔">
+ <template slot-scope="scope">
+ <!-- <el-button
+ @click="synchronizeFile(scope.row)"
+ type="text"
+ size="small"
+ :disabled="scope.row.lineNumber !== dataForm.customerNo"
+ >鍚屾</el-button
+ > -->
+ <el-button
+ @click="delProcessConfigFile(scope.row)"
+ type="text"
+ size="small"
+ :disabled="scope.row.lineNumber !== dataForm.customerNo"
+ >鍒犻櫎</el-button
+ >
+ <el-button
+ @click="downloadProcessConfigFile(scope.row)"
+ type="text"
+ size="small"
+ >涓嬭浇</el-button
+ >
+ </template>
+ </el-table-column>
+ </el-table>
</el-tab-pane>
</el-tabs>
</el-form>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="visible = false">鍙栨秷</el-button>
+ <el-button
+ type="primary"
+ :disabled="buttonDisable"
+ v-thinclick="`dataFormSubmit`"
+ v-if="editable"
+ >纭畾</el-button
+ >
+ </span>
</el-tab-pane>
</el-tabs>
</template>
@@ -196,11 +347,14 @@
addCustomerOrder,
download,
getCustomerOrder,
+ deleteProcessConfigFile,
+ downloadProcessConfigFile,
putCustomerOrder
} from '@/api/plan/customerorder'
import { remote } from '@/api/admin/dict'
import { validateSixDecimal } from '@/util/validate'
-import { getCustomer } from '../../../api/plan/manufacturingorder'
+import { getStore } from '@/util/store'
+import { getCustomer,getProcessConfigFile } from '../../../api/plan/manufacturingorder'
export default {
props: {
@@ -277,37 +431,71 @@
{ validator: validateSixDecimal, trigger: 'blur' }
]
},
+ paramData: {
+ // range: '1',
+ orderNumber: '',
+ lineNumber: ''
+ },
+ headers: {
+ Authorization: 'Bearer ' + getStore({ name: 'access_token' })
+ },
units: [],
coStates: [
+ // {
+ // value: '01plan',
+ // label: '寰呰鍒�'
+ // },
+ // {
+ // value: '03planed',
+ // label: '宸茶鍒�'
+ // },
+ // {
+ // value: '02planing',
+ // label: '璁″垝涓�'
+ // },
+ // {
+ // value: '04complete',
+ // label: '宸插畬鎴�'
+ // }
+ {
+ value: '01partUnCheck',
+ label: '闆朵欢寰呴��'
+ },
{
- value: '01plan',
+ value: '02technologyUnCheck',
+ label: '宸ヨ壓鏂囦欢寰呴��'
+ },
+ {
+ value: '03plan',
label: '寰呰鍒�'
},
{
- value: '03planed',
- label: '宸茶鍒�'
+ value: '04planed',
+ label: '宸蹭笅鍙�'
},
{
- value: '02planing',
- label: '璁″垝涓�'
+ value: '05cancel',
+ label: '宸蹭綔搴�'
},
{
- value: '04complete',
- label: '宸插畬鎴�'
+ value: '06unedit',
+ label: '璁㈠崟缂栬緫'
}
- ]
+ ],
+ processConfigFileTableData: [],
+ activeFileName: ""
}
},
computed: {
- editable: function() {
- if (!this.dataForm.id) {
- return true
- }
- if (this.dataForm.id && this.dataForm.coState !== '04complete') {
- return true
- }
- return false
- },
+ // editable: function() {
+ // if (!this.dataForm.id) {
+ // return true
+ // }
+ // if (this.dataForm.id && this.dataForm.coState !== '04complete') {
+ // return true
+ // }
+ // return false
+ // },
ediSource: function() {
if (!this.dataForm.id) {
return true
@@ -360,8 +548,8 @@
}
this.fileList = response.data.data.customerOrderAttachmentList
this.orderParamList = response.data.data.orderParamList
-
-
+ //闄勪欢
+ this.processConfigFileTableData = response.data.data.configFiles
this.title =
this.dataForm.customerName + this.dataForm.customerOrderNo
})
@@ -371,6 +559,48 @@
this.$refs.tabs.currentName = '0'
}
})
+ },
+ submitUpload() {
+ this.paramData.orderNumber = this.dataForm.contractNo
+ this.paramData.lineNumber = this.dataForm.customerNo
+ this.progrecessFileLoading = true
+ },
+ uploadSuccess() {
+ this.progrecessFileLoading = false
+ this.downs()
+ },
+ //闄勪欢鐨勬煡璇�
+ downs(label, e){
+ if(this.activeFileName=='闄勪欢'){
+ console.log('1');
+ getProcessConfigFile({
+ orderNumber: this.dataForm.contractNo,
+ lineNumber: this.dataForm.customerNo
+ }).then((res)=>{
+ this.processConfigFileTableData = res.data.data
+ })
+ }
+ },
+ downloadProcessConfigFile(row) {
+ downloadProcessConfigFile(
+ row.fileName,
+ row.bucketName,
+ row.originalFileName
+ )
+ },
+ delProcessConfigFile(row) {
+ this.$confirm('鏄惁鍒犻櫎宸ヨ壓閰嶇疆鏂囦欢', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning',
+ closeOnClickModal: false
+ })
+ .then(function() {
+ return deleteProcessConfigFile(row.id)
+ })
+ .then((data) => {
+ this.downs()
+ })
},
// 闄勪欢鐨勭偣鍑�
handlePreview(file) {
@@ -425,6 +655,9 @@
},
handleTabClick(tab, event) {
this.init(parseInt(tab.name))
+ if(tab.name){
+
+ }
},
// 闆朵欢閫夋嫨
openPartDialog() {
diff --git a/src/views/plan/manufacturingorder/index.vue b/src/views/plan/manufacturingorder/index.vue
index 2f4af42..568bf63 100644
--- a/src/views/plan/manufacturingorder/index.vue
+++ b/src/views/plan/manufacturingorder/index.vue
@@ -428,8 +428,8 @@
},
{
minWidth: '120',
- prop: 'orderRemark',
- label: '閿�鍞鍗曞娉�',
+ prop: 'remark',
+ label: '澶囨敞',
sort: true,
isTrue: true,
isSearch: true,
diff --git a/src/views/plan/manufacturingorder/productorder-form.vue b/src/views/plan/manufacturingorder/productorder-form.vue
index 039af71..ba11120 100644
--- a/src/views/plan/manufacturingorder/productorder-form.vue
+++ b/src/views/plan/manufacturingorder/productorder-form.vue
@@ -638,17 +638,11 @@
</el-row>
<el-row>
<el-table
- default-expand-all
- :data="components"
+ :data="components[0]"
@selection-change="structSelectionChange"
- row-key="id"
border
- :tree-props="{
- children: 'children'
- }"
style="width: 100%"
height="400px"
- :default-sort="{ prop: 'index' }"
>
<el-table-column type="selection" width="40" fixed="left" />
<el-table-column
@@ -1071,6 +1065,7 @@
data() {
return {
+ componentsTable:[],
typeOptions: [],
paramTemplateSelArr: [],
paramTemplateSelCol: 'operationTemplateNo',
@@ -1232,6 +1227,7 @@
this.getBomTypeDbOptions()
this.getManufactureAttrs('manufacture_attr_type')
this.getSysParam(sysParam.IS_REPORT_OPERATION)
+ // console.log(this.components);
},
watch: {
'dataForm.partId'(newValue, oldValue) {
@@ -1245,7 +1241,11 @@
}
}
},
-
+ components(newVal,oldVal){
+ console.log("鏂�",newVal);
+ console.log("鑰�",oldVal);
+ console.log(this.components);
+ },
currentRouting(newValue, oldValue) {
if (newValue && newValue.id) {
if (this.dataForm.id != null && this.dataForm.id !== 0) {
@@ -1295,7 +1295,8 @@
if (newValue && newValue.id) {
// 鏌ヨ浜у搧缁撴瀯瀵瑰簲鐨勭粍浠�
getBom(newValue.id).then((response) => {
- this.components = [response.data.data.tree]
+ console.log("鏌�",this.components);
+ // this.components = [response.data.data.tree]
})
}
},
@@ -1397,6 +1398,7 @@
},
// 鏌ヨ褰撳墠杞﹂棿璁㈠崟淇℃伅
getOrderInfo() {
+ let that=this
getManufacturingOrder(this.dataForm.id).then((response) => {
this.dataForm = response.data.data
// 鎶婂伐鑹烘寕涓婂幓
@@ -1416,7 +1418,7 @@
}
// 鎶婁骇鍝佺粨鏋勭粍浠舵寕涓婂幓
if (this.dataForm.bomRoot) {
- this.components = [this.dataForm.bomRoot]
+ that.components = [this.dataForm.bomRoot]
}
})
},
diff --git a/src/views/product/workbench/feed-pane.vue b/src/views/product/workbench/feed-pane.vue
index 3dd5b5f..7b41bbb 100644
--- a/src/views/product/workbench/feed-pane.vue
+++ b/src/views/product/workbench/feed-pane.vue
@@ -144,14 +144,14 @@
><span style="font-size:14px;font-weight:bold">绾胯竟浠撳悎鏍肩墿鏂�</span>
</div>
<div>
- <el-button
+ <!-- <el-button
v-if="permissions.product_feed_scan"
class="feeding-btn"
type="primary"
icon="feed-btn-feeding"
@click="scanAddFeed()"
>鎵爜鎶曟枡</el-button
- >
+ > -->
<el-button
class="feeding-btn"
type="primary"
@@ -1130,7 +1130,7 @@
><span style="font-size:14px;font-weight:bold">宸叉姇鍏ユ湭娑堣�楃墿鏂�</span>
</div>
<div>
- <el-button
+ <!-- <el-button
class="return-btn"
type="primary"
@click="submitIns()"
@@ -1141,7 +1141,7 @@
type="primary"
@click="inputHandle()"
>灏炬枡澶勭悊</el-button
- >
+ > -->
<el-button
class="return-btn"
type="primary"
diff --git a/src/views/product/workbench/index.vue b/src/views/product/workbench/index.vue
index 026fcfe..fd3b46e 100644
--- a/src/views/product/workbench/index.vue
+++ b/src/views/product/workbench/index.vue
@@ -256,7 +256,7 @@
>
</div>
</div>
- <div class="start-end-div">
+ <div class="start-end-div" >
<div>
<span
style="margin-left:8px;font-size:12px;line-height:32px;"
@@ -528,35 +528,36 @@
</el-form-item>
</el-form>
</div>
- <div class="task-div-content">
- <div v-if="!isShowNormalTracking" class="task-list-div">
- <operationTaskPane
- ref="operateTaskDiv"
- :workstationId="dutyForm.workstationId"
- :productSn="operateTaskForm.SN"
- :orderNumber="operateTaskForm.orderNumber"
- :spec="operateTaskForm.spec"
- :outBatchNo="operateTaskForm.outBatchNo"
- :mpsNo="operateTaskForm.mpsNo"
- @changeCurrOperateTask="changeCurrOperateTask"
- @refreshReport="refreshWorkReportPageData"
- />
- </div>
- <div v-if="isShowNormalTracking" class="task-list-div">
- <operationTaskTable
- ref="operateTaskTableDiv"
- :workstationId="dutyForm.workstationId"
- :productSn="operateTaskForm.SN"
- :orderNumber="operateTaskForm.orderNumber"
- :spec="operateTaskForm.spec"
- :mpsNo="operateTaskForm.mpsNo"
- @changeCurrOperateTask="changeCurrOperateTask"
- />
- </div>
- </div>
+ <div class="task-div-content" >
+ <div v-if="!isShowNormalTracking" class="task-list-div" >
+ <operationTaskPane
+ ref="operateTaskDiv" :style="{ backgroundColor: taskStatusColor() }"
+ :workstationId="dutyForm.workstationId"
+ :productSn="operateTaskForm.SN"
+ :orderNumber="operateTaskForm.orderNumber"
+ :spec="operateTaskForm.spec"
+ :outBatchNo="operateTaskForm.outBatchNo"
+ :mpsNo="operateTaskForm.mpsNo"
+ @changeCurrOperateTask="changeCurrOperateTask"
+ @refreshReport="refreshWorkReportPageData"
+ />
+ </div>
+ <div v-if="isShowNormalTracking" class="task-list-div" >
+ <operationTaskTable
+ ref="operateTaskTableDiv" :style="{ backgroundColor: taskStatusColor() }"
+ :workstationId="dutyForm.workstationId"
+ :productSn="operateTaskForm.SN"
+ :orderNumber="operateTaskForm.orderNumber"
+ :spec="operateTaskForm.spec"
+ :mpsNo="operateTaskForm.mpsNo"
+ @changeCurrOperateTask="changeCurrOperateTask"
+ />
+ </div>
+
+ </div>
</div>
</div>
- <div :style="{ width: mainMiddleWidth }" v-show="mainMiddleShow">
+ <div :style="{ width: mainMiddleWidth } " v-show="mainMiddleShow">
<div style="height:86px;width:14px;position: absolute;top:50%">
<el-tooltip effect="dark" content="鏀剁缉" placement="left">
<img
@@ -1437,6 +1438,7 @@
box-sizing: border-box;
overflow-y: auto;
margin-bottom: 10px;
+
}
.task-list-div {
@@ -1560,6 +1562,10 @@
},
data() {
return {
+ dutyForm: {},
+ operateTaskForm: {},
+ isShowNormalTracking: false,
+ // taskStatusColor: '',
showBan: false,
dutyCanEdit: false,
saveButton: false,
@@ -1666,96 +1672,9 @@
currItem: 'task'
}
},
- computed: {
- ...mapGetters(['userInfo', 'tagWel', 'permissions'])
- },
- created() {
- document.title = '宸ヤ綔鍙扳�斺�擬ES'
- if (!this.dutyForm.workstationId) {
- const k = localStorage.getItem(storage_key)
- if (k) {
- this.dutyForm.workstationId = parseInt(k)
- }
- }
- this.initOptions()
- this.getSysParam(sysParam.SHOW_STEP_BUSINESS)
- this.getTrackingParam(sysParam.SHOW_TRACKING_TYPE)
- this.timer = setInterval(this.clockTimer, 1000)
- },
- watch: {
- 'dutyForm.workstationId'(val) {
- if (val) {
- localStorage.setItem(storage_key, val)
- }
- // 宸ヤ綔绔欐敼鍙樻椂锛屾暣涓〉闈㈢殑鍔ㄦ�佹暟鎹渶瀹炴椂鍔犺浇銆侀〉闈㈢紦瀛樻暟鎹渶 鍒濆鍖�
- this.initPageVariable()
- this.loadInfoByWorkstation()
- },
- 'dutyForm.startTime'(val, oldval) {
- if (val) {
- this.checkTime()
- } else {
- this.warningShow = false
- }
- },
- 'dutyForm.endTime'(val, oldval) {
- if (val) {
- this.checkTime()
- } else {
- this.warningShow = false
- }
- },
- 'operateTaskForm.orderNumber'(val) {
- /* this.$nextTick(() => {
- this.queryInfoForOrderNumber()
- }) */
- },
- 'operateTaskForm.spec'(val) {
- if (val == '' || val == null) {
- this.SNs = []
- this.operateTaskForm.SN = ''
- } else {
- const that = this
- that.SNs = []
- getProductSnByCustomerNoAndPartName({
- customerOrderNo: this.operateTaskForm.orderNumber,
- partName: val
- }).then((res) => {
- const result = res.data.data
- result.forEach(function(item) {
- const obj = {
- key: item,
- value: item
- }
- that.SNs.push(obj)
- })
- })
- }
- this.$nextTick(() => {
- if (this.partNames.length !== 0) {
- this.refreshOperateTasks()
- }
- })
- },
- 'operateTaskForm.SN'(val) {
- this.$nextTick(() => {
- if (this.SNs.length !== 0) {
- this.refreshOperateTasks()
- }
- })
- },
- 'operateTaskForm.outBatchNo'(val) {
- /* this.$nextTick(() => {
- this.refreshOperateTasks()
- }) */
- },
- 'operateTaskForm.mpsNo'(val) {
- /* this.$nextTick(() => {
- this.refreshOperateTasks()
- }) */
- }
- },
methods: {
+ changeCurrOperateTask() {},
+ refreshWorkReportPageData() {},
refreshOperateTasksByConditions() {
this.$nextTick(() => {
this.refreshOperateTasks()
@@ -2597,6 +2516,113 @@
beforeDestroy() {
clearInterval(this.timer)
}
+ },
+ computed: {
+ ...mapGetters(['userInfo', 'tagWel', 'permissions']),
+
+ taskStatusColor() {
+ return function() {
+ const now = new Date();
+ const threeDaysAgo = new Date(now - 3 * 24 * 60 * 60 * 1000);
+ const oneDayAgo = new Date(now - 24 * 60 * 60 * 1000);
+ const today = new Date(now);
+
+ if (threeDaysAgo <= today && today <= oneDayAgo) {
+ return 'yellow';
+ } else if (today <= threeDaysAgo) {
+ return 'blue';
+ } else {
+ return 'red';
+ }
+ };
}
+ },
+ created() {
+ document.title = '宸ヤ綔鍙扳�斺�擬ES'
+ if (!this.dutyForm.workstationId) {
+ const k = localStorage.getItem(storage_key)
+ if (k) {
+ this.dutyForm.workstationId = parseInt(k)
+ }
+ }
+ this.initOptions()
+ this.getSysParam(sysParam.SHOW_STEP_BUSINESS)
+ this.getTrackingParam(sysParam.SHOW_TRACKING_TYPE)
+ this.timer = setInterval(this.clockTimer, 1000)
+ },
+ watch: {
+ 'dutyForm.workstationId'(val) {
+ if (val) {
+ localStorage.setItem(storage_key, val)
+ }
+ // 宸ヤ綔绔欐敼鍙樻椂锛屾暣涓〉闈㈢殑鍔ㄦ�佹暟鎹渶瀹炴椂鍔犺浇銆侀〉闈㈢紦瀛樻暟鎹渶 鍒濆鍖�
+ this.initPageVariable()
+ this.loadInfoByWorkstation()
+ },
+ 'dutyForm.startTime'(val, oldval) {
+ if (val) {
+ this.checkTime()
+ } else {
+ this.warningShow = false
+ }
+ },
+ 'dutyForm.endTime'(val, oldval) {
+ if (val) {
+ this.checkTime()
+ } else {
+ this.warningShow = false
+ }
+ },
+ 'operateTaskForm.orderNumber'(val) {
+ /* this.$nextTick(() => {
+ this.queryInfoForOrderNumber()
+ }) */
+ },
+ 'operateTaskForm.spec'(val) {
+ if (val == '' || val == null) {
+ this.SNs = []
+ this.operateTaskForm.SN = ''
+ } else {
+ const that = this
+ that.SNs = []
+ getProductSnByCustomerNoAndPartName({
+ customerOrderNo: this.operateTaskForm.orderNumber,
+ partName: val
+ }).then((res) => {
+ const result = res.data.data
+ result.forEach(function(item) {
+ const obj = {
+ key: item,
+ value: item
+ }
+ that.SNs.push(obj)
+ })
+ })
+ }
+ this.$nextTick(() => {
+ if (this.partNames.length !== 0) {
+ this.refreshOperateTasks()
+ }
+ })
+ },
+ 'operateTaskForm.SN'(val) {
+ this.$nextTick(() => {
+ if (this.SNs.length !== 0) {
+ this.refreshOperateTasks()
+ }
+ })
+ },
+ 'operateTaskForm.outBatchNo'(val) {
+ /* this.$nextTick(() => {
+ this.refreshOperateTasks()
+ }) */
+ },
+ 'operateTaskForm.mpsNo'(val) {
+ /* this.$nextTick(() => {
+ this.refreshOperateTasks()
+ }) */
+ }
+ },
+
}
</script>
diff --git a/src/views/product/workbench/operation-task-pane.vue b/src/views/product/workbench/operation-task-pane.vue
index b62149e..50c7b63 100644
--- a/src/views/product/workbench/operation-task-pane.vue
+++ b/src/views/product/workbench/operation-task-pane.vue
@@ -1,6 +1,6 @@
<template>
<div>
- <el-alert
+ <el-alert
v-if="!operationTasks || operationTasks.length == 0"
title="杩樻病鏈夊伐鍗曚笅鍙戝埌姝ゆ満鍙帮紒"
type="warning"
@@ -8,76 +8,76 @@
>
</el-alert>
<el-card
- v-for="(item, index) in operationTasks"
- @click.native="setCheckFlag(item)"
- shadow="hover"
- :key="index"
- :class="['task-item', item.checkFlag ? 'card-checked' : 'card-unchecked']"
+ v-for="(item, index) in operationTasks"
+ @click.native="setCheckFlag(item)"
+ shadow="hover"
+ :key="index"
+ :class="['task-item', item.checkFlag ? 'card-checked' : 'card-unchecked']"
+>
+ <!-- <img class="selectedImg" /> -->
+ <div class="header" >
+ <div>宸ュ崟鍙凤細{{ item.taskNo }}</div>
+ <!-- <div>璁″垝鍙凤細{{ item.mpsNo }}</div> -->
+ <div
+ :class="[
+ 'status-change-div',
+ item.checkFlag ? 'card-checked-status' : 'card-status'
+ ]"
>
- <img class="selectedImg" src="/img/workbench/icon_selected.png" />
- <div class="header">
- <div>宸ュ崟鍙凤細{{ item.taskNo }}</div>
- <!-- <div>璁″垝鍙凤細{{ item.mpsNo }}</div> -->
- <div
- :class="[
- 'status-change-div',
- item.checkFlag ? 'card-checked-status' : 'card-status'
- ]"
- >
- <el-select
- v-if="permissions.product_operationTask_state"
- v-model="item.statusAction"
- placeholder="鍔熻兘鑿滃崟"
- @change="
- changeTaskState(item.statusAction, item.status, item.id, item)
- "
- >
- <el-option
- v-for="ele in statusActions"
- :key="ele.value"
- :label="ele.label"
- :value="ele.value"
- :disabled="ele.disabled"
- >
- </el-option>
- </el-select>
- </div>
- </div>
- <div class="body">
- <div class="row">
- <div class="l">闆朵欢鍚嶇О锛�</div>
- <div class="r">{{ item.partName }}</div>
- </div>
- <div class="row">
- <div class="l">闆朵欢鍙凤細</div>
- <div class="r">{{ item.partNo }}</div>
- </div>
- <!-- <div class="row">
- <div class="l">鎴愬搧锛�</div>
- <div class="r">{{ item.productName }}</div>
- </div> -->
- <div class="row">
- <div class="l">璁″垝瀹屾垚鏃堕棿锛�</div>
- <div class="r">{{ item.planFinishDay }}</div>
- </div>
- </div>
-
- <el-progress
- class="task-progress"
- :text-inside="true"
- :stroke-width="20"
- :percentage="
- Number((item.completedQuantity / item.plannedQuantity).toFixed(2)) *
- 100 >
- 100
- ? 100
- : Number(
- (item.completedQuantity / item.plannedQuantity).toFixed(2)
- ) * 100
+ <el-select
+ v-if="permissions.product_operationTask_state"
+ v-model="item.statusAction"
+ placeholder="鍔熻兘鑿滃崟"
+ @change="
+ changeTaskState(item.statusAction, item.status, item.id, item)
"
- :format="formatPercentage(item.completedQuantity, item.plannedQuantity)"
- ></el-progress>
- </el-card>
+ >
+ <el-option
+ v-for="ele in statusActions"
+ :key="ele.value"
+ :label="ele.label"
+ :value="ele.value"
+ :disabled="ele.disabled"
+ >
+ </el-option>
+ </el-select>
+ </div>
+ </div>
+ <div class="body">
+ <div class="row">
+ <div class="l">闆朵欢鍚嶇О锛�</div>
+ <div class="r">{{ item.partName }}</div>
+ </div>
+ <div class="row">
+ <div class="l">闆朵欢鍙凤細</div>
+ <div class="r">{{ item.partNo }}</div>
+ </div>
+ <!-- <div class="row">
+ <div class="l">鎴愬搧锛�</div>
+ <div class="r">{{ item.productName }}</div>
+ </div> -->
+ <div class="row">
+ <div class="l">璁″垝瀹屾垚鏃堕棿锛�</div>
+ <div class="r">{{ item.planFinishDay }}</div>
+ </div>
+ </div>
+
+ <el-progress
+ class="task-progress"
+ :text-inside="true"
+ :stroke-width="20"
+ :percentage="
+ Number((item.completedQuantity / item.plannedQuantity).toFixed(2)) *
+ 100 >
+ 100
+ ? 100
+ : Number(
+ (item.completedQuantity / item.plannedQuantity).toFixed(2)
+ ) * 100
+ "
+ :format="formatPercentage(item.completedQuantity, item.plannedQuantity)"
+ ></el-progress>
+</el-card>
</div>
</template>
<style lang="scss" scoped>
@@ -96,10 +96,13 @@
border-radius: 12px;
cursor: pointer;
position: relative;
+background:none;
box-shadow: 1px 2px 24px 1px rgba(4, 0, 0, 0.14);
+
& + .task-item {
margin-top: 10px;
}
+
&.card-checked {
// color: white;
background-image: -webkit-linear-gradient(
@@ -344,6 +347,28 @@
}
},
methods: {
+
+ // setCheckFlag(item) {
+ // this.$nextTick(() => {
+ // this.changeBackgroundColor(item.planFinishDay);
+ // });
+ // },
+ // changeBackgroundColor(dateString) {
+ // const date = new Date(dateString);
+ // const threeDaysAgo = new Date();
+ // threeDaysAgo.setDate(threeDaysAgo.getDate() - 3);
+ // const oneDayAgo = new Date();
+ // oneDayAgo.setDate(oneDayAgo.getDate() - 1);
+
+ // if (date <= threeDaysAgo) {
+ // document.body.style.backgroundColor = "blue";
+ // } else if (date <= oneDayAgo) {
+ // document.body.style.backgroundColor = "yellow";
+ // } else {
+ // document.body.style.backgroundColor = "red";
+ // }
+ // },
+
// 鐐瑰嚮宸ュ崟锛岄�変腑宸ュ崟
setCheckFlag(item) {
if (item.checkFlag) {
diff --git a/src/views/product/workbench/taskinfo-pane.vue b/src/views/product/workbench/taskinfo-pane.vue
index d5b1dd8..5752299 100644
--- a/src/views/product/workbench/taskinfo-pane.vue
+++ b/src/views/product/workbench/taskinfo-pane.vue
@@ -891,6 +891,7 @@
getGenerateSN,
getShiftProductOutByOpIdAndWsId
} from '@/api/product/personboard'
+
import {
getTemplate,
getDocumentJgt,
diff --git a/src/views/product/workbench/workstationoperate-form.vue b/src/views/product/workbench/workstationoperate-form.vue
index 2ded8dd..3c6345d 100644
--- a/src/views/product/workbench/workstationoperate-form.vue
+++ b/src/views/product/workbench/workstationoperate-form.vue
@@ -1,5 +1,6 @@
<template>
<div style="width: 100%;height: 100%"></div>
+
</template>
<style lang="scss" scoped>
.ws-header {
diff --git a/src/views/technology/completeproductstructure/completeproductstructure-form.vue b/src/views/technology/completeproductstructure/completeproductstructure-form.vue
index c821f69..74b5c07 100644
--- a/src/views/technology/completeproductstructure/completeproductstructure-form.vue
+++ b/src/views/technology/completeproductstructure/completeproductstructure-form.vue
@@ -134,6 +134,7 @@
<el-table-column label="闆朵欢鍚嶇О" prop="partName"></el-table-column>
<el-table-column label="鍗曚綅" prop="unit"></el-table-column>
<el-table-column label="鏁伴噺" prop="qpa"></el-table-column>
+ <el-table-column label="鐩樻暟" prop="discNum"></el-table-column>
</el-table>
<!-- <el-table
class="tree-select-table"
diff --git a/src/views/technology/structure/single-structure-form.vue b/src/views/technology/structure/single-structure-form.vue
index 98f13c6..87eca90 100644
--- a/src/views/technology/structure/single-structure-form.vue
+++ b/src/views/technology/structure/single-structure-form.vue
@@ -209,8 +209,8 @@
}}</span>
</template>
</el-table-column>
- <el-table-column label="鍥惧彿" prop="drawingNumber" align="center">
- </el-table-column>
+ <!-- <el-table-column label="鍥惧彿" prop="drawingNumber" align="center">
+ </el-table-column> -->
<el-table-column align="center" label="鎿嶄綔" width="85px">
<template slot-scope="scope">
<el-button
--
Gitblit v1.9.3