|
@@ -120,26 +120,29 @@
|
|
|
:filter-method="filterMethod"
|
|
|
filter-placeholder="请输入公司名称"
|
|
|
v-model="value"
|
|
|
+ :titles="['所有公司', '已选公司']"
|
|
|
+ :right-default-checked="value"
|
|
|
:data="allCompanies">
|
|
|
-
|
|
|
</el-transfer>
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="handleAllotCompany">分 配</el-button>
|
|
|
- <el-button @click="cancel1">取 消</el-button>
|
|
|
- </div>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="handleAllotCompany">分 配</el-button>
|
|
|
+ <el-button @click="cancel1">取 消</el-button>
|
|
|
+ </div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listExpress, getExpress, delExpress, addExpress, updateExpress, exportExpress ,allotExpress ,getExpressList} from "@/api/store/express";
|
|
|
+import { listExpress, getExpress, delExpress, addExpress, updateExpress, exportExpress ,allotExpress ,getExpressList,getCompanyByOmsCode} from "@/api/store/express";
|
|
|
import { getCompanyList} from "@/api/company/company";
|
|
|
export default {
|
|
|
name: "Express",
|
|
|
data() {
|
|
|
return {
|
|
|
+
|
|
|
formId:null,
|
|
|
value: [],
|
|
|
+ value2:[],
|
|
|
filterMethod(query, item) {
|
|
|
return item.label.indexOf(query) > -1;
|
|
|
},
|
|
@@ -217,18 +220,6 @@ export default {
|
|
|
|
|
|
/** 查询快递公司列表 */
|
|
|
getList() {
|
|
|
- getCompanyList().then(response => {
|
|
|
- let data = [];
|
|
|
- response.data.forEach((item,index) => {
|
|
|
- data.push({
|
|
|
- key: item.companyId,
|
|
|
- label:item.companyName,
|
|
|
- })
|
|
|
- });
|
|
|
- this.allCompanies = data;
|
|
|
- console.log("aaaa",data);
|
|
|
- });
|
|
|
-
|
|
|
this.loading = true;
|
|
|
listExpress(this.queryParams).then(response => {
|
|
|
this.expressList = response.rows;
|
|
@@ -281,9 +272,26 @@ export default {
|
|
|
this.open = true;
|
|
|
this.title = "添加快递公司";
|
|
|
},
|
|
|
+ /**分配公司按钮 */
|
|
|
handleAllot(row){
|
|
|
this.allot.open = true;
|
|
|
this.formId = row.omsCode;
|
|
|
+ getCompanyList().then(response => {
|
|
|
+ let data = [];
|
|
|
+ response.data.forEach((item,index) => {
|
|
|
+ data.push({
|
|
|
+ key: item.companyId,
|
|
|
+ label:item.companyName,
|
|
|
+ })
|
|
|
+ });
|
|
|
+ this.allCompanies = data;
|
|
|
+ });
|
|
|
+ const omsCode = row.omsCode;
|
|
|
+ getCompanyByOmsCode(omsCode).then(response => {
|
|
|
+ this.value = response.data2
|
|
|
+ console.log(this.value);
|
|
|
+ });
|
|
|
+
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
@@ -347,10 +355,8 @@ export default {
|
|
|
}).catch(function() {});
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
};
|
|
|
</script>
|
|
|
-
|
|
|
<style scoped lang="scss">
|
|
|
.container {
|
|
|
display: flex;
|
|
@@ -385,3 +391,4 @@ export default {
|
|
|
}
|
|
|
|
|
|
</style>
|
|
|
+
|