From c8d7453ef88f52f629272bdd89cab8ff6ba6eb6e Mon Sep 17 00:00:00 2001
From: Fixiaobai <fixiaobai@163.com>
Date: 星期四, 14 十二月 2023 15:08:03 +0800
Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before
---
src/views/basic/customizeparamtemplatetype/templatetype-form.vue | 6
src/views/plan/productionschedul/index.vue | 2
src/views/plan/customerorder/index.vue | 42 ----
src/views/technology/structure/single-structure-form.vue | 166 +++++++++++---------
src/const/crud/customerOrder/customerOrderForm.js | 6
src/views/basic/warehouse/warehouse-form.vue | 6
src/views/plan/customerorder/sample-customerorder-form.vue | 223 +++------------------------
src/views/basic/location/location-form.vue | 6
src/views/common/ztt-table.vue | 3
9 files changed, 141 insertions(+), 319 deletions(-)
diff --git a/src/const/crud/customerOrder/customerOrderForm.js b/src/const/crud/customerOrder/customerOrderForm.js
index f23b3cf..979cc63 100644
--- a/src/const/crud/customerOrder/customerOrderForm.js
+++ b/src/const/crud/customerOrder/customerOrderForm.js
@@ -97,9 +97,11 @@
label: '鏀惰揣鍦板潃',
prop: 'shippingAddress',
cell: true,
- type: 'input',
+ type: 'textarea',
minWidth: 200,
- span: 24
+ span: 24,
+ minRows: 1,
+ maxRows: 3
}, {
label: '浜у搧澶囨敞',
prop: 'remark',
diff --git a/src/views/basic/customizeparamtemplatetype/templatetype-form.vue b/src/views/basic/customizeparamtemplatetype/templatetype-form.vue
index 8acde63..927afd6 100644
--- a/src/views/basic/customizeparamtemplatetype/templatetype-form.vue
+++ b/src/views/basic/customizeparamtemplatetype/templatetype-form.vue
@@ -114,6 +114,9 @@
this.visible = false
this.isSubmit = false
this.$emit('refreshDataList')
+ }).catch(error=>{
+ console.error(error);
+ this.isSubmit = false
})
} else {
addObj(this.dataForm).then((data) => {
@@ -121,6 +124,9 @@
this.visible = false
this.isSubmit = false
this.$emit('refreshDataList')
+ }).catch(error=>{
+ console.error(error);
+ this.isSubmit = false
})
}
} else {
diff --git a/src/views/basic/location/location-form.vue b/src/views/basic/location/location-form.vue
index 8871e84..11c4657 100644
--- a/src/views/basic/location/location-form.vue
+++ b/src/views/basic/location/location-form.vue
@@ -396,6 +396,9 @@
this.visible = false
this.isSubmit = false
this.$emit('refreshDataList')
+ }).catch(error=>{
+ console.error(error);
+ this.isSubmit = false
})
} else {
addObj(this.dataForm).then((data) => {
@@ -403,6 +406,9 @@
this.visible = false
this.isSubmit = false
this.$emit('refreshDataList')
+ }).catch(error=>{
+ console.error(error);
+ this.isSubmit = false
})
}
} else {
diff --git a/src/views/basic/warehouse/warehouse-form.vue b/src/views/basic/warehouse/warehouse-form.vue
index ff506ac..6191877 100644
--- a/src/views/basic/warehouse/warehouse-form.vue
+++ b/src/views/basic/warehouse/warehouse-form.vue
@@ -322,6 +322,9 @@
this.visible = false
this.isSubmit = false
this.$emit('refreshDataList')
+ }).catch(error=>{
+ console.error(error);
+ this.isSubmit = false
})
} else {
addObj(this.dataForm).then((data) => {
@@ -329,6 +332,9 @@
this.visible = false
this.isSubmit = false
this.$emit('refreshDataList')
+ }).catch(error=>{
+ console.error(error);
+ this.isSubmit = false
})
}
} else {
diff --git a/src/views/common/ztt-table.vue b/src/views/common/ztt-table.vue
index 64d8045..fb445e3 100644
--- a/src/views/common/ztt-table.vue
+++ b/src/views/common/ztt-table.vue
@@ -245,6 +245,7 @@
:show-overflow-tooltip="!item.noShowTip"
:width="inMemoryColWidth[item.prop] || item.width"
:prop="item.prop"
+ align="center"
>
<template slot="header" slot-scope="scope">
<template v-if="item.isSearch">
@@ -324,7 +325,7 @@
<template v-if="!item.render">
<template v-if="item.formatter">
<span v-if="item.isTag" style="text-align: center;">
- <el-tag style="width:50px;margin: 3px;" :type="scope.row[item.prop] == 0 ? 'success' : 'info'">
+ <el-tag style="width:60px;margin: 3px;" :type="scope.row[item.prop] == 0 ? 'success' : 'info'">
<span v-html="item.formatter(scope.row, item, scope.row[item.prop])"></span>
</el-tag>
</span>
diff --git a/src/views/plan/customerorder/index.vue b/src/views/plan/customerorder/index.vue
index 63575e6..061bfc5 100644
--- a/src/views/plan/customerorder/index.vue
+++ b/src/views/plan/customerorder/index.vue
@@ -12,22 +12,6 @@
ref="customerOrderTable"
>
<template #toolbar>
- <!-- <el-dropdown
- v-if="permissions.customerorder_state_change"
- @command="handleCommand"
- >
- <el-button>
- 鐘舵�佹敼鍙�<i class="el-icon-arrow-down el-icon--right"></i>
- </el-button>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item
- :command="item.command"
- v-for="item in stateTagArr"
- :disabled="item.disabled">
- {{ item.label }}
- </el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown> -->
<el-dropdown
v-if="permissions.customerorder_doc_relate"
@command="documentHandle"
@@ -65,32 +49,12 @@
>
</el-dropdown-menu>
</el-dropdown>
- <!-- <el-button
- v-if="permissions.customerorder_push_otc"
- style="margin-left:10px;"
- type="primary"
- @click="pushOtc"
- >鎺ㄩ�丒RP</el-button
- > -->
- <!-- <el-button
- style="margin-left:10px;"
- type="primary"
- @click="importOutPutBatch"
- >瀵煎叆浜у嚭鎵规</el-button
- > -->
<el-button
style="margin-left:10px;"
type="primary"
@click="()=>exportDialogVisible=true"
>瀵煎嚭鍙拌处</el-button
>
- <!-- <el-button
- v-if="permissions.plan_customerorder_return"
- style="margin-left:10px;"
- type="primary"
- @click="returnOrder"
- >璁㈠崟閫�鍥�</el-button
- > -->
</template>
</ttable>
<!-- 寮圭獥, 鏃ユ湡閫夋嫨 -->
@@ -474,7 +438,7 @@
searchInfoType: 'text'
},
{
- minWidth: '120',
+ minWidth: '100',
prop: 'sourceId',
label: '娣诲姞鏉ユ簮',
isTag: true,
@@ -769,10 +733,10 @@
],
sourceIdList: [{
label: '鍚屾',
- value: '0'
+ value: "0"
},{
label: '鎵嬪姩',
- value: '1'
+ value: "1"
}],
stockVisible: false,
partName: null,
diff --git a/src/views/plan/customerorder/sample-customerorder-form.vue b/src/views/plan/customerorder/sample-customerorder-form.vue
index 94aaeb1..8b895f7 100644
--- a/src/views/plan/customerorder/sample-customerorder-form.vue
+++ b/src/views/plan/customerorder/sample-customerorder-form.vue
@@ -51,14 +51,6 @@
<el-input v-model="dataForm.entityName" placeholder=""></el-input>
</el-form-item>
</el-col>
- <!-- <el-col :span="6">
- <el-form-item label="浜嬩笟閮�" prop="salesDepartment">
- <el-input
- v-model="dataForm.salesDepartment"
- placeholder=""
- ></el-input>
- </el-form-item>
- </el-col> -->
<el-col :span="6">
<el-form-item label="鐪佷唤" prop="province">
<el-input v-model="dataForm.province" placeholder=""></el-input>
@@ -156,6 +148,7 @@
</el-divider>
<div>
<avue-crud ref="crud"
+ class="l-mes"
show-hide="false"
:option="option"
:data="tableData">
@@ -175,196 +168,6 @@
</template>
</avue-crud>
</div>
- <!-- <div class="l-mes normal-form">
- <el-row :gutter="20">
- <el-col :span="2">
- <span>闆朵欢鍙�</span>
- </el-col>
- <el-col :span="6">
- <el-input
- v-model="dataForm.customerOrder.partNo"
- placeholder=""
- readonly
- >
- <el-button
- slot="append"
- icon="el-icon-search"
- @click="openPartDialog()"
- ></el-button>
- </el-input>
- </el-col>
- <el-col :span="2">
- <span>鍗曚綅</span>
- </el-col>
- <el-col :span="6">
- <el-select
- v-model="dataForm.customerOrder.unit"
- placeholder=""
- style="width: 100%"
- >
- <el-option
- v-for="item in units"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
- </el-col>
- <el-col :span="2">
- <span>鏁伴噺</span>
- </el-col>
- <el-col :span="6">
- <el-input
- v-model="dataForm.customerOrder.buyQtyDue"
- placeholder=""
- ></el-input>
- </el-col>
- </el-row>
- <el-row :gutter="20">
- <el-col :span="2">
- <span>鐢靛帇绛夌骇</span>
- </el-col>
- <el-col :span="6">
- <el-input
- v-model="dataForm.customerOrder.voltAgeClass"
- placeholder=""
- ></el-input>
- </el-col>
- <el-col :span="2">
- <span>浜у搧鍚嶇О</span>
- </el-col>
- <el-col :span="6">
- <el-input
- v-model="dataForm.customerOrder.productName"
- placeholder=""
- ></el-input>
- </el-col>
- <el-col :span="2">
- <span>鍒堕�犲睘鎬�</span>
- </el-col>
- <el-col :span="6">
- <el-select
- v-model="dataForm.customerOrder.manufactureAttr"
- placeholder=""
- style="width: 100%"
- disabled
- >
- <el-option
- v-for="item in manufactureAttrs"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
- </el-col>
- </el-row>
- <el-row :gutter="20">
- <el-col :span="2">
- <span>澶栨姢棰滆壊</span>
- </el-col>
- <el-col :span="6">
- <el-input
- v-model="dataForm.customerOrder.outerColor"
- placeholder=""
- ></el-input>
- </el-col>
- <el-col :span="2">
- <span>闆朵欢瑙勬牸</span>
- </el-col>
- <el-col :span="6">
- <el-input
- v-model="dataForm.customerOrder.customerPartSpec"
- placeholder=""
- ></el-input>
- </el-col>
- <el-col :span="2">
- <span>鍖呰瑕佹眰</span>
- </el-col>
- <el-col :span="6">
- <el-input
- v-model="dataForm.customerOrder.packageRequire"
- placeholder=""
- ></el-input>
- </el-col>
- </el-row>
- <el-row :gutter="20">
- <el-col :span="2">
- <span>璐ㄩ噺瑕佹眰</span>
- </el-col>
- <el-col :span="6">
- <el-input
- v-model="dataForm.customerOrder.qualityRequire"
- placeholder=""
- ></el-input>
- </el-col>
- <el-col :span="2">
- <span>鐢熶骇闇�姹傝鏄�</span>
- </el-col>
- <el-col :span="6">
- <el-input
- v-model="dataForm.customerOrder.otherProductRequire"
- placeholder=""
- ></el-input>
- </el-col>
- <el-col :span="2">
- <span>绯荤粺</span>
- </el-col>
- <el-col :span="6">
- <el-input
- v-model="dataForm.customerOrder.divisionSystem"
- placeholder=""
- ></el-input>
- </el-col>
- </el-row>
- <el-row :gutter="20">
- <el-col :span="2">
- <span>鏀惰揣鍦板潃</span>
- </el-col>
- <el-col :span="6">
- <el-input
- v-model="dataForm.customerOrder.shippingAddress"
- placeholder=""
- ></el-input>
- </el-col>
- <el-col :span="2">
- <span>涓氬姟鍛�</span>
- </el-col>
- <el-col :span="6">
- <el-select v-model="dataForm.customerOrder.salesmanName" style="width:100%">
- <el-option v-for="(item,index) in staffOptions" :key="index" :value="item.staff_no" :label="item.staffName"/>
- </el-select>
- </el-col>
- <el-col :span="2">
- <span>鐩橀暱瑕佹眰</span>
- </el-col>
- <el-col :span="6">
- <el-input
- v-model="dataForm.customerOrder.lengthRequirement"
- placeholder=""
- ></el-input>
- </el-col>
- </el-row>
- <el-row :gutter="20">
- <el-col :span="2">
- <span>澶囨敞</span>
- </el-col>
- <el-col :span="6">
- <el-input
- v-model="dataForm.customerOrder.remark"
- placeholder=""
- ></el-input>
- </el-col>
- <el-col :span="2">
- <span>浜у搧绫诲瀷</span>
- </el-col>
- <el-col :span="6">
- <el-input
- v-model="dataForm.customerOrder.productType"
- placeholder=""
- ></el-input>
- </el-col>
- </el-row>
- </div> -->
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">鍙栨秷</el-button>
@@ -401,6 +204,30 @@
color: #c0c4cc;
margin: -1px 0;
}
+.l-mes .el-input-group__append,
+.l-mes .el-input-group__prepend {
+ padding: 0;
+ border-top: none;
+ border-right: none;
+ border-left: none;
+ border-radius: 0;
+ background-color: transparent;
+}
+
+.l-mes .el-input-group__append .el-button,
+.l-mes .el-input-group__prepend .el-button {
+ padding: 0;
+ width: 25px;
+ border: none !important;
+ line-height: 28px;
+ color: #c0c4cc;
+ margin: -1px 0;
+}
+
+.l-mes .el-input-group__append .el-button i,
+.l-mes .el-input-group__prepend .el-button i {
+ vertical-align: middle;
+}
</style>
<script>
import { addObj } from '@/api/plan/customer'
diff --git a/src/views/plan/productionschedul/index.vue b/src/views/plan/productionschedul/index.vue
index d47995b..2ae8a2b 100644
--- a/src/views/plan/productionschedul/index.vue
+++ b/src/views/plan/productionschedul/index.vue
@@ -573,7 +573,7 @@
}
</script>
<style>
-.el-tag--small{
+.avue-crud__tip{
display: none;
}
.basic-template-table .el-table__body .el-table__row td:first-child .cell {
diff --git a/src/views/technology/structure/single-structure-form.vue b/src/views/technology/structure/single-structure-form.vue
index b3ad774..813347d 100644
--- a/src/views/technology/structure/single-structure-form.vue
+++ b/src/views/technology/structure/single-structure-form.vue
@@ -2,11 +2,11 @@
<div style="height: 100%">
<div class="page-header">
<div class="header-left">
- <a @click="$router.go(-1)"><i class="icon-btn-back"></i></a>
+ <a @click="goBack"><i class="icon-btn-back"></i></a>
<h2>缂栬緫-浜у搧缁撴瀯</h2>
</div>
<div class="btn-group header-right">
- <el-button title="淇濆瓨" :disabled="isSubmit" v-thinclick="`save`"
+ <el-button title="淇濆瓨" type="primary" :disabled="isSubmit" v-thinclick="`save`"
>淇濆瓨</el-button
>
</div>
@@ -47,34 +47,6 @@
>
</el-input>
</el-form-item>
- <!-- <el-form-item label="缁撴瀯绫诲瀷" prop="bomTypeDb">
- <el-select
- v-model="dataForm.bomTypeDb"
- placeholder="璇烽�夋嫨缁撴瀯绫诲瀷"
- style="width:100%"
- >
- <el-option
- v-for="(item, index) in bomTypeDbOptions"
- :label="item.label"
- :value="item.value"
- :key="index"
- >
- </el-option>
- </el-select>
- </el-form-item> -->
- <!-- <el-form-item label="鏇夸唬" prop="alternativeNo">
- <el-input v-model="dataForm.alternativeNo"></el-input>
- </el-form-item>
- <el-form-item label="鏇夸唬鎻忚堪" prop="alternativeDesc">
- <el-input
- type="textarea"
- :autosize="{ minRows: 1, maxRows: 3 }"
- v-model="dataForm.alternativeDesc"
- ></el-input>
- </el-form-item> -->
- <!-- <el-form-item label="鐗堟湰鍙�" prop="version">
- <el-input v-model="dataForm.version" disabled></el-input>
- </el-form-item> -->
<el-form-item label="澶囨敞" prop="remark">
<el-input
type="textarea"
@@ -82,15 +54,6 @@
v-model="dataForm.remark"
></el-input>
</el-form-item>
- <!-- <el-form-item label="宸插悓姝ヨ嚦IFS" prop="ifsSync">
- <span
- style="width: 146px;display: inline-block;font-size:12px;font-weight:bold;"
- >{{ dataForm.ifsSync ? '鏄�' : '鍚�' }}</span
- >
- </el-form-item> -->
- <!-- <el-form-item label="榛樿缁撴瀯" prop="master">
- <el-checkbox v-model="dataForm.master"></el-checkbox>
- </el-form-item> -->
</el-col>
</el-row>
</el-form>
@@ -110,7 +73,7 @@
size="medium"
class="blue-but"
@click="addNode()"
- >娣诲姞
+ >娣诲姞琛�
</el-button>
</div>
</div>
@@ -120,12 +83,14 @@
:data="nodeList"
:default-sort="{ prop: 'lineItemNo' }"
height="650"
- :header-cell-style="{ color: '#999' }"
+ border
+ :header-cell-style="{ color: '#000' }"
:row-class-name="structureComponentRowClass"
+ class="l-mes"
>
<el-table-column
prop="lineItemNo"
- label="琛岄」鍙�"
+ label="搴忓彿"
align="center"
width="70"
>
@@ -135,11 +100,13 @@
prop="operationName"
align="center"
>
- <template scope="scope">
+ <template scope="scope" >
<el-input
- v-model="scope.row.operationName"
- placeholder="璇烽�夋嫨娑堣�楀伐搴�"
- v-if="scope.row.isUpdate"
+ style="width:90%"
+ v-model="scope.row.operationName"
+ placeholder="璇烽�夋嫨娑堣�楀伐搴�"
+ readonly
+ v-if="scope.row.isUpdate"
>
<el-button
slot="append"
@@ -155,6 +122,7 @@
<el-table-column label="闆朵欢鍙�" prop="partNo" align="center">
<template scope="scope">
<el-input
+ style="width:90%"
:class="customClass[scope.$index]"
v-model="scope.row.partNo"
placeholder="璇烽�夋嫨闆朵欢"
@@ -184,6 +152,8 @@
<el-table-column label="鏁伴噺" prop="qpa" align="center">
<template slot-scope="scope">
<el-input
+ style="width:90%"
+ clearable
size="small"
v-model="scope.row.qpa"
placeholder="璇峰~鍐欐暟閲�"
@@ -193,31 +163,15 @@
<span v-show="!scope.row.isUpdate">{{ scope.row.qpa }}</span>
</template>
</el-table-column>
-
<el-table-column label="鍗曚綅" prop="unit" align="center">
</el-table-column>
- <!-- <el-table-column label="鐩樻暟(鐩�)" prop="discNum" align="center">
- <template slot-scope="scope">
- <el-input
- size="small"
- v-model="scope.row.discNum"
- placeholder="璇峰~鍐欑洏鏁�"
- v-show="scope.row.isUpdate"
- ></el-input>
- <span v-show="!scope.row.isUpdate">{{
- scope.row.discNum
- }}</span>
- </template>
- </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
type="text"
size="small"
class="blue-but"
- v-if="!scope.row.isUpdate"
+ v-if="!scope.row.isUpdate && scope.row.id!=null"
@click="editNode(scope.$index, scope.row)"
>缂栬緫</el-button
>
@@ -225,7 +179,7 @@
type="text"
size="small"
class="blue-but"
- v-if="scope.row.isUpdate"
+ v-if="scope.row.isUpdate && scope.row.id!=null"
:loading="nodeSaveLoading"
@click="addOrUpdateNode(scope.$index, scope.row)"
>淇濆瓨</el-button
@@ -346,6 +300,26 @@
this.getBomTypeDbOptions()
},
methods: {
+ goBack(){
+ let isUnSave = false
+ const _than = this
+ _than.nodeList.forEach(e=>{
+ if(e.isUpdate || e.id==null){
+ isUnSave = true
+ }
+ })
+ if(isUnSave){
+ _than.$confirm('鎮ㄨ繕鏈夋湭淇濆瓨鐨勫瓙鑺傜偣锛岀‘璁ょ寮�鍚�?', '鎻愮ず', {
+ confirmButtonText: '浠嶈绂诲紑',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ _than.$router.go(-1)
+ }).catch(() => {});
+ }else{
+ _than.$router.go(-1)
+ }
+ },
// 鏌ヨ缁撴瀯绫诲瀷瀛楀吀
getBomTypeDbOptions() {
remote('bom_type_db').then((response) => {
@@ -424,41 +398,49 @@
this.currRow = null
},
save() {
+ const _than = this
this.isSubmit = true
- this.$refs.dataForm.validate((valid) => {
+ _than.nodeList.forEach(e=>{
+ e.version = _than.dataForm.version
+ })
+ _than.dataForm.components = _than.nodeList
+ _than.$refs.dataForm.validate((valid) => {
if (valid) {
- if (this.dataForm.id) {
- putObj(this.dataForm)
+ if (_than.dataForm.id) {
+ putObj(_than.dataForm)
.then((response) => {
var data = response.data
if (data.code === 0) {
- this.$message.success('淇濆瓨鎴愬姛')
+ _than.$message.success('淇濆瓨鎴愬姛')
+ _than.$nextTick(()=>{
+ _than.init(_than.dataForm.id)
+ })
} else {
- this.$message.error('淇濆瓨澶辫触')
+ _than.$message.error('淇濆瓨澶辫触')
}
- this.isSubmit = false
+ _than.isSubmit = false
})
.catch(() => {
- this.isSubmit = false
+ _than.isSubmit = false
})
} else {
- addObj(this.dataForm)
+ addObj(_than.dataForm)
.then((response) => {
var data = response.data
if (data.code === 0) {
- this.dataForm.id = data.data
- this.$message.success('淇濆瓨鎴愬姛')
+ _than.dataForm.id = data.data
+ _than.$message.success('淇濆瓨鎴愬姛')
} else {
- this.$message.error('淇濆瓨澶辫触')
+ _than.$message.error('淇濆瓨澶辫触')
}
- this.isSubmit = false
+ _than.isSubmit = false
})
.catch(() => {
- this.isSubmit = false
+ _than.isSubmit = false
})
}
} else {
- this.isSubmit = false
+ _than.isSubmit = false
}
})
},
@@ -635,6 +617,10 @@
}
},
delNode(index, row) {
+ if(row.id==null){
+ this.nodeList.splice(index,1)
+ return
+ }
this.$confirm('鏄惁纭鍒犻櫎闆朵欢鍙蜂负' + row.partNo, '鎻愮ず', {
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
@@ -826,4 +812,28 @@
.el-input__red {
border: 1px solid red;
}
+.l-mes .el-input-group__append,
+.l-mes .el-input-group__prepend {
+ padding: 0;
+ border-top: none;
+ border-right: none;
+ border-left: none;
+ border-radius: 0;
+ background-color: transparent;
+}
+
+.l-mes .el-input-group__append .el-button,
+.l-mes .el-input-group__prepend .el-button {
+ padding: 0;
+ width: 25px;
+ border: none !important;
+ line-height: 28px;
+ color: #c0c4cc;
+ margin: -1px 0;
+}
+
+.l-mes .el-input-group__append .el-button i,
+.l-mes .el-input-group__prepend .el-button i {
+ vertical-align: middle;
+}
</style>
--
Gitblit v1.9.3