|
@@ -163,6 +163,61 @@
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
</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="page-footer">
|
|
<div class="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="save()">保存</el-button>
|
|
@@ -189,6 +244,7 @@
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
dataList: [],
|
|
dataList: [],
|
|
|
|
+ oldList: [],
|
|
websitList: [],
|
|
websitList: [],
|
|
workerList: [],
|
|
workerList: [],
|
|
mainList: [],
|
|
mainList: [],
|
|
@@ -282,6 +338,7 @@
|
|
item.goodsList = ress.data ? [{...ress.data,oldPrice:ress.data.price}] : []
|
|
item.goodsList = ress.data ? [{...ress.data,oldPrice:ress.data.price}] : []
|
|
}
|
|
}
|
|
this.dataList = res.data.websitPartsRetItemList
|
|
this.dataList = res.data.websitPartsRetItemList
|
|
|
|
+ this.oldList = res.data.websitPartsRetOldRecordList
|
|
})
|
|
})
|
|
},
|
|
},
|
|
getWebsit(){
|
|
getWebsit(){
|
|
@@ -339,23 +396,15 @@
|
|
this.dataList[this.isEdit].qty = e.qty
|
|
this.dataList[this.isEdit].qty = e.qty
|
|
},
|
|
},
|
|
add(){
|
|
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: '',
|
|
qty: '',
|
|
- goodsType: 'P'
|
|
|
|
|
|
+ partsCode: ''
|
|
})
|
|
})
|
|
},
|
|
},
|
|
async checkForm(){
|
|
async checkForm(){
|
|
@@ -411,6 +460,7 @@
|
|
identity: this.formData.identity,
|
|
identity: this.formData.identity,
|
|
workerMobile: this.formData.workerMobile,
|
|
workerMobile: this.formData.workerMobile,
|
|
websitPartsRetItems: this.dataList,
|
|
websitPartsRetItems: this.dataList,
|
|
|
|
+ websitPartsRetOldRecordList: this.oldList,
|
|
orderUseType: this.formData.orderUseType,
|
|
orderUseType: this.formData.orderUseType,
|
|
fileUrl: this.formData.fileUrl.map(item=>item.url).join(","),
|
|
fileUrl: this.formData.fileUrl.map(item=>item.url).join(","),
|
|
}).then(res => {
|
|
}).then(res => {
|
|
@@ -440,6 +490,7 @@
|
|
identity: this.formData.identity,
|
|
identity: this.formData.identity,
|
|
workerMobile: this.formData.workerMobile,
|
|
workerMobile: this.formData.workerMobile,
|
|
websitPartsRetItems: this.dataList,
|
|
websitPartsRetItems: this.dataList,
|
|
|
|
+ websitPartsRetOldRecordList: this.oldList,
|
|
orderUseType: this.formData.orderUseType,
|
|
orderUseType: this.formData.orderUseType,
|
|
fileUrl: this.formData.fileUrl.map(item=>item.url).join(","),
|
|
fileUrl: this.formData.fileUrl.map(item=>item.url).join(","),
|
|
}).then(res => {
|
|
}).then(res => {
|
|
@@ -462,6 +513,7 @@
|
|
identity: this.formData.identity,
|
|
identity: this.formData.identity,
|
|
workerMobile: this.formData.workerMobile,
|
|
workerMobile: this.formData.workerMobile,
|
|
websitPartsRetItems: this.dataList,
|
|
websitPartsRetItems: this.dataList,
|
|
|
|
+ websitPartsRetOldRecordList: this.oldList,
|
|
orderUseType: this.formData.orderUseType,
|
|
orderUseType: this.formData.orderUseType,
|
|
fileUrl: this.formData.fileUrl.map(item=>item.url).join(","),
|
|
fileUrl: this.formData.fileUrl.map(item=>item.url).join(","),
|
|
}).then(res => {
|
|
}).then(res => {
|