瀏覽代碼

Merge branch 'master' of ssh://gogs.zfire.top:2222/zfire-front/zfire-newmall-admin

linwenxin 1 年之前
父節點
當前提交
5edbce38bc

+ 10 - 5
src/views/auxiliaryFittings/salesManagement/attachmentNewReturn/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="page">
-		<template-page v-show="!formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents" :operationColumnWidth="50"
+		<template-page v-show="!formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents" :operationColumnWidth="110"
 		  :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
 		  :operation="operation" :exportList="exportList">
 		  
@@ -112,11 +112,16 @@ export default {
     operation(h, { row, index, column }) {
       return (
         <div class='operation-btns'>
-		  <el-button type="text" onClick={() => {
+			<el-button type="text" onClick={() => {
 				this.id = row.partsRetId
-		    this.formDialogType = 1
-		    this.openForm()
-		  }}>编辑</el-button>
+				this.formDialogType = row.flag == 'SAVE'?1:2
+				this.openForm()
+			}}>{row.flag == 'SAVE'?'编辑':"详情"}</el-button>
+			{row.flag == 'SUBMIT'?<el-button type="text" onClick={() => {
+				this.id = row.partsRetId
+				this.formDialogType = row.flag == 'SAVE'?1:2
+				this.openForm()
+			}}>确认收货</el-button>:null}
         </div>
       )
     },

+ 10 - 5
src/views/auxiliaryFittings/salesManagement/attachmentOldReturn/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="page">
-		<template-page v-show="!formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents" :operationColumnWidth="50"
+		<template-page v-show="!formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents" :operationColumnWidth="110"
 		  :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
 		  :operation="operation" :exportList="exportList">
 		  
@@ -112,11 +112,16 @@ export default {
     operation(h, { row, index, column }) {
       return (
         <div class='operation-btns'>
-		  <el-button type="text" onClick={() => {
+			<el-button type="text" onClick={() => {
 				this.id = row.partsRetId
-		    this.formDialogType = 1
-		    this.openForm()
-		  }}>编辑</el-button>
+				this.formDialogType = row.flag == 'SAVE'?1:2
+				this.openForm()
+			}}>{row.flag == 'SAVE'?'编辑':"详情"}</el-button>
+			{row.flag == 'SUBMIT'?<el-button type="text" onClick={() => {
+				this.id = row.partsRetId
+				this.formDialogType = row.flag == 'SAVE'?1:2
+				this.openForm()
+			}}>确认收货</el-button>:null}
         </div>
       )
     },

+ 10 - 5
src/views/auxiliaryFittings/salesManagement/attachmentSalesOrder/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="page">
-		<template-page v-show="!formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents" :operationColumnWidth="50"
+		<template-page v-show="!formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents" :operationColumnWidth="110"
 		  :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
 		  :operation="operation" :exportList="exportList">
 		  
@@ -113,11 +113,16 @@ export default {
     operation(h, { row, index, column }) {
       return (
         <div class='operation-btns'>
-		  <el-button type="text" onClick={() => {
+			<el-button type="text" onClick={() => {
 				this.id = row.salesId
-		    this.formDialogType = 1
-		    this.openForm()
-		  }}>编辑</el-button>
+				this.formDialogType = row.flag == 'SAVE'?1:2
+				this.openForm()
+			}}>{row.flag == 'SAVE'?'编辑':"详情"}</el-button>
+			{row.flag == 'PAY_NOT_TAKE'?<el-button type="text" onClick={() => {
+				this.id = row.salesId
+				this.formDialogType = row.flag == 'SAVE'?1:2
+				this.openForm()
+			}}>确认提货</el-button>:null}
         </div>
       )
     },

+ 11 - 6
src/views/auxiliaryFittings/salesManagement/auxiliarySalesOrder/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="page">
-		<template-page v-show="!formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents" :operationColumnWidth="50"
+		<template-page v-show="!formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents" :operationColumnWidth="110"
 		  :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
 		  :operation="operation" :exportList="exportList">
 		  
@@ -113,11 +113,16 @@ export default {
     operation(h, { row, index, column }) {
       return (
         <div class='operation-btns'>
-		  <el-button type="text" onClick={() => {
-			this.id = row.salesId
-		    this.formDialogType = row.flag == 'SAVE'?1:2
-		    this.openForm()
-		  }}>{row.flag == 'SAVE'?'编辑':"详情"}</el-button>
+			<el-button type="text" onClick={() => {
+				this.id = row.salesId
+				this.formDialogType = row.flag == 'SAVE'?1:2
+				this.openForm()
+			}}>{row.flag == 'SAVE'?'编辑':"详情"}</el-button>
+			{row.flag == 'PAY_NOT_TAKE'?<el-button type="text" onClick={() => {
+				this.id = row.salesId
+				this.formDialogType = row.flag == 'SAVE'?1:2
+				this.openForm()
+			}}>确认提货</el-button>:null}
         </div>
       )
     },

+ 10 - 5
src/views/auxiliaryFittings/salesManagement/auxiliarySalesReturnOrder/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="page">
-		<template-page v-show="!formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents" :operationColumnWidth="50"
+		<template-page v-show="!formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents" :operationColumnWidth="110"
 		  :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
 		  :operation="operation" :exportList="exportList">
 		  
@@ -112,11 +112,16 @@ export default {
     operation(h, { row, index, column }) {
       return (
         <div class='operation-btns'>
-		  <el-button type="text" onClick={() => {
+			<el-button type="text" onClick={() => {
 				this.id = row.salesRetId
-		    this.formDialogType = row.retState == 'OK'?2:1
-		    this.openForm()
-		  }}>{row.retState == 'OK'?'详情':'编辑'}</el-button>
+				this.formDialogType = 2
+				this.openForm()
+			}}>查看</el-button>
+			{row.retState == 'WAIT'?<el-button type="text" onClick={() => {
+				this.id = row.salesRetId
+				this.formDialogType = 2
+				this.openForm()
+			}}>确认收货</el-button>:null}
         </div>
       )
     },

+ 41 - 11
src/views/auxiliaryFittings/salesManagement/components/attachmentNewReturnDetail.vue

@@ -26,7 +26,7 @@
 						</el-col>
 						<el-col :span="12">
 							<el-form-item label="网点名称" prop="websitId" :required="true">
-								<el-select v-model="formData.websit" value-key="websitId" @change="changeWebsit" placeholder="请选择" style="width: 100%;">
+								<el-select v-model="formData.websit" value-key="websitId" :disabled="formType == 2" @change="changeWebsit" placeholder="请选择" style="width: 100%;">
 								    <el-option
 								      v-for="item in websitList"
 								      :key="item.websitId"
@@ -38,7 +38,7 @@
 						</el-col>
 						<el-col :span="8">
 							<el-form-item label="师傅姓名" prop="worker" :required="true">
-								<el-select v-model="formData.worker" value-key="nickName" @focus="()=>{
+								<el-select v-model="formData.worker" :disabled="formType == 2" value-key="nickName" @focus="()=>{
 									if(!this.formData.websitId){return this.$message.warning('请先选择网点名称!');}
 								}" filterable @change="changeWorker" @blur="workerBlur" placeholder="请选择" style="width: 100%;">
 								    <el-option
@@ -52,22 +52,22 @@
 						</el-col>
 						<el-col :span="8">
 							<el-form-item label="师傅身份证" prop="idcard" :required="true">
-								<el-input type="text" v-model="formData.idcard" placeholder="请输入"></el-input>
+								<el-input type="text" v-model="formData.idcard" :disabled="formType == 2" placeholder="请输入"></el-input>
 							</el-form-item>
 						</el-col>
 						<el-col :span="8">
 							<el-form-item label="师傅联系电话" prop="phone" :required="true">
-								<el-input type="text" v-model="formData.phone" placeholder="请输入"></el-input>
+								<el-input type="text" v-model="formData.phone" :disabled="formType == 2" placeholder="请输入"></el-input>
 							</el-form-item>
 						</el-col>
 						<el-col :span="6">
 							<el-form-item label="销售订单号" :required="true">
-								<el-input type="text" v-model="formData.salesId" @change="getDetail" placeholder="请输入销售订单号"></el-input>
+								<el-input type="text" v-model="formData.salesId" :disabled="formType == 2" @change="getDetail" placeholder="请输入销售订单号"></el-input>
 							</el-form-item>
 						</el-col>
 						<el-col :span="6">
 							<el-form-item label="销售金额">
-								<el-input type="text" :value="salesDetail.createBy" disabled></el-input>
+								<el-input type="text" :value="salesDetail.totalAmount" disabled></el-input>
 							</el-form-item>
 						</el-col>
 						<el-col :span="6">
@@ -102,7 +102,7 @@
 						</el-col>
 						<el-col :span="24">
 							<el-form-item label="备注">
-								<el-input type="textarea" :rows="4" v-model="formData.remark" placeholder="请输入"></el-input>
+								<el-input type="textarea" :rows="4" v-model="formData.remark" :disabled="formType == 2" placeholder="请输入"></el-input>
 							</el-form-item>
 						</el-col>
 					</el-row>
@@ -118,7 +118,7 @@
 				<el-table :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
 					<el-table-column label="配件名称" align="center">
 						<template slot-scope="scope">
-							<el-select v-model="scope.row.goods" @change="changeGoods" value-key="goodsId" :disabled="isEdit != scope.$index" placeholder="请选择" style="width: 100%;">
+							<el-select v-model="scope.row.goods" @change="changeGoods" value-key="goodsId" :disabled="isEdit != scope.$index || formType == 2" placeholder="请选择" style="width: 100%;">
 							    <el-option
 							      v-for="item in scope.row.goodsList"
 							      :key="item.goodsId"
@@ -131,7 +131,7 @@
 					<el-table-column prop="goods.goodsSalesUnit" align="center" label="单位" ></el-table-column>
 					<el-table-column prop="" align="center" label="数量" >
 						<template slot-scope="scope">
-							<el-input type="number" v-model="scope.row.salesQty" :disabled="isEdit != scope.$index" placeholder="请输入"></el-input>
+							<el-input type="number" v-model="scope.row.salesQty" :disabled="isEdit != scope.$index || formType == 2" placeholder="请输入"></el-input>
 						</template>
 					</el-table-column>
 					<el-table-column prop="goods.goodsCode" align="center" label="配件编码"></el-table-column>
@@ -146,11 +146,11 @@
 					<!-- <el-table-column prop="goods.qty" align="center" label="库存数量"></el-table-column> -->
 					<el-table-column prop="" align="center" label="退款金额" >
 						<template slot-scope="scope">
-							<el-input type="number" v-model="scope.row.refundAmount" :disabled="isEdit != scope.$index" placeholder="请输入"></el-input>
+							<el-input type="number" v-model="scope.row.refundAmount" :disabled="isEdit != scope.$index || formType == 2" placeholder="请输入"></el-input>
 						</template>
 					</el-table-column>
 					<el-table-column label="操作" align="right" width="140">
-						<template slot-scope="scope">
+						<template slot-scope="scope" v-if="formType != 2">
 							<el-button size="mini" type="primary" v-if="scope.$index != isEdit" @click="isEdit = scope.$index">编辑</el-button>
 							<el-button size="mini" type="danger" @click="dataList.splice(scope.$index,1)">删除</el-button>
 						</template>
@@ -161,6 +161,7 @@
 		<div class="page-footer">
 			<div class="footer">
 				<el-button v-if="formType == 0 || (formType == 1 && formData.flag == 'SAVE')" size="small" type="primary" @click="save()">保存</el-button>
+				<el-button v-if="formType == 0 || (formType == 1 && formData.flag == 'SAVE')" size="small" type="primary" @click="submit()">提交</el-button>
 				<el-button v-if="formData.flag == 'SUBMIT'" size="small" type="primary"  @click="confirm()">确认收货</el-button>
 				<el-button size="small" type="info" @click="goBack">返回</el-button>
 			</div>
@@ -392,6 +393,35 @@
 					})
 				});
 			},
+			submit(){
+				this.$confirm(`请确定是否提交, 是否继续?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					edit({
+						flag: 'SUBMIT',
+						salesId: this.formData.salesId,
+						partsRetId: this.formData.partsRetId,
+						goodsType: 'P',
+						type: 'NEW',
+						remark: this.formData.remark,
+						websitId: this.formData.websitId,
+						websitName: this.formData.websitName,
+						workerName: this.formData.workerName,
+						workerId: this.formData.workerId,
+						identity: this.formData.idcard,
+						workerMobile: this.formData.phone,
+						websitPartsRetItems: this.dataList,
+						file_url: this.formData.file_url.map(item=>item.url).join(","),
+					}).then(res => {
+						if(res.code == 200){
+							this.$message.success('提交成功!')
+							this.goBack()
+						}
+					})
+				});
+			},
 			save(){
 				this.$refs.formData.validate((valid, invalidFields, errLabels) => {
 					if (valid) {

+ 41 - 11
src/views/auxiliaryFittings/salesManagement/components/attachmentOldReturnDetail.vue

@@ -26,7 +26,7 @@
 						</el-col>
 						<el-col :span="12">
 							<el-form-item label="网点名称" prop="websitId" :required="true">
-								<el-select v-model="formData.websit" value-key="websitId" @change="changeWebsit" placeholder="请选择" style="width: 100%;">
+								<el-select v-model="formData.websit" :disabled="formType == 2" value-key="websitId" @change="changeWebsit" placeholder="请选择" style="width: 100%;">
 								    <el-option
 								      v-for="item in websitList"
 								      :key="item.websitId"
@@ -38,7 +38,7 @@
 						</el-col>
 						<el-col :span="8">
 							<el-form-item label="师傅姓名" prop="worker" :required="true">
-								<el-select v-model="formData.worker" value-key="nickName" @focus="()=>{
+								<el-select v-model="formData.worker" :disabled="formType == 2" value-key="nickName" @focus="()=>{
 									if(!this.formData.websitId){return this.$message.warning('请先选择网点名称!');}
 								}" filterable @change="changeWorker" @blur="workerBlur" placeholder="请选择" style="width: 100%;">
 								    <el-option
@@ -52,22 +52,22 @@
 						</el-col>
 						<el-col :span="8">
 							<el-form-item label="师傅身份证" prop="idcard" :required="true">
-								<el-input type="text" v-model="formData.idcard" placeholder="请输入"></el-input>
+								<el-input type="text" v-model="formData.idcard" :disabled="formType == 2" placeholder="请输入"></el-input>
 							</el-form-item>
 						</el-col>
 						<el-col :span="8">
 							<el-form-item label="师傅联系电话" prop="phone" :required="true">
-								<el-input type="text" v-model="formData.phone" placeholder="请输入"></el-input>
+								<el-input type="text" v-model="formData.phone" :disabled="formType == 2" placeholder="请输入"></el-input>
 							</el-form-item>
 						</el-col>
 						<el-col :span="6">
 							<el-form-item label="销售订单号" :required="true">
-								<el-input type="text" v-model="formData.salesId" @change="getDetail" placeholder="请输入销售订单号"></el-input>
+								<el-input type="text" v-model="formData.salesId" :disabled="formType == 2" @change="getDetail" placeholder="请输入销售订单号"></el-input>
 							</el-form-item>
 						</el-col>
 						<el-col :span="6">
 							<el-form-item label="销售金额">
-								<el-input type="text" :value="salesDetail.createBy" disabled></el-input>
+								<el-input type="text" :value="salesDetail.totalAmount" disabled></el-input>
 							</el-form-item>
 						</el-col>
 						<el-col :span="6">
@@ -102,7 +102,7 @@
 						</el-col>
 						<el-col :span="24">
 							<el-form-item label="备注">
-								<el-input type="textarea" :rows="4" v-model="formData.remark" placeholder="请输入"></el-input>
+								<el-input type="textarea" :rows="4" v-model="formData.remark" :disabled="formType == 2" placeholder="请输入"></el-input>
 							</el-form-item>
 						</el-col>
 					</el-row>
@@ -118,7 +118,7 @@
 				<el-table :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
 					<el-table-column label="配件名称" align="center">
 						<template slot-scope="scope">
-							<el-select v-model="scope.row.goods" @change="changeGoods" value-key="goodsId" :disabled="isEdit != scope.$index" placeholder="请选择" style="width: 100%;">
+							<el-select v-model="scope.row.goods" @change="changeGoods" value-key="goodsId" :disabled="isEdit != scope.$index || formType == 2" placeholder="请选择" style="width: 100%;">
 							    <el-option
 							      v-for="item in scope.row.goodsList"
 							      :key="item.goodsId"
@@ -131,7 +131,7 @@
 					<el-table-column prop="goods.goodsSalesUnit" align="center" label="单位" ></el-table-column>
 					<el-table-column prop="" align="center" label="数量" >
 						<template slot-scope="scope">
-							<el-input type="number" v-model="scope.row.retQty" :disabled="isEdit != scope.$index" placeholder="请输入"></el-input>
+							<el-input type="number" v-model="scope.row.retQty" :disabled="isEdit != scope.$index || formType == 2" placeholder="请输入"></el-input>
 						</template>
 					</el-table-column>
 					<el-table-column prop="goods.goodsCode" align="center" label="配件编码"></el-table-column>
@@ -146,11 +146,11 @@
 					<!-- <el-table-column prop="goods.qty" align="center" label="库存数量"></el-table-column> -->
 					<el-table-column prop="" align="center" label="退款金额" >
 						<template slot-scope="scope">
-							<el-input type="number" v-model="scope.row.refundAmount" :disabled="isEdit != scope.$index" placeholder="请输入"></el-input>
+							<el-input type="number" v-model="scope.row.refundAmount" :disabled="isEdit != scope.$index || formType == 2" placeholder="请输入"></el-input>
 						</template>
 					</el-table-column>
 					<el-table-column label="操作" align="right" width="140">
-						<template slot-scope="scope">
+						<template slot-scope="scope" v-if="formType != 2">
 							<el-button size="mini" type="primary" v-if="scope.$index != isEdit" @click="isEdit = scope.$index">编辑</el-button>
 							<el-button size="mini" type="danger" @click="dataList.splice(scope.$index,1)">删除</el-button>
 						</template>
@@ -161,6 +161,7 @@
 		<div class="page-footer">
 			<div class="footer">
 				<el-button v-if="formType == 0 || (formType == 1 && formData.flag == 'SAVE')" size="small" type="primary" @click="save()">保存</el-button>
+				<el-button v-if="formType == 0 || (formType == 1 && formData.flag == 'SAVE')" size="small" type="primary" @click="submit()">提交</el-button>
 				<el-button v-if="formData.flag == 'SUBMIT'" size="small" type="primary"  @click="confirm()">确认收货</el-button>
 				<el-button size="small" type="info" @click="goBack">返回</el-button>
 			</div>
@@ -392,6 +393,35 @@
 					})
 				});
 			},
+			submit(){
+				this.$confirm(`请确定是否提交, 是否继续?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					edit({
+						flag: 'SUBMIT',
+						salesId: this.formData.salesId,
+						partsRetId: this.formData.partsRetId,
+						goodsType: 'P',
+						type: 'OLD',
+						remark: this.formData.remark,
+						websitId: this.formData.websitId,
+						websitName: this.formData.websitName,
+						workerName: this.formData.workerName,
+						workerId: this.formData.workerId,
+						identity: this.formData.idcard,
+						workerMobile: this.formData.phone,
+						websitPartsRetItems: this.dataList,
+						file_url: this.formData.file_url.map(item=>item.url).join(","),
+					}).then(res => {
+						if(res.code == 200){
+							this.$message.success('提交成功!')
+							this.goBack()
+						}
+					})
+				});
+			},
 			save(){
 				this.$refs.formData.validate((valid, invalidFields, errLabels) => {
 					if (valid) {

+ 12 - 12
src/views/auxiliaryFittings/salesManagement/components/attachmentSalesOrderDetail.vue

@@ -11,7 +11,7 @@
 					<el-row :gutter="20" justify="start">
 						<el-col :span="8" v-if="id">
 							<el-form-item label="单据状态">
-								<el-input type="text" :value="formData.flag == 'SAVE'?'已保存':formData.flag == 'OK'?'审核通过':formData.flag == 'OK'?'FAIL':''" disabled></el-input>
+								<el-input type="text" :value="formData.flag == 'SAVE'?'已保存':formData.flag == 'SUBMIT'?'已提交':formData.flag == 'CANCEL'?'取消订单':formData.flag == 'PAY_NOT_TAKE'?'已支付,未提货':formData.flag == 'PAY_TAKE'?'已支付,已提货':''" disabled></el-input>
 							</el-form-item>
 						</el-col>
 						<el-col :span="8" v-if="id">
@@ -26,7 +26,7 @@
 						</el-col>
 						<el-col :span="12">
 							<el-form-item label="网点名称" prop="websitId" :required="true">
-								<el-select v-model="formData.websit" value-key="websitId" @change="changeWebsit" placeholder="请选择" style="width: 100%;">
+								<el-select v-model="formData.websit" :disabled="formType == 2" value-key="websitId" @change="changeWebsit" placeholder="请选择" style="width: 100%;">
 								    <el-option
 								      v-for="item in websitList"
 								      :key="item.websitId"
@@ -38,7 +38,7 @@
 						</el-col>
 						<el-col :span="8">
 							<el-form-item label="师傅姓名" prop="worker" :required="true">
-								<el-select v-model="formData.worker" value-key="nickName" @focus="()=>{
+								<el-select v-model="formData.worker" :disabled="formType == 2" value-key="nickName" @focus="()=>{
 									if(!this.formData.websitId){return this.$message.warning('请先选择网点名称!');}
 								}" filterable @change="changeWorker" @blur="workerBlur" placeholder="请选择" style="width: 100%;">
 								    <el-option
@@ -52,12 +52,12 @@
 						</el-col>
 						<el-col :span="8">
 							<el-form-item label="师傅身份证" prop="idcard" :required="true">
-								<el-input type="text" v-model="formData.idcard" placeholder="请输入"></el-input>
+								<el-input type="text" v-model="formData.idcard" :disabled="formType == 2" placeholder="请输入"></el-input>
 							</el-form-item>
 						</el-col>
 						<el-col :span="8">
 							<el-form-item label="师傅联系电话" prop="phone" :required="true">
-								<el-input type="text" v-model="formData.phone" placeholder="请输入"></el-input>
+								<el-input type="text" v-model="formData.phone" :disabled="formType == 2" placeholder="请输入"></el-input>
 							</el-form-item>
 						</el-col>
 						<el-col :span="6" v-if="id">
@@ -87,7 +87,7 @@
 						</el-col>
 						<el-col :span="12">
 							<el-form-item label="订单来源" prop="source" :required="true">
-								<el-select v-model="formData.source" placeholder="请选择" style="width: 100%;">
+								<el-select v-model="formData.source" :disabled="formType == 2" placeholder="请选择" style="width: 100%;">
 								    <el-option
 								      v-for="item in [{name: '在线订单',id: 'ONLINE'},{name: '自建订单',id: 'SELF'}]"
 								      :key="item.id"
@@ -99,7 +99,7 @@
 						</el-col>
 						<el-col :span="9">
 							<el-form-item label="支付方式" prop="payType" :required="true">
-								<el-select v-model="formData.payType" placeholder="请选择" style="width: 100%;">
+								<el-select v-model="formData.payType" :disabled="formType == 2" placeholder="请选择" style="width: 100%;">
 								    <el-option
 								      v-for="item in [{name: '现金',id: 'CASH'},{name: '微信',id: 'WECHAT'}]"
 								      :key="item.id"
@@ -114,7 +114,7 @@
 						</el-col>
 						<el-col :span="24">
 							<el-form-item label="备注">
-								<el-input type="textarea" :rows="4" v-model="formData.remark" placeholder="请输入"></el-input>
+								<el-input type="textarea" :rows="4" v-model="formData.remark" :disabled="formType == 2" placeholder="请输入"></el-input>
 							</el-form-item>
 						</el-col>
 					</el-row>
@@ -125,12 +125,12 @@
 			<div slot="header" class="clearfix">
 				<span>配件信息</span>
 			</div>
-			<el-button size="small" type="primary" @click="add()">添加</el-button>
+			<el-button size="small" v-if="formData.flag == 'SAVE' || formType==0" type="primary" @click="add()">添加</el-button>
 			<div class="table">
 				<el-table :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
 					<el-table-column label="配件名称" align="center">
 						<template slot-scope="scope">
-							<el-select v-model="scope.row.goods" @change="changeGoods" value-key="goodsId" :disabled="isEdit != scope.$index" placeholder="请选择" style="width: 100%;">
+							<el-select v-model="scope.row.goods" @change="changeGoods" value-key="goodsId" :disabled="isEdit != scope.$index || formType == 2" placeholder="请选择" style="width: 100%;">
 							    <el-option
 							      v-for="item in scope.row.goodsList"
 							      :key="item.goodsId"
@@ -143,7 +143,7 @@
 					<el-table-column prop="goods.goodsSalesUnit" align="center" label="单位" ></el-table-column>
 					<el-table-column prop="" align="center" label="数量" >
 						<template slot-scope="scope">
-							<el-input type="number" v-model="scope.row.salesQty" :disabled="isEdit != scope.$index" placeholder="请输入"></el-input>
+							<el-input type="number" v-model="scope.row.salesQty" :disabled="isEdit != scope.$index || formType == 2" placeholder="请输入"></el-input>
 						</template>
 					</el-table-column>
 					<el-table-column prop="goods.goodsCode" align="center" label="配件编码"></el-table-column>
@@ -157,7 +157,7 @@
 					</el-table-column>
 					<el-table-column prop="goods.qty" align="center" label="库存数量"></el-table-column>
 					<el-table-column label="操作" align="right" width="140">
-						<template slot-scope="scope">
+						<template slot-scope="scope" v-if="formType != 2">
 							<el-button size="mini" type="primary" v-if="scope.$index != isEdit" @click="isEdit = scope.$index">编辑</el-button>
 							<el-button size="mini" type="danger" @click="dataList.splice(scope.$index,1)">删除</el-button>
 						</template>