|
@@ -148,6 +148,13 @@
|
|
|
>
|
|
|
物资详情
|
|
|
</el-button>
|
|
|
+ <el-button
|
|
|
+ @click="openEdit(scope.row)"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ >
|
|
|
+ 修改
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
//物资详情抽屉
|
|
@@ -177,6 +184,52 @@
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</div>
|
|
|
+ <div>
|
|
|
+ <el-dialog
|
|
|
+ title="修改发货单位和收货单位"
|
|
|
+ :visible.sync="isShow"
|
|
|
+ width="30%">
|
|
|
+ <el-form>
|
|
|
+ <el-form-item label="发货单位:">
|
|
|
+ <el-select
|
|
|
+ v-model="data.sendUnitId"
|
|
|
+ filterable
|
|
|
+ remote
|
|
|
+ default-first-option
|
|
|
+ :remote-method="remoteMethod1"
|
|
|
+ placeholder="请选择发货单位">
|
|
|
+ <el-option
|
|
|
+ v-for="item in options1"
|
|
|
+ :key="item.supplierId"
|
|
|
+ :label="item.supplierName"
|
|
|
+ :value="item.supplierId">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="收货单位:">
|
|
|
+ <el-select
|
|
|
+ v-model="data.receiveUnitId"
|
|
|
+ filterable
|
|
|
+ remote
|
|
|
+ default-first-option
|
|
|
+ :remote-method="remoteMethod2"
|
|
|
+ placeholder="请选择收货单位">
|
|
|
+ <el-option
|
|
|
+ v-for="item in options2"
|
|
|
+ :key="item.consigneeId"
|
|
|
+ :label="item.consigneeCompanyName"
|
|
|
+ :value="item.consigneeId">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="isShow = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="update">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -187,6 +240,14 @@ export default {
|
|
|
name: "inplantTMS",
|
|
|
data() {
|
|
|
return {
|
|
|
+ isShow:false,
|
|
|
+ data:{
|
|
|
+ sporadicOrderId:null,
|
|
|
+ sendUnitId:null,
|
|
|
+ receiveUnitId:null
|
|
|
+ },
|
|
|
+ options1:[],
|
|
|
+ options2:[],
|
|
|
startTime: null,
|
|
|
endTime: null,
|
|
|
input: null,
|
|
@@ -270,6 +331,50 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ //打开对话框
|
|
|
+ openEdit(row){
|
|
|
+ console.log("row:",row);
|
|
|
+ this.remoteMethod1(row.sendCompany);
|
|
|
+ this.remoteMethod2(row.receiveCompany);
|
|
|
+ this.data.sporadicOrderId=row.sporadicOrderId;
|
|
|
+ this.data.sendUnitId=row.sendUnitId
|
|
|
+ this.data.receiveUnitId=row.receiveUnitId
|
|
|
+ this.data.userId=getCookie("userId");
|
|
|
+ this.isShow=true;
|
|
|
+ this.$forceUpdate()
|
|
|
+ },
|
|
|
+ //远程查询
|
|
|
+ remoteMethod1(index){
|
|
|
+ this.axios.post('/api/v1/uc/getSupplierMesByLike?index='+index).then((res)=>{
|
|
|
+ this.options1=res.data.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ remoteMethod2(index){
|
|
|
+ this.axios.post('/api/v1/uc/getConsigneeByLike?index='+index).then((res)=>{
|
|
|
+ this.options2=res.data.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //更新
|
|
|
+ update(){
|
|
|
+ console.log(this.data);
|
|
|
+ this.$confirm('确认修改?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.axios.post('/api/v1/ams/updateSporadicOrder',this.data).then((res)=>{
|
|
|
+ console.log(res);
|
|
|
+ this.$message.success("修改成功!");
|
|
|
+ this.isShow=false;
|
|
|
+ this.onclick();
|
|
|
+ });
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消修改'
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
getRequestUrl() {
|
|
|
if (
|
|
|
getCookie("orgCode") == "dagangadmin" ||
|