pengyh 1 éve
szülő
commit
bbc1811021

+ 68 - 16
src/views/auxiliaryFittings/salesManagement/components/attachmentOldReturnDetail.vue

@@ -163,6 +163,61 @@
 				</el-table>
 			</div>
 		</el-card>
+		<el-card class="box-card">
+			<div slot="header" class="clearfix">
+				<span>旧件信息</span>
+			</div>
+			<el-button v-if="formType != 2" size="small" type="primary" @click="add()">添加</el-button>
+			<div class="table">
+				<el-table :data="oldList" element-loading-text="Loading" border fit highlight-current-row stripe>
+					<el-table-column label="工单号" align="center">
+						<template slot-scope="scope">
+							<el-input type="text" v-model="scope.row.orderId" :disabled="formType == 2" placeholder="请输入"></el-input>
+						</template>
+					</el-table-column>
+					<el-table-column label="工单品牌" align="center">
+						<template slot-scope="scope">
+							<el-input type="text" v-model="scope.row.orderBrand" :disabled="formType == 2" placeholder="请输入"></el-input>
+						</template>
+					</el-table-column>
+					<el-table-column label="用户姓名" align="center">
+						<template slot-scope="scope">
+							<el-input type="text" v-model="scope.row.name" :disabled="formType == 2" placeholder="请输入"></el-input>
+						</template>
+					</el-table-column>
+					<el-table-column label="用户电话" align="center">
+						<template slot-scope="scope">
+							<el-input type="number" v-model="scope.row.phone" :disabled="formType == 2" placeholder="请输入"></el-input>
+						</template>
+					</el-table-column>
+					<el-table-column label="配件名称" align="center">
+						<template slot-scope="scope">
+							<el-input type="text" v-model="scope.row.partsName" :disabled="formType == 2" placeholder="请输入"></el-input>
+						</template>
+					</el-table-column>
+					<el-table-column label="配件编码" align="center">
+						<template slot-scope="scope">
+							<el-input type="text" v-model="scope.row.partsCode" :disabled="formType == 2" placeholder="请输入"></el-input>
+						</template>
+					</el-table-column>
+					<el-table-column label="单位" align="center">
+						<template slot-scope="scope">
+							<el-input type="text" v-model="scope.row.unit" :disabled="formType == 2" placeholder="请输入"></el-input>
+						</template>
+					</el-table-column>
+					<el-table-column label="数量" align="center">
+						<template slot-scope="scope">
+							<el-input type="number" v-model="scope.row.qty" :disabled="formType == 2" placeholder="请输入"></el-input>
+						</template>
+					</el-table-column>
+					<el-table-column label="操作" align="right" width="140">
+						<template slot-scope="scope" v-if="formType != 2">
+							<el-button size="mini" type="danger" @click="oldList.splice(scope.$index,1)">删除</el-button>
+						</template>
+					</el-table-column>
+				</el-table>
+			</div>
+		</el-card>
 		<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>
@@ -189,6 +244,7 @@
 		data() {
 			return {
 				dataList: [],
+				oldList: [],
 				websitList: [],
 				workerList: [],
 				mainList: [],
@@ -282,6 +338,7 @@
 						item.goodsList = ress.data ? [{...ress.data,oldPrice:ress.data.price}] : []
 					}
 					this.dataList = res.data.websitPartsRetItemList
+					this.oldList = res.data.websitPartsRetOldRecordList
 				})
 			},
 			getWebsit(){
@@ -339,23 +396,15 @@
 				this.dataList[this.isEdit].qty = e.qty
 			},
 			add(){
-				if(this.dataList.length != 0){this.isEdit += 1}
-				this.dataList.push({
-					goodsList: [],
-					goods: {},
-					goodsId: '',
-					goodsName: '',
-					goodsSalesUnit: '',
-					brandRelaName: '',
-					productRelaName: '',
-					goodsCode: '',
-					price: '',
-					refundAmount: '',
-					saleAmount: '',
-					salesQty: 1,
-					oldRefundQty: 1,
+				this.oldList.push({
+					orderId: '',
+					orderBrand: '',
+					name: '',
+					phone: '',
+					partsName: '',
+					unit: '',
 					qty: '',
-					goodsType: 'P'
+					partsCode: ''
 				})
 			},
 			async checkForm(){
@@ -411,6 +460,7 @@
 						identity: this.formData.identity,
 						workerMobile: this.formData.workerMobile,
 						websitPartsRetItems: this.dataList,
+						websitPartsRetOldRecordList: this.oldList,
 						orderUseType: this.formData.orderUseType,
 						fileUrl: this.formData.fileUrl.map(item=>item.url).join(","),
 					}).then(res => {
@@ -440,6 +490,7 @@
 								identity: this.formData.identity,
 								workerMobile: this.formData.workerMobile,
 								websitPartsRetItems: this.dataList,
+								websitPartsRetOldRecordList: this.oldList,
 								orderUseType: this.formData.orderUseType,
 								fileUrl: this.formData.fileUrl.map(item=>item.url).join(","),
 							}).then(res => {
@@ -462,6 +513,7 @@
 								identity: this.formData.identity,
 								workerMobile: this.formData.workerMobile,
 								websitPartsRetItems: this.dataList,
+								websitPartsRetOldRecordList: this.oldList,
 								orderUseType: this.formData.orderUseType,
 								fileUrl: this.formData.fileUrl.map(item=>item.url).join(","),
 							}).then(res => {

+ 1 - 1
src/views/auxiliaryFittings/salesManagement/components/auxiliarySalesOrderDetail.vue

@@ -177,7 +177,7 @@
 					<el-table-column prop="goods.price" align="center" label="销售价格"></el-table-column>
 					<el-table-column prop="" align="center" label="销售金额" >
 						<template slot-scope="scope" v-if="scope.row.salesQty && scope.row.goods && scope.row.goods.price">
-							{{(scope.row.goods.price * 100) * scope.row.salesQty / 100}}
+							{{((scope.row.goods.price * 100) * scope.row.salesQty / 100).toFixed(2)}}
 						</template>
 					</el-table-column>
 					<el-table-column prop="goods.qty" align="center" label="库存数量"></el-table-column>