|
@@ -113,31 +113,39 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
+ <!--分配公司按钮弹窗-->
|
|
|
<el-dialog :title="allot.title" :visible.sync="allot.open" width="700px" append-to-body>
|
|
|
+
|
|
|
<el-transfer
|
|
|
filterable
|
|
|
+ v-model="value"
|
|
|
+ :titles="['所有公司', '已选公司']"
|
|
|
:filter-method="filterMethod"
|
|
|
+ :right-default-checked="value"
|
|
|
filter-placeholder="请输入公司名称"
|
|
|
- v-model="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>
|
|
|
+
|
|
|
</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;
|
|
|
},
|
|
@@ -215,18 +223,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;
|
|
@@ -279,9 +275,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,34 +360,4 @@ export default {
|
|
|
},
|
|
|
|
|
|
};
|
|
|
-</script>
|
|
|
-
|
|
|
-<style>
|
|
|
-.container {
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- margin-bottom: 20px;
|
|
|
-}
|
|
|
-
|
|
|
-.box {
|
|
|
- width: 300px;
|
|
|
-}
|
|
|
-
|
|
|
-.el-scrollbar {
|
|
|
- max-height: 200px;
|
|
|
- overflow-y: auto; /* 添加滚动条 */
|
|
|
-}
|
|
|
-
|
|
|
-/* 新增样式 */
|
|
|
-.container {
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- align-items: flex-start;
|
|
|
-}
|
|
|
-
|
|
|
-.box {
|
|
|
- margin: 0 10px;
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-</style>
|
|
|
+</script>
|