|
@@ -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) {
|